tide/functions/tide.fish

29 lines
819 B
Fish
Raw Normal View History

2021-11-29 20:13:33 +03:00
function tide --description 'Manage your Tide prompt'
2021-03-02 20:46:40 +03:00
argparse --stop-nonopt v/version h/help -- $argv
2020-06-07 03:51:24 +03:00
if set -q _flag_version
2023-07-05 06:46:05 +03:00
echo 'tide, version 5.6.0'
2020-09-23 23:56:08 +03:00
else if set -q _flag_help
2020-07-23 20:57:40 +03:00
_tide_help
2020-11-21 00:51:18 +03:00
else if functions --query _tide_sub_$argv[1]
2021-11-29 20:13:33 +03:00
_tide_sub_$argv[1] $argv[2..]
2020-05-19 06:03:25 +03:00
else
2020-07-23 20:57:40 +03:00
_tide_help
return 1
2020-05-19 06:03:25 +03:00
end
2020-07-23 20:57:40 +03:00
end
function _tide_help
2022-01-11 21:53:37 +03:00
printf %s\n \
'Usage: tide [options] subcommand [options]' \
'' \
'Options:' \
' -v or --version print tide version number' \
' -h or --help print this help message' \
'' \
'Subcommands:' \
' configure run interactive configuration wizard' \
2023-09-09 17:10:21 +03:00
' reload reload tide configuration' \
2022-01-11 21:53:37 +03:00
' bug-report print info for use in bug reports'
2021-03-02 20:46:40 +03:00
end