Commit f4c442e7d64286914a09505770f3888be768622c

Authored by mj
1 parent 4f87835bac
Exists in master and in 1 other branch 02-merge

Squashed 'repos/robbyrussell/oh-my-zsh/' changes from e44aa50..22632aa

22632aa Merge pull request #3859 from gnagy/master
249d222 Cleanup gradle plugin file
950bbcc gradle plugin: also list tasks in subprojects
64e1252 Merge pull request #4623 from apjanke/dircycle-remove-redundant-bindings
5d8fd93 Merge pull request #4617 from ahmadawais/patch-1
7627004 Merge pull request #4612 from stereodenis/patch-1
5289edc Merge pull request #4592 from jstnlef/fix-weird-unstaged-behavior
c120417 Merge pull request #4619 from apjanke/mercurial-readme-tweak
c8e280f dircycle: remove redundant key bindings
8f823c6 Update README.md
cca422e Mercurial plugin: revise README
602cc62 Removed Similar Aliases
bee79f0 bundle outdated alias
135c376 Merge pull request #4563 from danhawkins/master
9041a23 Merge pull request #4598 from syk0saje/patch-1
06db648 typo: able take -> able to take
76c4238 I noticed that for certain projects with unstaged changed I would get a 'U' character instead of the '●' character. This should fix that.
8d388e4 use capit instead of shipit as shipit conflicts with npm package shipit

git-subtree-dir: repos/robbyrussell/oh-my-zsh
git-subtree-split: 22632aac7c99e02ec38223c84b2348435a82d1b5

Showing 10 changed files with 39 additions and 64 deletions Side-by-side Diff

... ... @@ -3,7 +3,7 @@
3 3  
4 4 Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again.
5 5  
6   -__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interact with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often.
  6 +__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interact with your command prompt, you'll be able to take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often.
7 7  
8 8 To learn more, visit [ohmyz.sh](http://ohmyz.sh) and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on Twitter.
9 9  
plugins/bundler/bundler.plugin.zsh
... ... @@ -2,6 +2,7 @@ alias be="bundle exec"
2 2 alias bl="bundle list"
3 3 alias bp="bundle package"
4 4 alias bo="bundle open"
  5 +alias bout="bundle outdated"
5 6 alias bu="bundle update"
6 7 alias bi="bundle_install"
7 8 alias bcn="bundle clean"
plugins/capistrano/_capistrano
1   -#compdef shipit
  1 +#compdef capit
2 2 #autoload
3 3  
4   -# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work.
  4 +# Added `capit` because `cap` is a reserved word. `cap` completion doesn't work.
5 5 # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
6 6  
7 7 local curcontext="$curcontext" state line ret=1
... ... @@ -14,7 +14,7 @@ _arguments -C \
14 14 _cap_tasks() {
15 15 if [[ -f config/deploy.rb || -f Capfile ]]; then
16 16 if [[ ! -f .cap_tasks~ ]]; then
17   - shipit --tasks | sed 's/\(\[\)\(.*\)\(\]\)/:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\:", command); print command"["$0"]"}' > .cap_tasks~
  17 + capit --tasks | sed 's/\(\[\)\(.*\)\(\]\)/:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\:", command); print command"["$0"]"}' > .cap_tasks~
18 18 fi
19 19  
20 20 OLD_IFS=$IFS
plugins/capistrano/capistrano.plugin.zsh
1 1 # Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work.
2 2 # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
3 3  
4   -func shipit() {
  4 +func capit() {
5 5 if [ -f Gemfile ]
6 6 then
7 7 bundle exec cap $*
plugins/dircycle/dircycle.plugin.zsh
... ... @@ -27,11 +27,11 @@ insert-cycledright () {
27 27 zle -N insert-cycledright
28 28  
29 29  
30   -# add key bindings for iTerm2
31   -if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
32   - bindkey "^[[1;6D" insert-cycledleft
33   - bindkey "^[[1;6C" insert-cycledright
34   -else
35   - bindkey "\e[1;6D" insert-cycledleft
36   - bindkey "\e[1;6C" insert-cycledright
37   -fi
38 30 \ No newline at end of file
  31 +# These sequences work for xterm, Apple Terminal.app, and probably others.
  32 +# Not for rxvt-unicode, but it doesn't seem differentiate Ctrl-Shift-Arrow
  33 +# from plain Shift-Arrow, at least by default.
  34 +# iTerm2 does not have these key combinations defined by default; you will need
  35 +# to add them under "Keys" in your profile if you want to use this. You can do
  36 +# this conveniently by loading the "xterm with Numeric Keypad" preset.
  37 +bindkey "\e[1;6D" insert-cycledleft
  38 +bindkey "\e[1;6C" insert-cycledright
plugins/gradle/gradle.plugin.zsh
1   -#!zsh
2 1 ##############################################################################
3 2 # A descriptive listing of core Gradle commands
4 3 ############################################################################
... ... @@ -54,22 +53,11 @@ function _gradle_arguments() {
54 53  
55 54  
56 55 ##############################################################################
57   -# Are we in a directory containing a build.gradle file?
58   -############################################################################
59   -function in_gradle() {
60   - if [[ -f build.gradle ]]; then
61   - echo 1
62   - fi
63   -}
64   -
65   -############################################################################## Examine the build.gradle file to see if its
66   -# timestamp has changed, and if so, regen
67   -# the .gradle_tasks cache file
  56 +# Examine the build.gradle file to see if its timestamp has changed;
  57 +# and if so, regenerate the .gradle_tasks cache file
68 58 ############################################################################
69 59 _gradle_does_task_list_need_generating () {
70   - [ ! -f .gradletasknamecache ] && return 0;
71   - [ build.gradle -nt .gradletasknamecache ] && return 0;
72   - return 1;
  60 + [[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache ]]
73 61 }
74 62  
75 63  
... ... @@ -77,22 +65,22 @@ _gradle_does_task_list_need_generating () {
77 65 # Discover the gradle tasks by running "gradle tasks --all"
78 66 ############################################################################
79 67 _gradle_tasks () {
80   - if [ in_gradle ]; then
  68 + if [[ -f build.gradle ]]; then
81 69 _gradle_arguments
82 70 if _gradle_does_task_list_need_generating; then
83   - gradle tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
  71 + gradle tasks --all | awk '/[a-zA-Z0-9:-]* - / {print $1}' > .gradletasknamecache
84 72 fi
85   - compadd -X "==== Gradle Tasks ====" `cat .gradletasknamecache`
  73 + compadd -X "==== Gradle Tasks ====" $(cat .gradletasknamecache)
86 74 fi
87 75 }
88 76  
89 77 _gradlew_tasks () {
90   - if [ in_gradle ]; then
  78 + if [[ -f build.gradle ]]; then
91 79 _gradle_arguments
92 80 if _gradle_does_task_list_need_generating; then
93   - ./gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
  81 + ./gradlew tasks --all | awk '/[a-zA-Z0-9:-]* - / {print $1}' > .gradletasknamecache
94 82 fi
95   - compadd -X "==== Gradlew Tasks ====" `cat .gradletasknamecache`
  83 + compadd -X "==== Gradlew Tasks ====" $(cat .gradletasknamecache)
96 84 fi
97 85 }
98 86  
... ... @@ -102,13 +90,3 @@ _gradlew_tasks () {
102 90 ############################################################################
103 91 compdef _gradle_tasks gradle
104 92 compdef _gradlew_tasks gradlew
105   -
106   -
107   -##############################################################################
108   -# Open questions for future improvements:
109   -# 1) Should 'gradle tasks' use --all or just the regular set?
110   -# 2) Should gradlew use the same approach as gradle?
111   -# 3) Should only the " - " be replaced with a colon so it can work
112   -# with the richer descriptive method of _arguments?
113   -# gradle tasks | grep "^[a-zA-Z0-9]*\ -\ " | sed "s/ - /\:/"
114   -#############################################################################
plugins/mercurial/README.md
... ... @@ -2,23 +2,20 @@
2 2 ### Usage
3 3 Update .zshrc:
4 4  
5   -1. Add name to the list of plugins, e.g. `plugins = (..., mercurial, ...)`
  5 +1. Add name to the list of plugins, e.g. `plugins=(... mercurial ...)`
6 6 (that is pretty obvious).
7   -2. Change PROMPT variable of current theme to contain current folder mercurial repo info:
  7 +2. Switch to a theme which uses `hg_prompt_info`.
8 8  
9   - robbyrussel theme is used by default, so you need to modify PROMPT var
10   - from [this file](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme)
11   - by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so currently it
12   - looks next:
  9 + Or, customize the `$PROMPT` variable of your current theme to contain current folder mercurial repo info. This can be done by putting a custom version of the theme in `$ZSH_CUSTOM` or by changing `$PROMPT` in `.zshrc` after loading the theme.
13 10  
14   - ```diff
15   - - PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
16   - + PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
  11 + The `robbyrussell` theme is used by default, so you need to modify `$PROMPT` var by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so it looks like this:
  12 +
  13 + ```zsh
  14 + PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
17 15 ```
18   -
19   - and put modified var at the end of **.zshrc**.
  16 +
20 17 3. Initialize additional vars used in plugin. So in short put next in **.zshrc**:
21   -
  18 +
22 19 ```
23 20 ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[magenta]%}hg:(%{$fg[red]%}"
24 21 ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
... ... @@ -55,8 +52,7 @@ Update .zshrc:
55 52 #### Displays repo branch and directory status in prompt
56 53 This is the same as git plugin does.
57 54  
58   -**Note**: additional changes to **.zshrc** are required in order for this to
59   -work.
  55 +**Note**: Additional changes to **.zshrc**, or using a theme designed to use `hg_prompt_info`, are required in order for this to work.
60 56  
61 57 ### Mantainers
62 58 [ptrv](https://github.com/ptrv) - original creator
plugins/wp-cli/README.md
... ... @@ -43,7 +43,7 @@ WP-CLI is a set of command-line tools for managing WordPress installations. You
43 43 - wpps='search'
44 44 - wppst='status'
45 45 - wppt='toggle'
46   -- wppu='uninstall'
  46 +- wppun='uninstall'
47 47 - wppu='update'
48 48  
49 49 ### Post
... ... @@ -55,7 +55,7 @@ WP-CLI is a set of command-line tools for managing WordPress installations. You
55 55 - wppol='wp post list'
56 56 - wppom='wp post meta'
57 57 - wppou='wp post update'
58   -- wppou='wp post url'
  58 +- wppourl='wp post url'
59 59  
60 60 ### Sidebar
61 61 - wpsbl='wp sidebar list'
plugins/wp-cli/wp-cli.plugin.zsh
... ... @@ -63,7 +63,7 @@ alias wppp='wp plugin path'
63 63 alias wpps='wp plugin search'
64 64 alias wppst='wp plugin status'
65 65 alias wppt='wp plugin toggle'
66   -alias wppu='wp plugin uninstall'
  66 +alias wppun='wp plugin uninstall'
67 67 alias wppu='wp plugin update'
68 68  
69 69 # Post
... ... @@ -75,7 +75,7 @@ alias wppog='wp post get'
75 75 alias wppol='wp post list'
76 76 alias wppom='wp post meta'
77 77 alias wppou='wp post update'
78   -alias wppou='wp post url'
  78 +alias wppourl='wp post url'
79 79  
80 80 # Rewrite
81 81  
themes/agnoster.zsh-theme
... ... @@ -36,7 +36,7 @@ CURRENT_BG='NONE'
36 36 local LC_ALL="" LC_CTYPE="en_US.UTF-8"
37 37 # NOTE: This segment separator character is correct. In 2012, Powerline changed
38 38 # the code points they use for their special characters. This is the new code point.
39   - # If this is not working for you, you probably have an old version of the
  39 + # If this is not working for you, you probably have an old version of the
40 40 # Powerline-patched fonts installed. Download and install the new version.
41 41 # Do not submit PRs to change this unless you have reviewed the Powerline code point
42 42 # history and have new information.
... ... @@ -118,7 +118,7 @@ prompt_git() {
118 118 zstyle ':vcs_info:*' get-revision true
119 119 zstyle ':vcs_info:*' check-for-changes true
120 120 zstyle ':vcs_info:*' stagedstr '✚'
121   - zstyle ':vcs_info:git:*' unstagedstr '●'
  121 + zstyle ':vcs_info:*' unstagedstr '●'
122 122 zstyle ':vcs_info:*' formats ' %u%c'
123 123 zstyle ':vcs_info:*' actionformats ' %u%c'
124 124 vcs_info