update prompt_pwd to use argparse

This commit is contained in:
Kurtis Rader 2017-07-13 13:57:17 -07:00
parent 51a52a7286
commit 30940916bd

View file

@ -1,7 +1,9 @@
function prompt_pwd --description "Print the current working directory, shortened to fit the prompt" function prompt_pwd --description "Print the current working directory, shortened to fit the prompt"
set -q argv[1] set -l options 'h/help'
and switch $argv[1] argparse -n prompt_pwd --max-args=0 $options -- $argv
case -h --help or return
if set -q _flag_help
__fish_print_help prompt_pwd __fish_print_help prompt_pwd
return 0 return 0
end end