Browse Source

[#23] Rename plugins to modules

master
Sorin Ionescu 13 years ago
parent
commit
a7340886b3
  1. 2
      .gitignore
  2. 8
      .gitmodules
  3. 6
      README.md
  4. 46
      init.zsh
  5. 0
      modules/archive/completions/_extract
  6. 0
      modules/archive/completions/_ls-archive
  7. 0
      modules/archive/functions/extract
  8. 0
      modules/archive/functions/ls-archive
  9. 2
      modules/command-not-found/README.md
  10. 0
      modules/command-not-found/init.zsh
  11. 0
      modules/compleat/init.zsh
  12. 1
      modules/completion/completions
  13. 0
      modules/dpkg/functions/apt-copy
  14. 0
      modules/dpkg/functions/apt-history
  15. 0
      modules/dpkg/functions/dbb-build
  16. 0
      modules/dpkg/init.zsh
  17. 0
      modules/git/.gitignore
  18. 0
      modules/git/alias.zsh
  19. 0
      modules/git/completions/_git-hub
  20. 0
      modules/git/completions/_git-hub-short-url
  21. 0
      modules/git/completions/_git-info
  22. 0
      modules/git/functions/git-current-branch
  23. 0
      modules/git/functions/git-hub
  24. 0
      modules/git/functions/git-hub-short-url
  25. 36
      modules/git/functions/git-info
  26. 0
      modules/git/functions/git-root
  27. 0
      modules/git/hub.zsh
  28. 2
      modules/git/init.zsh
  29. 64
      modules/git/style.zsh
  30. 4
      modules/gnu-utils/README.md
  31. 2
      modules/gnu-utils/init.zsh
  32. 0
      modules/gpg-agent/init.zsh
  33. 10
      modules/history-substring-search/README.md
  34. 0
      modules/history-substring-search/external
  35. 4
      modules/history-substring-search/init.zsh
  36. 0
      modules/macports/init.zsh
  37. 0
      modules/node/functions/node-doc
  38. 0
      modules/node/init.zsh
  39. 2
      modules/osx/README.md
  40. 0
      modules/osx/functions/manb
  41. 0
      modules/osx/functions/manp
  42. 0
      modules/osx/functions/pfd
  43. 0
      modules/osx/functions/pfs
  44. 0
      modules/osx/functions/tab
  45. 0
      modules/osx/functions/trash
  46. 0
      modules/osx/init.zsh
  47. 0
      modules/pacman/functions/pacdisowned
  48. 0
      modules/pacman/functions/paclist
  49. 0
      modules/pacman/init.zsh
  50. 0
      modules/perl/completions/_prep
  51. 0
      modules/perl/completions/_psub
  52. 0
      modules/perl/functions/prep
  53. 0
      modules/perl/functions/psub
  54. 0
      modules/perl/init.zsh
  55. 0
      modules/python/init.zsh
  56. 0
      modules/rails/init.zsh
  57. 0
      modules/rsync/init.zsh
  58. 0
      modules/ruby/init.zsh
  59. 4
      modules/screen/README.md
  60. 2
      modules/screen/init.zsh
  61. 8
      modules/ssh-agent/init.zsh
  62. 0
      modules/syntax-highlighting/external
  63. 2
      modules/syntax-highlighting/init.zsh
  64. 6
      modules/tmux/README.md
  65. 2
      modules/tmux/init.zsh
  66. 2
      modules/wakeonlan/README
  67. 0
      modules/wakeonlan/completions/_wake
  68. 0
      modules/wakeonlan/functions/wake
  69. 0
      modules/yum/init.zsh
  70. 0
      modules/z/init.zsh
  71. 64
      plugins/git/style.zsh
  72. 8
      templates/zshrc
  73. 31
      themes/sorin/prompt_sorin_setup

2
.gitignore vendored

@ -1,3 +1,3 @@
*.zwc *.zwc
*.zwc.old *.zwc.old
plugins/*/cache.zsh modules/*/cache.zsh

8
.gitmodules vendored

@ -1,9 +1,9 @@
[submodule "completions"] [submodule "completions"]
path = completions path = completions
url = https://github.com/zsh-users/zsh-completions.git url = https://github.com/zsh-users/zsh-completions.git
[submodule "plugins/history-substring-search/external"] [submodule "modules/history-substring-search/external"]
path = plugins/history-substring-search/external path = modules/history-substring-search/external
url = https://github.com/zsh-users/zsh-history-substring-search.git url = https://github.com/zsh-users/zsh-history-substring-search.git
[submodule "plugins/syntax-highlighting/external"] [submodule "modules/syntax-highlighting/external"]
path = plugins/syntax-highlighting/external path = modules/syntax-highlighting/external
url = https://github.com/zsh-users/zsh-syntax-highlighting.git url = https://github.com/zsh-users/zsh-syntax-highlighting.git

6
README.md

@ -44,10 +44,10 @@ window or tab.
Oh My Zsh has many features disabled by default. Read the source code and Oh My Zsh has many features disabled by default. Read the source code and
accompanying README files to learn of what is available. accompanying README files to learn of what is available.
### Plugins ### Modules
1. Browse `plugins/` to see what is available. 1. Browse `modules/` to see what is available.
2. Load the plugins you need in `~/.zshrc` then open a new Zsh terminal window 2. Load the modules you need in `~/.zshrc` then open a new Zsh terminal window
or tab. or tab.
### Themes ### Themes

46
init.zsh

@ -19,30 +19,30 @@ if [[ "$TERM" == 'dumb' ]]; then
zstyle ':omz:prompt' theme 'off' zstyle ':omz:prompt' theme 'off'
fi fi
# Get enabled plugins. # Get enabled OMZ modules.
zstyle -a ':omz:load' plugin 'plugins' zstyle -a ':omz:load' omodule 'omodules'
# Add functions to fpath. # Add functions to fpath.
fpath=( fpath=(
${0:h}/themes/*(/FN) ${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) ${0:h}/{functions,completions}(/FN)
$fpath $fpath
) )
# Autoload Zsh modules. # Load Zsh modules.
zstyle -a ':omz:load' module 'zsh_modules' zstyle -a ':omz:load' module 'zmodules'
for zsh_module in "$zsh_modules[@]"; do for zmodule in "$zmodules[@]"; do
zmodload "${(z)zsh_module}" zmodload "${(z)zmodule}"
done done
unset zsh_modules zsh_module unset zmodules zmodule
# Autoload Zsh functions. # Autoload Zsh functions.
zstyle -a ':omz:load' function 'zsh_functions' zstyle -a ':omz:load' function 'zfunctions'
for zsh_function in "$zsh_functions[@]"; do for zfunction in "$zfunctions[@]"; do
autoload -Uz "$zsh_function" autoload -Uz "$zfunction"
done done
unset zsh_functions zsh_function unset zfunctions zfunction
# Load and initialize the completion system ignoring insecure directories. # Load and initialize the completion system ignoring insecure directories.
autoload -Uz compinit && compinit -i autoload -Uz compinit && compinit -i
@ -59,31 +59,31 @@ source "${0:h}/spectrum.zsh"
source "${0:h}/alias.zsh" source "${0:h}/alias.zsh"
source "${0:h}/utility.zsh" source "${0:h}/utility.zsh"
# Source plugins defined in ~/.zshrc. # Source modules defined in ~/.zshrc.
for plugin in "$plugins[@]"; do for omodule in "$omodules[@]"; do
if [[ ! -d "${0:h}/plugins/$plugin" ]]; then if [[ ! -d "${0:h}/modules/$omodule" ]]; then
print "omz: no such plugin: $plugin" >&2 print "omz: no such module: $omodule" >&2
fi fi
if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then if [[ -f "${0:h}/modules/$omodule/init.zsh" ]]; then
source "${0:h}/plugins/$plugin/init.zsh" source "${0:h}/modules/$omodule/init.zsh"
fi fi
if (( $? == 0 )); then if (( $? == 0 )); then
zstyle ":omz:plugin:$plugin" loaded 'yes' zstyle ":omz:module:$omodule" loaded 'yes'
fi fi
done done
unset plugin plugins unset omodule omodules
# Autoload Oh My Zsh functions. # Autoload Oh My Zsh functions.
for fdir in "$fpath[@]"; do for fdir in "$fpath[@]"; do
if [[ "$fdir" == ${0:h}/(|*/)functions ]]; then if [[ "$fdir" == ${0:h}/(|*/)functions ]]; then
for omz_function in $fdir/[^_.]*(N.:t); do for ofunction in $fdir/[^_.]*(N.:t); do
autoload -Uz "$omz_function" autoload -Uz "$ofunction"
done done
fi fi
done done
unset fdir omz_function unset fdir ofunction
# Set environment variables for launchd processes. # Set environment variables for launchd processes.
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then

0
plugins/archive/completions/_extract → modules/archive/completions/_extract

0
plugins/archive/completions/_ls-archive → modules/archive/completions/_ls-archive

0
plugins/archive/functions/extract → modules/archive/functions/extract

0
plugins/archive/functions/ls-archive → modules/archive/functions/ls-archive

2
plugins/command-not-found/README.md → modules/command-not-found/README.md

@ -6,7 +6,7 @@ Loads the [command-not-found][1] tool on Debian-based distributions.
Authors 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) - [Joseph Booker](/sargas)

0
plugins/command-not-found/init.zsh → modules/command-not-found/init.zsh

0
plugins/compleat/init.zsh → modules/compleat/init.zsh

1
modules/completion/completions

@ -0,0 +1 @@
Subproject commit b877df4e7090c9a45da6a4c5f25d8ad172ed2639

0
plugins/dpkg/functions/apt-copy → modules/dpkg/functions/apt-copy

0
plugins/dpkg/functions/apt-history → modules/dpkg/functions/apt-history

0
plugins/dpkg/functions/dbb-build → modules/dpkg/functions/dbb-build

0
plugins/dpkg/init.zsh → modules/dpkg/init.zsh

0
plugins/git/.gitignore → modules/git/.gitignore vendored

0
plugins/git/alias.zsh → modules/git/alias.zsh

0
plugins/git/completions/_git-hub → modules/git/completions/_git-hub

0
plugins/git/completions/_git-hub-short-url → modules/git/completions/_git-hub-short-url

0
plugins/git/completions/_git-info → modules/git/completions/_git-info

0
plugins/git/functions/git-current-branch → modules/git/functions/git-current-branch

0
plugins/git/functions/git-hub → modules/git/functions/git-hub

0
plugins/git/functions/git-hub-short-url → modules/git/functions/git-hub-short-url

36
plugins/git/functions/git-info → modules/git/functions/git-info

@ -206,9 +206,9 @@ function git-info {
# Ignore submodule status. # Ignore submodule status.
zstyle -b \ zstyle -b \
':omz:plugin:git:prompt:ignore' submodule 'ignore_submodule' ':omz:module:git:prompt:ignore' submodule 'ignore_submodule'
zstyle -s \ 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 if is-true "$ignore_submodule"; then
status_cmd+=" --ignore-submodules=${ignore_submodule_when:-all}" status_cmd+=" --ignore-submodules=${ignore_submodule_when:-all}"
fi fi
@ -216,21 +216,21 @@ function git-info {
# Format commit. # Format commit.
commit="$(git rev-parse HEAD 2> /dev/null)" commit="$(git rev-parse HEAD 2> /dev/null)"
if [[ -n "$commit" ]]; then 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" zformat -f commit_formatted "$commit_format" "c:$commit"
fi fi
# Format stashed. # Format stashed.
if [[ -f "$(_git-dir)/refs/stash" ]]; then if [[ -f "$(_git-dir)/refs/stash" ]]; then
stashed="$(git stash list 2> /dev/null | wc -l)" 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" zformat -f stashed_formatted "$stashed_format" "S:$stashed"
fi fi
# Format action. # Format action.
action="$(_git-action)" action="$(_git-action)"
if [[ -n "$action" ]]; then 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" zformat -f action_formatted "$action_format" "s:$action"
fi fi
@ -251,13 +251,13 @@ function git-info {
# Format branch. # Format branch.
branch="${$(git symbolic-ref -q HEAD)##refs/heads/}" branch="${$(git symbolic-ref -q HEAD)##refs/heads/}"
if [[ -n "$branch" ]]; then 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" zformat -f branch_formatted "$branch_format" "b:$branch"
# Format remote. # Format remote.
remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}" remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}"
if [[ -n "$remote" ]]; then 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" zformat -f remote_formatted "$remote_format" "R:$remote"
# Get ahead and behind counts. # Get ahead and behind counts.
@ -266,14 +266,14 @@ function git-info {
# Format ahead. # Format ahead.
ahead="$ahead_and_behind[(w)1]" ahead="$ahead_and_behind[(w)1]"
if (( $ahead > 0 )); then 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" zformat -f ahead_formatted "$ahead_format" "A:$ahead"
fi fi
# Format behind. # Format behind.
behind="$ahead_and_behind[(w)2]" behind="$ahead_and_behind[(w)2]"
if (( $behind > 0 )); then 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" zformat -f behind_formatted "$behind_format" "B:$behind"
fi fi
fi fi
@ -288,49 +288,49 @@ function git-info {
# Format added. # Format added.
if (( $added > 0 )); then 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" zformat -f added_formatted "$added_format" "a:$added_format"
fi fi
# Format deleted. # Format deleted.
if (( $deleted > 0 )); then 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" zformat -f deleted_formatted "$deleted_format" "d:$deleted_format"
fi fi
# Format modified. # Format modified.
if (( $modified > 0 )); then 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" zformat -f modified_formatted "$modified_format" "m:$modified"
fi fi
# Format renamed. # Format renamed.
if (( $renamed > 0 )); then 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" zformat -f renamed_formatted "$renamed_format" "r:$renamed"
fi fi
# Format unmerged. # Format unmerged.
if (( $unmerged > 0 )); then 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" zformat -f unmerged_formatted "$unmerged_format" "U:$unmerged"
fi fi
# Format untracked. # Format untracked.
if (( $untracked > 0 )); then 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" zformat -f untracked_formatted "$untracked_format" "u:$untracked"
fi fi
# Format dirty. # Format dirty.
if (( $dirty > 0 )); then 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" zformat -f dirty_formatted "$dirty_format" "D:$dirty"
fi fi
# Format prompts. # Format prompts.
zstyle -s ':omz:plugin:git:prompt' prompt 'prompt_format' zstyle -s ':omz:module:git:prompt' prompt 'prompt_format'
zstyle -s ':omz:plugin:git:prompt' rprompt 'rprompt_format' zstyle -s ':omz:module:git:prompt' rprompt 'rprompt_format'
git_info_vars=( git_info_vars=(
git_prompt_info "$prompt_format" git_prompt_info "$prompt_format"

0
plugins/git/functions/git-root → modules/git/functions/git-root

0
plugins/git/hub.zsh → modules/git/hub.zsh

2
plugins/git/init.zsh → modules/git/init.zsh

@ -5,7 +5,7 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# Source plugin files. # Source module files.
source "${0:h}/alias.zsh" source "${0:h}/alias.zsh"
source "${0:h}/hub.zsh" source "${0:h}/hub.zsh"
source "${0:h}/style.zsh" source "${0:h}/style.zsh"

64
modules/git/style.zsh

@ -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'

4
plugins/gnu-utils/README.md → modules/gnu-utils/README.md

@ -18,12 +18,12 @@ Settings
To use a different prefix, add the following to *zshrc*, and replace 'g' with To use a different prefix, add the following to *zshrc*, and replace 'g' with
the desired prefix: the desired prefix:
zstyle ':omz:plugin:gnu-utils' prefix 'g' zstyle ':omz:module:gnu-utils' prefix 'g'
Authors 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) - [Sorin Ionescu](/sorin-ionescu)

2
plugins/gnu-utils/init.zsh → modules/gnu-utils/init.zsh

@ -6,7 +6,7 @@
# #
# Get the prefix or use the default. # 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' _gnu_utils_prefix='g'
# Check for the presence of GNU Core Utilities. # Check for the presence of GNU Core Utilities.

0
plugins/gpg-agent/init.zsh → modules/gpg-agent/init.zsh

10
plugins/history-substring-search/README.md → modules/history-substring-search/README.md

@ -10,24 +10,24 @@ Settings
### Case Sensitivity ### 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*: *zshrc*:
zstyle ':omz:plugin:history-substring-search' case-sensitive 'yes' zstyle ':omz:module:history-substring-search' case-sensitive 'yes'
### Highlighting ### Highlighting
If colors are enabled, _history-substring-search_ will automatically highlight If colors are enabled, _history-substring-search_ will automatically highlight
positive results. 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 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) - [Sorin Ionescu](/sorin-ionescu)
- [Suraj N. Kurapati](/sunaku) - [Suraj N. Kurapati](/sunaku)

0
plugins/history-substring-search/external → modules/history-substring-search/external

4
plugins/history-substring-search/init.zsh → modules/history-substring-search/init.zsh

@ -8,11 +8,11 @@
source "${0:h}/external/zsh-history-substring-search.zsh" source "${0:h}/external/zsh-history-substring-search.zsh"
if zstyle -t ':omz:plugin:history-substring-search' case-sensitive; then if zstyle -t ':omz:module:history-substring-search' case-sensitive; then
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
fi fi
if ! zstyle -t ':omz:plugin:history-substring-search' color; then if ! zstyle -t ':omz:module:history-substring-search' color; then
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
fi fi

0
plugins/macports/init.zsh → modules/macports/init.zsh

0
plugins/node/functions/node-doc → modules/node/functions/node-doc

0
plugins/node/init.zsh → modules/node/init.zsh

2
plugins/osx/README.md → modules/osx/README.md

@ -22,7 +22,7 @@ Functions
Authors 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) - [Sorin Ionescu](/sorin-ionescu)

0
plugins/osx/functions/manb → modules/osx/functions/manb

0
plugins/osx/functions/manp → modules/osx/functions/manp

0
plugins/osx/functions/pfd → modules/osx/functions/pfd

0
plugins/osx/functions/pfs → modules/osx/functions/pfs

0
plugins/osx/functions/tab → modules/osx/functions/tab

0
plugins/osx/functions/trash → modules/osx/functions/trash

0
plugins/osx/init.zsh → modules/osx/init.zsh

0
plugins/pacman/functions/pacdisowned → modules/pacman/functions/pacdisowned

0
plugins/pacman/functions/paclist → modules/pacman/functions/paclist

0
plugins/pacman/init.zsh → modules/pacman/init.zsh

0
plugins/perl/completions/_prep → modules/perl/completions/_prep

0
plugins/perl/completions/_psub → modules/perl/completions/_psub

0
plugins/perl/functions/prep → modules/perl/functions/prep

0
plugins/perl/functions/psub → modules/perl/functions/psub

0
plugins/perl/init.zsh → modules/perl/init.zsh

0
plugins/python/init.zsh → modules/python/init.zsh

0
plugins/rails/init.zsh → modules/rails/init.zsh

0
plugins/rsync/init.zsh → modules/rsync/init.zsh

0
plugins/ruby/init.zsh → modules/ruby/init.zsh

4
plugins/screen/README.md → modules/screen/README.md

@ -19,12 +19,12 @@ Start a Screen session automatically when Zsh is launched.
To enable this feature, add the following line to *zshrc*: To enable this feature, add the following line to *zshrc*:
zstyle ':omz:plugin:screen' auto-start 'yes' zstyle ':omz:module:screen' auto-start 'yes'
Authors 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) - [Sorin Ionescu](/sorin-ionescu)

2
plugins/screen/init.zsh → modules/screen/init.zsh

@ -11,7 +11,7 @@ alias sn="screen -U -S"
alias sr="screen -a -A -U -D -R" alias sr="screen -a -A -U -D -R"
# Auto Start # Auto Start
if [[ -z "$STY" ]] && zstyle -t ':omz:plugin:screen' auto-start; then if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
session="$( session="$(
screen -list 2> /dev/null \ screen -list 2> /dev/null \
| sed '1d;$d' \ | sed '1d;$d' \

8
plugins/ssh-agent/init.zsh → modules/ssh-agent/init.zsh

@ -13,11 +13,11 @@
# Usage: # Usage:
# To enable agent forwarding, add the following to your .zshrc: # To enable agent forwarding, add the following to your .zshrc:
# #
# zstyle ':omz:plugin:ssh-agent' forwarding 'yes' # zstyle ':omz:module:ssh-agent' forwarding 'yes'
# #
# To load multiple identities, add the following to your .zshrc: # To load multiple identities, add the following to your .zshrc:
# #
# zstyle ':omz:plugin:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github' # zstyle ':omz:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
# #
if (( ! $+commands[ssh-agent] )); then if (( ! $+commands[ssh-agent] )); then
@ -37,7 +37,7 @@ function _ssh-agent-start {
source "${_ssh_agent_env}" > /dev/null source "${_ssh_agent_env}" > /dev/null
# Load identities. # Load identities.
zstyle -a ':omz:plugin:ssh-agent' identities 'identities' zstyle -a ':omz:module:ssh-agent' identities 'identities'
if (( ${#identities} > 0 )); then if (( ${#identities} > 0 )); then
ssh-add "${HOME}/.ssh/${^identities[@]}" ssh-add "${HOME}/.ssh/${^identities[@]}"
@ -47,7 +47,7 @@ function _ssh-agent-start {
} }
# Test if agent-forwarding is enabled. # Test if agent-forwarding is enabled.
zstyle -b ':omz:plugin:ssh-agent' forwarding '_ssh_agent_forwarding' zstyle -b ':omz:module:ssh-agent' forwarding '_ssh_agent_forwarding'
if is-true "${_ssh_agent_forwarding}" && [[ -n "$SSH_AUTH_SOCK" ]]; then if is-true "${_ssh_agent_forwarding}" && [[ -n "$SSH_AUTH_SOCK" ]]; then
# Add a nifty symlink for screen/tmux if agent forwarding. # Add a nifty symlink for screen/tmux if agent forwarding.
[[ -L "$SSH_AUTH_SOCK" ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen [[ -L "$SSH_AUTH_SOCK" ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen

0
plugins/syntax-highlighting/external → modules/syntax-highlighting/external

2
plugins/syntax-highlighting/init.zsh → modules/syntax-highlighting/init.zsh

@ -5,7 +5,7 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
if zstyle -t ':omz:plugin:syntax-highlighting' color; then if zstyle -t ':omz:module:syntax-highlighting' color; then
source "${0:h}/external/zsh-syntax-highlighting.zsh" source "${0:h}/external/zsh-syntax-highlighting.zsh"
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor) ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
fi fi

6
plugins/tmux/README.md → modules/tmux/README.md

@ -18,12 +18,12 @@ Start a tmux session automatically when Zsh is launched.
To enable this feature, add the following line to *zshrc*: To enable this feature, add the following line to *zshrc*:
zstyle ':omz:plugin:tmux' auto-start 'yes' zstyle ':omz:module:tmux' auto-start 'yes'
It will create a background session named _#OMZ_ and attach every new shell to It will create a background session named _#OMZ_ and attach every new shell to
it. it.
To avoid keeping open sessions, this plugin sets `destroy-unattached off` on To avoid keeping open sessions, this module sets `destroy-unattached off` on
the background session and `destroy-unattached on` on every other session the background session and `destroy-unattached on` on every other session
(global setting). (global setting).
@ -36,7 +36,7 @@ OMZ has already been opened [here][2].
Authors Authors
------- -------
*The authors of this plugin should be contacted via the github bug tracker.* *The authors of this module should be contacted via the github bug tracker.*
- [Sorin Ionescu](/sorin-ionescu) - [Sorin Ionescu](/sorin-ionescu)
- [Colin Hebert](/ColinHebert) - [Colin Hebert](/ColinHebert)

2
plugins/tmux/init.zsh → modules/tmux/init.zsh

@ -11,7 +11,7 @@ alias ta="tmux attach-session"
alias tl="tmux list-sessions" alias tl="tmux list-sessions"
# Auto Start # Auto Start
if [[ -z "$TMUX" ]] && zstyle -t ':omz:plugin:tmux' auto-start; then if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
tmux_session='#OMZ' tmux_session='#OMZ'
if ! tmux has-session -t "$tmux_session" 2> /dev/null; then if ! tmux has-session -t "$tmux_session" 2> /dev/null; then

2
plugins/wakeonlan/README → modules/wakeonlan/README

@ -1,4 +1,4 @@
This plugin provides a wrapper around the "wakeonlan" tool available from most This module provides a wrapper around the "wakeonlan" tool available from most
distributions' package repositories, or from the following website: distributions' package repositories, or from the following website:
http://gsd.di.uminho.pt/jpo/software/wakeonlan/ http://gsd.di.uminho.pt/jpo/software/wakeonlan/

0
plugins/wakeonlan/completions/_wake → modules/wakeonlan/completions/_wake

0
plugins/wakeonlan/functions/wake → modules/wakeonlan/functions/wake

0
plugins/yum/init.zsh → modules/yum/init.zsh

0
plugins/z/init.zsh → modules/z/init.zsh

64
plugins/git/style.zsh

@ -1,64 +0,0 @@
#
# Defines Git information display styles.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# %s - Special action name (am, merge, rebase).
zstyle ':omz:plugin:git:prompt' action 'action:%s'
# %a - Indicator to notify of added files.
zstyle ':omz:plugin:git:prompt' added 'added:%a'
# %A - Indicator to notify of ahead branch.
zstyle ':omz:plugin:git:prompt' ahead 'ahead:%A'
# %B - Indicator to notify of behind branch.
zstyle ':omz:plugin:git:prompt' behind 'behind:%B'
# %b - Branch name.
zstyle ':omz:plugin:git:prompt' branch 'branch:%b'
# %c - SHA-1 hash.
zstyle ':omz:plugin:git:prompt' commit 'commit:%c'
# %d - Indicator to notify of deleted files.
zstyle ':omz:plugin:git:prompt' deleted 'deleted:%d'
# %D - Indicator to notify of dirty files.
zstyle ':omz:plugin:git:prompt' dirty 'dirty:%D'
# %m - Indicator to notify of modified files.
zstyle ':omz:plugin:git:prompt' modified 'modified:%m'
# %p - HEAD position in relation to the nearest branch, remote, tag.
zstyle ':omz:plugin:git:prompt' position 'position:%p'
# %R - Remote name.
zstyle ':omz:plugin:git:prompt' remote 'remote:%R'
# %r - Indicator to notify of renamed files.
zstyle ':omz:plugin:git:prompt' renamed 'renamed:%r'
# %S - Indicator to notify of stashed files.
zstyle ':omz:plugin:git:prompt' stashed 'stashed:%S'
# %U - Indicator to notify of unmerged files.
zstyle ':omz:plugin:git:prompt' unmerged 'unmerged:%U'
# %u - Indicator to notify of untracked files.
zstyle ':omz:plugin:git:prompt' untracked 'untracked:%u'
# Left prompt.
zstyle ':omz:plugin:git:prompt' prompt ' git:(%b %D)'
# Right prompt.
zstyle ':omz:plugin:git:prompt' rprompt ''
# Ignore submodule.
zstyle ':omz:plugin:git:prompt:ignore' submodule 'no'
# Ignore submodule when it is 'dirty', 'untracked', 'all', or 'none'.
zstyle ':omz:plugin:git:prompt:ignore:submodule' when 'all'

8
templates/zshrc

@ -21,13 +21,13 @@ zstyle ':omz:*:*' color 'yes'
zstyle ':omz:terminal' auto-title 'yes' zstyle ':omz:terminal' auto-title 'yes'
# Set the Zsh modules to load (man zshmodules). # Set the Zsh modules to load (man zshmodules).
# zstyle ':omz:load' module 'attr' 'stat' # zstyle ':omz:load' zmodule 'attr' 'stat'
# Set the Zsh functions to load (man zshcontrib). # Set the Zsh functions to load (man zshcontrib).
# zstyle ':omz:load' function 'zargs' 'zmv' # zstyle ':omz:load' zfunction 'zargs' 'zmv'
# Set the plugins to load (browse plugins). # Set the Oh My Zsh modules to load (browse modules).
zstyle ':omz:load' plugin 'archive' 'git' zstyle ':omz:load' omodule 'archive' 'git'
# Set the prompt theme to load. # Set the prompt theme to load.
# Setting it to 'random' loads a random theme. # Setting it to 'random' loads a random theme.

31
themes/sorin/prompt_sorin_setup

@ -28,21 +28,21 @@ function prompt_sorin_setup {
zstyle ':omz:editor' completing '%B%F{red}...%f%b' zstyle ':omz:editor' completing '%B%F{red}...%f%b'
zstyle ':omz:prompt:vi' insert '' zstyle ':omz:prompt:vi' insert ''
zstyle ':omz:prompt:vi' command ' %F{yellow}❮%f%B%F{red}❮%f%b%F{red}❮%f' zstyle ':omz:prompt:vi' command ' %F{yellow}❮%f%B%F{red}❮%f%b%F{red}❮%f'
zstyle ':omz:plugin:git:prompt' action ':%%B%F{yellow}%s%f%%b' zstyle ':omz:module:git:prompt' action ':%%B%F{yellow}%s%f%%b'
zstyle ':omz:plugin:git:prompt' added ' %%B%F{green}✚%f%%b' zstyle ':omz:module:git:prompt' added ' %%B%F{green}✚%f%%b'
zstyle ':omz:plugin:git:prompt' ahead ' %%B%F{yellow}⬆%f%%b' zstyle ':omz:module:git:prompt' ahead ' %%B%F{yellow}⬆%f%%b'
zstyle ':omz:plugin:git:prompt' behind ' %%B%F{yellow}⬇%f%%b' zstyle ':omz:module:git:prompt' behind ' %%B%F{yellow}⬇%f%%b'
zstyle ':omz:plugin:git:prompt' branch ':%F{red}%b%f' zstyle ':omz:module:git:prompt' branch ':%F{red}%b%f'
zstyle ':omz:plugin:git:prompt' commit ':%F{green}%.7c%f' zstyle ':omz:module:git:prompt' commit ':%F{green}%.7c%f'
zstyle ':omz:plugin:git:prompt' deleted ' %%B%F{red}✖%f%%b' zstyle ':omz:module:git:prompt' deleted ' %%B%F{red}✖%f%%b'
zstyle ':omz:plugin:git:prompt' modified ' %%B%F{blue}✱%f%%b' zstyle ':omz:module:git:prompt' modified ' %%B%F{blue}✱%f%%b'
zstyle ':omz:plugin:git:prompt' position ':%F{green}%p%f' zstyle ':omz:module:git:prompt' position ':%F{green}%p%f'
zstyle ':omz:plugin:git:prompt' renamed ' %%B%F{magenta}➜%f%%b' zstyle ':omz:module:git:prompt' renamed ' %%B%F{magenta}➜%f%%b'
zstyle ':omz:plugin:git:prompt' stashed ' %%B%F{cyan}✭%f%%b' zstyle ':omz:module:git:prompt' stashed ' %%B%F{cyan}✭%f%%b'
zstyle ':omz:plugin:git:prompt' unmerged ' %%B%F{yellow}═%f%%b' zstyle ':omz:module:git:prompt' unmerged ' %%B%F{yellow}═%f%%b'
zstyle ':omz:plugin:git:prompt' untracked ' %%B%F{white}◼%f%%b' zstyle ':omz:module:git:prompt' untracked ' %%B%F{white}◼%f%%b'
zstyle ':omz:plugin:git:prompt' prompt ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s' zstyle ':omz:module:git:prompt' prompt ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s'
zstyle ':omz:plugin:git:prompt' rprompt '%A%B%S%a%d%m%r%U%u' zstyle ':omz:module:git:prompt' rprompt '%A%B%S%a%d%m%r%U%u'
PROMPT='%F{cyan}%1~%f${(e)git_prompt_info} %(!.%B%F{red}#%f%b.%B%F{green}❯%f%b) ' PROMPT='%F{cyan}%1~%f${(e)git_prompt_info} %(!.%B%F{red}#%f%b.%B%F{green}❯%f%b) '
RPROMPT='${vi_prompt_info}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_rprompt_info}' RPROMPT='${vi_prompt_info}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_rprompt_info}'
@ -50,4 +50,3 @@ function prompt_sorin_setup {
} }
prompt_sorin_setup "$@" prompt_sorin_setup "$@"

Loading…
Cancel
Save