diff options
| author | Blista Kanjo | 2023-08-02 22:22:54 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2023-08-02 22:22:54 -0400 |
| commit | 7e72e9ac87fc1c052726202f84a1e16466e06ad4 (patch) | |
| tree | eb35478ad142aa154d80d85aa583500c5eab65b8 /.config/shell/zsh-fast-syntax-highlighting/_fast-theme | |
| parent | 08e564a8e1d4c13ad4c046ca4bfc9ca7f72373bd (diff) | |
feat: `zsh` fast-syntax-highlighting plugin
Diffstat (limited to '.config/shell/zsh-fast-syntax-highlighting/_fast-theme')
| -rw-r--r-- | .config/shell/zsh-fast-syntax-highlighting/_fast-theme | 33 |
1 files changed, 33 insertions, 0 deletions
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 |
