From b88d77fb2d0d5028a6f5670695dee6bec129501f Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Fri, 5 Apr 2024 11:57:45 -0400 Subject: ahhh sloppy fish, still needs fixing, esp with the vars --- home-config/fish/functions/tide.fish | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 home-config/fish/functions/tide.fish (limited to 'home-config/fish/functions/tide.fish') 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 @@ +function tide --description 'Manage your Tide prompt' + argparse --stop-nonopt v/version h/help -- $argv + + if set -q _flag_version + echo 'tide, version 6.1.1' + else if set -q _flag_help + _tide_help + else if functions --query _tide_sub_$argv[1] + _tide_sub_$argv[1] $argv[2..] + else + _tide_help + return 1 + end +end + +function _tide_help + 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' \ + ' reload reload tide configuration' \ + ' bug-report print info for use in bug reports' +end -- cgit v1.2.3