From 8600374371f91843064441113f4023cda1730877 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 18 Mar 2023 16:40:57 -0300 Subject: General fish fixes and updates --- .config/fish/functions/tide.fish | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .config/fish/functions/tide.fish (limited to '.config/fish/functions/tide.fish') diff --git a/.config/fish/functions/tide.fish b/.config/fish/functions/tide.fish new file mode 100644 index 00000000..87fb8dc4 --- /dev/null +++ b/.config/fish/functions/tide.fish @@ -0,0 +1,27 @@ +function tide --description 'Manage your Tide prompt' + argparse --stop-nonopt v/version h/help -- $argv + + if set -q _flag_version + echo 'tide, version 5.4.0' + 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' \ + ' bug-report print info for use in bug reports' +end -- cgit v1.2.3