configs  Artifact [5be29bb5dc]

Artifact 5be29bb5dc81f65e4f841e33f1ebe1c370adbd53beebdd50dbb7b2e5f29008ca:

  • File config/fish/functions/prompt_pwd.fish — part of check-in [09fe98aab3] at 2020-01-21 00:11:28 on branch trunk — Add fish config (user: js size: 361)

function prompt_pwd --description 'Print the current working directory'
	set -l options 'h/help'
	argparse -n prompt_pwd --max-args=0 $options -- $argv
	or return

	if set -q _flag_help
		__fish_print_help prompt_pwd
		return 0
	end

	# Replace $HOME with "~"
	set realhome ~
	set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $PWD)

	basename $tmp
end