From 2cb7bc7357ff70382bf15a775b534fd0fe559969 Mon Sep 17 00:00:00 2001 From: Aswath K Date: Fri, 5 Oct 2018 03:11:34 +0530 Subject: Add READMEs to plugins: yum, mosh, themes (#7229) --- plugins/themes/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/themes/README.md (limited to 'plugins/themes') diff --git a/plugins/themes/README.md b/plugins/themes/README.md new file mode 100644 index 000000000..408e357e0 --- /dev/null +++ b/plugins/themes/README.md @@ -0,0 +1,18 @@ +# Themes Plugin + +This plugin allows you to change ZSH theme on the go. + +To use it, add `themes` to the plugins array in your zshrc file: + +``` +plugins=(... themes) +``` + +## Usage + +`theme ` - Changes the ZSH theme to specified theme. + +`theme ` - Changes the ZSH theme to some random theme. + +`lstheme ` - Lists installed ZSH themes. + -- cgit v1.2.3-70-g09d2 From 08f2fc12143175d011d69189679b0ed4c834b5c7 Mon Sep 17 00:00:00 2001 From: Aswath K Date: Fri, 5 Oct 2018 13:43:39 +0530 Subject: themes: fix custom themes directory (#7233) --- plugins/themes/themes.plugin.zsh | 4 ++-- plugins/yum/README.md | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/themes') diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 7519b0253..487e85689 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/plugins/themes/themes.plugin.zsh @@ -8,9 +8,9 @@ function theme source "$RANDOM_THEME" echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..." else - if [ -f "$ZSH_CUSTOM/$1.zsh-theme" ] + if [ -f "$ZSH_CUSTOM/themes/$1.zsh-theme" ] then - source "$ZSH_CUSTOM/$1.zsh-theme" + source "$ZSH_CUSTOM/themes/$1.zsh-theme" else source "$ZSH/themes/$1.zsh-theme" fi diff --git a/plugins/yum/README.md b/plugins/yum/README.md index 5053d4d42..8043421d8 100644 --- a/plugins/yum/README.md +++ b/plugins/yum/README.md @@ -25,4 +25,3 @@ plugins=(... yum) | ygr | `sudo yum groupremove` | Remove pagage group | | yrl | `sudo yum remove --remove-leaves` | Remove package and leaves | | yc | `sudo yum clean all` | Clean yum cache | - -- cgit v1.2.3-70-g09d2 From d9ea2604790d0ce0f7160b77bebe06c69766c06e Mon Sep 17 00:00:00 2001 From: Aswath K Date: Mon, 8 Oct 2018 21:55:20 +0530 Subject: themes: add custom themes directory support to `lstheme` (#7236) `lstheme` command used to list only the themes listed in `$ZSH/themes/` directory. This commit adds themes in `$ZSH_CUSTOM/themes/` also to the theme listings. --- plugins/themes/themes.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/themes') diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 487e85689..2cd0ee327 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/plugins/themes/themes.plugin.zsh @@ -19,6 +19,8 @@ function theme function lstheme { - cd $ZSH/themes - ls *zsh-theme | sed 's,\.zsh-theme$,,' + # Resources: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers + print -l {$ZSH,$ZSH_CUSTOM}/themes/*.zsh-theme(N:t:r) } -- cgit v1.2.3-70-g09d2