home-config/fish/functions/tide.fish
ddd6e973d651b9d9c4d160c8ebb288daa071e259
· 819 B · 28 lines
raw
| 1 | function tide --description 'Manage your Tide prompt' |
| 2 | argparse --stop-nonopt v/version h/help -- $argv |
| 3 | |
| 4 | if set -q _flag_version |
| 5 | echo 'tide, version 6.1.1' |
| 6 | else if set -q _flag_help |
| 7 | _tide_help |
| 8 | else if functions --query _tide_sub_$argv[1] |
| 9 | _tide_sub_$argv[1] $argv[2..] |
| 10 | else |
| 11 | _tide_help |
| 12 | return 1 |
| 13 | end |
| 14 | end |
| 15 | |
| 16 | function _tide_help |
| 17 | printf %s\n \ |
| 18 | 'Usage: tide [options] subcommand [options]' \ |
| 19 | '' \ |
| 20 | 'Options:' \ |
| 21 | ' -v or --version print tide version number' \ |
| 22 | ' -h or --help print this help message' \ |
| 23 | '' \ |
| 24 | 'Subcommands:' \ |
| 25 | ' configure run interactive configuration wizard' \ |
| 26 | ' reload reload tide configuration' \ |
| 27 | ' bug-report print info for use in bug reports' |
| 28 | end |