Permalink
Browse files

[#23] Rename plugins to modules

  • Loading branch information...
1 parent a75bbff commit a7340886b35251d582744af8e8fbd96f4309864a @sorin-ionescu sorin-ionescu committed Mar 28, 2012
Showing with 159 additions and 159 deletions.
  1. +1 −1 .gitignore
  2. +4 −4 .gitmodules
  3. +3 −3 README.md
  4. +23 −23 init.zsh
  5. 0 {plugins → modules}/archive/completions/_extract
  6. 0 {plugins → modules}/archive/completions/_ls-archive
  7. 0 {plugins → modules}/archive/functions/extract
  8. 0 {plugins → modules}/archive/functions/ls-archive
  9. +1 −1 {plugins → modules}/command-not-found/README.md
  10. 0 {plugins → modules}/command-not-found/init.zsh
  11. 0 {plugins → modules}/compleat/init.zsh
  12. +1 −0 modules/completion/completions
  13. 0 {plugins → modules}/dpkg/functions/apt-copy
  14. 0 {plugins → modules}/dpkg/functions/apt-history
  15. 0 {plugins → modules}/dpkg/functions/dbb-build
  16. 0 {plugins → modules}/dpkg/init.zsh
  17. 0 {plugins → modules}/git/.gitignore
  18. 0 {plugins → modules}/git/alias.zsh
  19. 0 {plugins → modules}/git/completions/_git-hub
  20. 0 {plugins → modules}/git/completions/_git-hub-short-url
  21. 0 {plugins → modules}/git/completions/_git-info
  22. 0 {plugins → modules}/git/functions/git-current-branch
  23. 0 {plugins → modules}/git/functions/git-hub
  24. 0 {plugins → modules}/git/functions/git-hub-short-url
  25. +18 −18 {plugins → modules}/git/functions/git-info
  26. 0 {plugins → modules}/git/functions/git-root
  27. 0 {plugins → modules}/git/hub.zsh
  28. +1 −1 {plugins → modules}/git/init.zsh
  29. +64 −0 modules/git/style.zsh
  30. +2 −2 {plugins → modules}/gnu-utils/README.md
  31. +1 −1 {plugins → modules}/gnu-utils/init.zsh
  32. 0 {plugins → modules}/gpg-agent/init.zsh
  33. +5 −5 {plugins → modules}/history-substring-search/README.md
  34. 0 {plugins → modules}/history-substring-search/external
  35. +2 −2 {plugins → modules}/history-substring-search/init.zsh
  36. 0 {plugins → modules}/macports/init.zsh
  37. 0 {plugins → modules}/node/functions/node-doc
  38. 0 {plugins → modules}/node/init.zsh
  39. +1 −1 {plugins → modules}/osx/README.md
  40. 0 {plugins → modules}/osx/functions/manb
  41. 0 {plugins → modules}/osx/functions/manp
  42. 0 {plugins → modules}/osx/functions/pfd
  43. 0 {plugins → modules}/osx/functions/pfs
  44. 0 {plugins → modules}/osx/functions/tab
  45. 0 {plugins → modules}/osx/functions/trash
  46. 0 {plugins → modules}/osx/init.zsh
  47. 0 {plugins → modules}/pacman/functions/pacdisowned
  48. 0 {plugins → modules}/pacman/functions/paclist
  49. 0 {plugins → modules}/pacman/init.zsh
  50. 0 {plugins → modules}/perl/completions/_prep
  51. 0 {plugins → modules}/perl/completions/_psub
  52. 0 {plugins → modules}/perl/functions/prep
  53. 0 {plugins → modules}/perl/functions/psub
  54. 0 {plugins → modules}/perl/init.zsh
  55. 0 {plugins → modules}/python/init.zsh
  56. 0 {plugins → modules}/rails/init.zsh
  57. 0 {plugins → modules}/rsync/init.zsh
  58. 0 {plugins → modules}/ruby/init.zsh
  59. +2 −2 {plugins → modules}/screen/README.md
  60. +1 −1 {plugins → modules}/screen/init.zsh
  61. +4 −4 {plugins → modules}/ssh-agent/init.zsh
  62. 0 {plugins → modules}/syntax-highlighting/external
  63. +1 −1 {plugins → modules}/syntax-highlighting/init.zsh
  64. +3 −3 {plugins → modules}/tmux/README.md
  65. +1 −1 {plugins → modules}/tmux/init.zsh
  66. +1 −1 {plugins → modules}/wakeonlan/README
  67. 0 {plugins → modules}/wakeonlan/completions/_wake
  68. 0 {plugins → modules}/wakeonlan/functions/wake
  69. 0 {plugins → modules}/yum/init.zsh
  70. 0 {plugins → modules}/z/init.zsh
  71. +0 −64 plugins/git/style.zsh
  72. +4 −4 templates/zshrc
  73. +15 −16 themes/sorin/prompt_sorin_setup
View
@@ -1,3 +1,3 @@
*.zwc
*.zwc.old
-plugins/*/cache.zsh
+modules/*/cache.zsh
View
@@ -1,9 +1,9 @@
[submodule "completions"]
path = completions
url = https://github.com/zsh-users/zsh-completions.git
-[submodule "plugins/history-substring-search/external"]
- path = plugins/history-substring-search/external
+[submodule "modules/history-substring-search/external"]
+ path = modules/history-substring-search/external
url = https://github.com/zsh-users/zsh-history-substring-search.git
-[submodule "plugins/syntax-highlighting/external"]
- path = plugins/syntax-highlighting/external
+[submodule "modules/syntax-highlighting/external"]
+ path = modules/syntax-highlighting/external
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
View
@@ -44,10 +44,10 @@ window or tab.
Oh My Zsh has many features disabled by default. Read the source code and
accompanying README files to learn of what is available.
-### Plugins
+### Modules
-1. Browse `plugins/` to see what is available.
-2. Load the plugins you need in `~/.zshrc` then open a new Zsh terminal window
+1. Browse `modules/` to see what is available.
+2. Load the modules you need in `~/.zshrc` then open a new Zsh terminal window
or tab.
### Themes
View
@@ -19,30 +19,30 @@ if [[ "$TERM" == 'dumb' ]]; then
zstyle ':omz:prompt' theme 'off'
fi
-# Get enabled plugins.
-zstyle -a ':omz:load' plugin 'plugins'
+# Get enabled OMZ modules.
+zstyle -a ':omz:load' omodule 'omodules'
# Add functions to fpath.
fpath=(
${0:h}/themes/*(/FN)
- ${plugins:+${0:h}/plugins/${^plugins}/{functions,completions}(/FN)}
+ ${omodules:+${0:h}/modules/${^omodules}/{functions,completions}(/FN)}
${0:h}/{functions,completions}(/FN)
$fpath
)
-# Autoload Zsh modules.
-zstyle -a ':omz:load' module 'zsh_modules'
-for zsh_module in "$zsh_modules[@]"; do
- zmodload "${(z)zsh_module}"
+# Load Zsh modules.
+zstyle -a ':omz:load' module 'zmodules'
+for zmodule in "$zmodules[@]"; do
+ zmodload "${(z)zmodule}"
done
-unset zsh_modules zsh_module
+unset zmodules zmodule
# Autoload Zsh functions.
-zstyle -a ':omz:load' function 'zsh_functions'
-for zsh_function in "$zsh_functions[@]"; do
- autoload -Uz "$zsh_function"
+zstyle -a ':omz:load' function 'zfunctions'
+for zfunction in "$zfunctions[@]"; do
+ autoload -Uz "$zfunction"
done
-unset zsh_functions zsh_function
+unset zfunctions zfunction
# Load and initialize the completion system ignoring insecure directories.
autoload -Uz compinit && compinit -i
@@ -59,31 +59,31 @@ source "${0:h}/spectrum.zsh"
source "${0:h}/alias.zsh"
source "${0:h}/utility.zsh"
-# Source plugins defined in ~/.zshrc.
-for plugin in "$plugins[@]"; do
- if [[ ! -d "${0:h}/plugins/$plugin" ]]; then
- print "omz: no such plugin: $plugin" >&2
+# Source modules defined in ~/.zshrc.
+for omodule in "$omodules[@]"; do
+ if [[ ! -d "${0:h}/modules/$omodule" ]]; then
+ print "omz: no such module: $omodule" >&2
fi
- if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then
- source "${0:h}/plugins/$plugin/init.zsh"
+ if [[ -f "${0:h}/modules/$omodule/init.zsh" ]]; then
+ source "${0:h}/modules/$omodule/init.zsh"
fi
if (( $? == 0 )); then
- zstyle ":omz:plugin:$plugin" loaded 'yes'
+ zstyle ":omz:module:$omodule" loaded 'yes'
fi
done
-unset plugin plugins
+unset omodule omodules
# Autoload Oh My Zsh functions.
for fdir in "$fpath[@]"; do
if [[ "$fdir" == ${0:h}/(|*/)functions ]]; then
- for omz_function in $fdir/[^_.]*(N.:t); do
- autoload -Uz "$omz_function"
+ for ofunction in $fdir/[^_.]*(N.:t); do
+ autoload -Uz "$ofunction"
done
fi
done
-unset fdir omz_function
+unset fdir ofunction
# Set environment variables for launchd processes.
if [[ "$OSTYPE" == darwin* ]]; then
@@ -6,7 +6,7 @@ Loads the [command-not-found][1] tool on Debian-based distributions.
Authors
-------
-*The authors of this plugin should be contacted via the GitHub issue tracker.*
+*The authors of this module should be contacted via the GitHub issue tracker.*
- [Joseph Booker](/sargas)
File renamed without changes.
Submodule completions added at b877df
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -206,31 +206,31 @@ function git-info {
# Ignore submodule status.
zstyle -b \
- ':omz:plugin:git:prompt:ignore' submodule 'ignore_submodule'
+ ':omz:module:git:prompt:ignore' submodule 'ignore_submodule'
zstyle -s \
- ':omz:plugin:git:prompt:ignore:submodule' when 'ignore_submodule_when'
+ ':omz:module:git:prompt:ignore:submodule' when 'ignore_submodule_when'
if is-true "$ignore_submodule"; then
status_cmd+=" --ignore-submodules=${ignore_submodule_when:-all}"
fi
# Format commit.
commit="$(git rev-parse HEAD 2> /dev/null)"
if [[ -n "$commit" ]]; then
- zstyle -s ':omz:plugin:git:prompt' commit 'commit_format'
+ zstyle -s ':omz:module:git:prompt' commit 'commit_format'
zformat -f commit_formatted "$commit_format" "c:$commit"
fi
# Format stashed.
if [[ -f "$(_git-dir)/refs/stash" ]]; then
stashed="$(git stash list 2> /dev/null | wc -l)"
- zstyle -s ':omz:plugin:git:prompt' stashed 'stashed_format'
+ zstyle -s ':omz:module:git:prompt' stashed 'stashed_format'
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
fi
# Format action.
action="$(_git-action)"
if [[ -n "$action" ]]; then
- zstyle -s ':omz:plugin:git:prompt' action 'action_format'
+ zstyle -s ':omz:module:git:prompt' action 'action_format'
zformat -f action_formatted "$action_format" "s:$action"
fi
@@ -251,13 +251,13 @@ function git-info {
# Format branch.
branch="${$(git symbolic-ref -q HEAD)##refs/heads/}"
if [[ -n "$branch" ]]; then
- zstyle -s ':omz:plugin:git:prompt' branch 'branch_format'
+ zstyle -s ':omz:module:git:prompt' branch 'branch_format'
zformat -f branch_formatted "$branch_format" "b:$branch"
# Format remote.
remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}"
if [[ -n "$remote" ]]; then
- zstyle -s ':omz:plugin:git:prompt' remote 'remote_format'
+ zstyle -s ':omz:module:git:prompt' remote 'remote_format'
zformat -f remote_formatted "$remote_format" "R:$remote"
# Get ahead and behind counts.
@@ -266,14 +266,14 @@ function git-info {
# Format ahead.
ahead="$ahead_and_behind[(w)1]"
if (( $ahead > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' ahead 'ahead_format'
+ zstyle -s ':omz:module:git:prompt' ahead 'ahead_format'
zformat -f ahead_formatted "$ahead_format" "A:$ahead"
fi
# Format behind.
behind="$ahead_and_behind[(w)2]"
if (( $behind > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' behind 'behind_format'
+ zstyle -s ':omz:module:git:prompt' behind 'behind_format'
zformat -f behind_formatted "$behind_format" "B:$behind"
fi
fi
@@ -288,49 +288,49 @@ function git-info {
# Format added.
if (( $added > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' added 'added_format'
+ zstyle -s ':omz:module:git:prompt' added 'added_format'
zformat -f added_formatted "$added_format" "a:$added_format"
fi
# Format deleted.
if (( $deleted > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' deleted 'deleted_format'
+ zstyle -s ':omz:module:git:prompt' deleted 'deleted_format'
zformat -f deleted_formatted "$deleted_format" "d:$deleted_format"
fi
# Format modified.
if (( $modified > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' modified 'modified_format'
+ zstyle -s ':omz:module:git:prompt' modified 'modified_format'
zformat -f modified_formatted "$modified_format" "m:$modified"
fi
# Format renamed.
if (( $renamed > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' renamed 'renamed_format'
+ zstyle -s ':omz:module:git:prompt' renamed 'renamed_format'
zformat -f renamed_formatted "$renamed_format" "r:$renamed"
fi
# Format unmerged.
if (( $unmerged > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' unmerged 'unmerged_format'
+ zstyle -s ':omz:module:git:prompt' unmerged 'unmerged_format'
zformat -f unmerged_formatted "$unmerged_format" "U:$unmerged"
fi
# Format untracked.
if (( $untracked > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' untracked 'untracked_format'
+ zstyle -s ':omz:module:git:prompt' untracked 'untracked_format'
zformat -f untracked_formatted "$untracked_format" "u:$untracked"
fi
# Format dirty.
if (( $dirty > 0 )); then
- zstyle -s ':omz:plugin:git:prompt' dirty 'dirty_format'
+ zstyle -s ':omz:module:git:prompt' dirty 'dirty_format'
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
fi
# Format prompts.
- zstyle -s ':omz:plugin:git:prompt' prompt 'prompt_format'
- zstyle -s ':omz:plugin:git:prompt' rprompt 'rprompt_format'
+ zstyle -s ':omz:module:git:prompt' prompt 'prompt_format'
+ zstyle -s ':omz:module:git:prompt' rprompt 'rprompt_format'
git_info_vars=(
git_prompt_info "$prompt_format"
File renamed without changes.
File renamed without changes.
@@ -5,7 +5,7 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
-# Source plugin files.
+# Source module files.
source "${0:h}/alias.zsh"
source "${0:h}/hub.zsh"
source "${0:h}/style.zsh"
View
@@ -0,0 +1,64 @@
+#
+# Defines Git information display styles.
+#
+# Authors:
+# Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+# %s - Special action name (am, merge, rebase).
+zstyle ':omz:module:git:prompt' action 'action:%s'
+
+# %a - Indicator to notify of added files.
+zstyle ':omz:module:git:prompt' added 'added:%a'
+
+# %A - Indicator to notify of ahead branch.
+zstyle ':omz:module:git:prompt' ahead 'ahead:%A'
+
+# %B - Indicator to notify of behind branch.
+zstyle ':omz:module:git:prompt' behind 'behind:%B'
+
+# %b - Branch name.
+zstyle ':omz:module:git:prompt' branch 'branch:%b'
+
+# %c - SHA-1 hash.
+zstyle ':omz:module:git:prompt' commit 'commit:%c'
+
+# %d - Indicator to notify of deleted files.
+zstyle ':omz:module:git:prompt' deleted 'deleted:%d'
+
+# %D - Indicator to notify of dirty files.
+zstyle ':omz:module:git:prompt' dirty 'dirty:%D'
+
+# %m - Indicator to notify of modified files.
+zstyle ':omz:module:git:prompt' modified 'modified:%m'
+
+# %p - HEAD position in relation to the nearest branch, remote, tag.
+zstyle ':omz:module:git:prompt' position 'position:%p'
+
+# %R - Remote name.
+zstyle ':omz:module:git:prompt' remote 'remote:%R'
+
+# %r - Indicator to notify of renamed files.
+zstyle ':omz:module:git:prompt' renamed 'renamed:%r'
+
+# %S - Indicator to notify of stashed files.
+zstyle ':omz:module:git:prompt' stashed 'stashed:%S'
+
+# %U - Indicator to notify of unmerged files.
+zstyle ':omz:module:git:prompt' unmerged 'unmerged:%U'
+
+# %u - Indicator to notify of untracked files.
+zstyle ':omz:module:git:prompt' untracked 'untracked:%u'
+
+# Left prompt.
+zstyle ':omz:module:git:prompt' prompt ' git:(%b %D)'
+
+# Right prompt.
+zstyle ':omz:module:git:prompt' rprompt ''
+
+# Ignore submodule.
+zstyle ':omz:module:git:prompt:ignore' submodule 'no'
+
+# Ignore submodule when it is 'dirty', 'untracked', 'all', or 'none'.
+zstyle ':omz:module:git:prompt:ignore:submodule' when 'all'
+
@@ -18,12 +18,12 @@ Settings
To use a different prefix, add the following to *zshrc*, and replace 'g' with
the desired prefix:
- zstyle ':omz:plugin:gnu-utils' prefix 'g'
+ zstyle ':omz:module:gnu-utils' prefix 'g'
Authors
-------
-*The authors of this plugin should be contacted via the GitHub issue tracker.*
+*The authors of this module should be contacted via the GitHub issue tracker.*
- [Sorin Ionescu](/sorin-ionescu)
@@ -6,7 +6,7 @@
#
# Get the prefix or use the default.
-zstyle -s ':omz:plugin:gnu-utils' prefix '_gnu_utils_prefix' ||
+zstyle -s ':omz:module:gnu-utils' prefix '_gnu_utils_prefix' ||
_gnu_utils_prefix='g'
# Check for the presence of GNU Core Utilities.
File renamed without changes.
@@ -10,24 +10,24 @@ Settings
### Case Sensitivity
-To enable case-sensitivity for this plugin only, add the following line to
+To enable case-sensitivity for this module only, add the following line to
*zshrc*:
- zstyle ':omz:plugin:history-substring-search' case-sensitive 'yes'
+ zstyle ':omz:module:history-substring-search' case-sensitive 'yes'
### Highlighting
If colors are enabled, _history-substring-search_ will automatically highlight
positive results.
-To enable highlighting for this plugin only, and the following line to *zshrc*:
+To enable highlighting for this module only, and the following line to *zshrc*:
- zstyle -t ':omz:plugin:history-substring-search' color 'yes'
+ zstyle -t ':omz:module:history-substring-search' color 'yes'
Authors
-------
-*The authors of this plugin should be contacted via the GitHub issue tracker.*
+*The authors of this module should be contacted via the GitHub issue tracker.*
- [Sorin Ionescu](/sorin-ionescu)
- [Suraj N. Kurapati](/sunaku)
Oops, something went wrong.

0 comments on commit a734088

Please sign in to comment.