X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;ds=sidebyside;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fthemes%2Fthemes.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fthemes%2Fthemes.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=650856284c05c52019a149da680b0abecef0daa9;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/themes/themes.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/themes/themes.plugin.zsh deleted file mode 100644 index 6508562..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/themes/themes.plugin.zsh +++ /dev/null @@ -1,35 +0,0 @@ -function theme { - : ${1:=random} # Use random theme if none provided - - if [[ -f "$ZSH_CUSTOM/$1.zsh-theme" ]]; then - source "$ZSH_CUSTOM/$1.zsh-theme" - elif [[ -f "$ZSH_CUSTOM/themes/$1.zsh-theme" ]]; then - source "$ZSH_CUSTOM/themes/$1.zsh-theme" - elif [[ -f "$ZSH/themes/$1.zsh-theme" ]]; then - source "$ZSH/themes/$1.zsh-theme" - else - echo "$0: Theme '$1' not found" - return 1 - fi -} - -function _theme { - _arguments "1: :($(lstheme))" -} - -compdef _theme theme - -function lstheme { - # Resources: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers - { - # Show themes inside $ZSH_CUSTOM (in any subfolder) - # Strip $ZSH_CUSTOM/themes/ and $ZSH_CUSTOM/ from the name, so that it matches - # the value that should be written in $ZSH_THEME to load the theme. - print -l "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::) - - # Show themes inside $ZSH, stripping the head of the path. - print -l "$ZSH"/themes/*.zsh-theme(.N:t:r) - } | sort -u | fmt -w $COLUMNS -}