update open to use argparse

This commit is contained in:
Kurtis Rader 2017-07-13 13:55:15 -07:00
parent e8243af20b
commit 51a52a7286

View file

@ -2,15 +2,15 @@
# This allows us to use 'open FILENAME' to open a given file in the default # This allows us to use 'open FILENAME' to open a given file in the default
# application for the file. # application for the file.
# #
if not command -sq open if not command -sq open
function open --description "Open file in default application" function open --description "Open file in default application"
if count $argv >/dev/null set -l options 'h/help'
switch $argv[1] argparse -n open --min-args=1 $options -- $argv
case -h --h --he --hel --help or return
__fish_print_help open
return 0 if set -q _flag_help
end __fish_print_help open
return 0
end end
if type -q -f cygstart if type -q -f cygstart