From 7e72e9ac87fc1c052726202f84a1e16466e06ad4 Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Wed, 2 Aug 2023 22:22:54 -0400 Subject: feat: `zsh` fast-syntax-highlighting plugin --- .../shell/zsh-fast-syntax-highlighting/_fast-theme | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .config/shell/zsh-fast-syntax-highlighting/_fast-theme (limited to '.config/shell/zsh-fast-syntax-highlighting/_fast-theme') diff --git a/.config/shell/zsh-fast-syntax-highlighting/_fast-theme b/.config/shell/zsh-fast-syntax-highlighting/_fast-theme new file mode 100644 index 0000000..4c88062 --- /dev/null +++ b/.config/shell/zsh-fast-syntax-highlighting/_fast-theme @@ -0,0 +1,33 @@ +#compdef fast-theme + +# +# Copyright (c) 2018 Sebastian Gniazdowski +# +# Completion for theme-switching function, fast-theme, +# part of zdharma/fast-syntax-highlighting. +# + +integer ret=1 +local -a arguments + +arguments=( + {-h,--help}'[display help text]' + {-l,--list}'[list available themes]' + {-r,--reset}'[unset any theme (revert to default highlighting)]' + {-R,--ov-reset}'[unset overlay, use styles only from main-theme (requires restart)]' + {-q,--quiet}'[no default messages]' + {-s,--show}'[get and display the theme currently being set]' + {-v,--verbose}'[more messages during operation]' + {-t,--test}'[test theme after setting it (show example code)]' + {-p,--palette}'[just print all 256 colors and exit (useful when creating a theme)]' + {-w,--workdir}'[cd into $FAST_WORK_DIR (if not set, then into the plugin directory)]' +) + +typeset -a themes +themes=( "$FAST_WORK_DIR"/themes/*.ini(:t:r) ) + +_wanted themes expl "Themes" \ + compadd "$@" -a - themes && ret=0 +_arguments -s $arguments && ret=0 + +return $ret -- cgit v1.2.3