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
|
2021-11-29 20:13:33 +03:00
|
|
|
echo 'tide, version 5.0.1'
|
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
|
2020-07-16 23:51:42 +03:00
|
|
|
return 1
|
2020-05-19 06:03:25 +03:00
|
|
|
end
|
2020-07-23 20:57:40 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
function _tide_help
|
2021-11-29 20:13:33 +03:00
|
|
|
echo "\
|
|
|
|
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
|
|
|
|
bug-report print info for use in bug reports"
|
2021-03-02 20:46:40 +03:00
|
|
|
end
|