summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/tide.fish
diff options
context:
space:
mode:
Diffstat (limited to 'home-config/fish/functions/tide.fish')
-rw-r--r--home-config/fish/functions/tide.fish28
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 @@
1function 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
14end
15
16function _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'
28end