diff options
author | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-04-05 11:57:45 -0400 |
---|---|---|
committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-04-05 11:57:45 -0400 |
commit | b88d77fb2d0d5028a6f5670695dee6bec129501f (patch) | |
tree | 2536b0461d297e647cf07157641c9b1223339adf /home-config/fish/functions/tide.fish | |
parent | 776a7ca55d2d2c3f396de91db1c6c3c5065012cd (diff) |
ahhh sloppy fish, still needs fixing, esp with the vars
Diffstat (limited to 'home-config/fish/functions/tide.fish')
-rw-r--r-- | home-config/fish/functions/tide.fish | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/home-config/fish/functions/tide.fish b/home-config/fish/functions/tide.fish new file mode 100644 index 0000000..092a722 --- /dev/null +++ b/home-config/fish/functions/tide.fish | |||
@@ -0,0 +1,28 @@ | |||
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 | ||