From c861430d3e8ff202b84b2a89c3caa6e414e2f8c1 Mon Sep 17 00:00:00 2001 From: Chenje Katanda Date: Thu, 13 Oct 2016 17:33:44 -0400 Subject: [PATCH 1/6] readme change OS X to macOS Change OS X to macOS in the read me file in line with apples rebranding of the operating system. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6da731890..2b0856c2d 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://t ### Prerequisites -__Disclaimer:__ _Oh My Zsh works best on OS X and Linux._ +__Disclaimer:__ _Oh My Zsh works best on macOS and Linux._ -* Unix-based operating system (OS X or Linux) +* Unix-based operating system (macOS or Linux) * [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) * `curl` or `wget` should be installed * `git` should be installed From 015598b8a82457a03ab9d75f770bbd333599a601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 10 Oct 2016 20:33:40 +0200 Subject: [PATCH 2/6] Display suvash prompt w/o Ruby; refactor code --- themes/suvash.zsh-theme | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/themes/suvash.zsh-theme b/themes/suvash.zsh-theme index c87f64558..1680973df 100644 --- a/themes/suvash.zsh-theme +++ b/themes/suvash.zsh-theme @@ -5,26 +5,30 @@ function prompt_char { } function virtualenv_info { - [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' + [[ -n "$VIRTUAL_ENV" ]] && echo '('${VIRTUAL_ENV:t}') ' } -function collapse_pwd { - echo $(pwd | sed -e "s,^$HOME,~,") +function ruby_prompt { + if (( $+commands[rvm-prompt] )); then + print -n $ZSH_THEME_RUBY_PROMPT_PREFIX + print -n $(~/.rvm/bin/rvm-prompt) + print -n $ZSH_THEME_RUBY_PROMPT_SUFFIX + elif (( $+commands[rbenv] )); then + print -n $ZSH_THEME_RUBY_PROMPT_PREFIX + print -n $(rbenv version | sed -e "s/ (set.*$//") + print -n $ZSH_THEME_RUBY_PROMPT_SUFFIX + fi + return 0 } -if which rvm-prompt &> /dev/null; then - PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} -$(virtualenv_info)$(prompt_char) ' -else - if which rbenv &> /dev/null; then - PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%} -$(virtualenv_info)$(prompt_char) ' - fi -fi +PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)$(ruby_prompt) +$(virtualenv_info) $(prompt_char) ' +ZSH_THEME_GIT_PROMPT_PREFIX=' on %F{magenta}' +ZSH_THEME_GIT_PROMPT_SUFFIX='%f' +ZSH_THEME_GIT_PROMPT_DIRTY='%F{green}!' +ZSH_THEME_GIT_PROMPT_UNTRACKED='%F{green}?' +ZSH_THEME_GIT_PROMPT_CLEAN='' -ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" -ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_RUBY_PROMPT_PREFIX=' using %F{red}' +ZSH_THEME_RUBY_PROMPT_SUFFIX='%f' From cff228e342a797b6ac0da7edb431f5f66de79ae4 Mon Sep 17 00:00:00 2001 From: Jocelyn Thode Date: Sat, 15 Oct 2016 14:02:01 +0200 Subject: [PATCH 3/6] Update bira theme (#4954) * Add '#' instead of '$' when in root * Make return code bold --- themes/bira.zsh-theme | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme index 1ead93553..4b2853c32 100644 --- a/themes/bira.zsh-theme +++ b/themes/bira.zsh-theme @@ -4,8 +4,10 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" if [[ $UID -eq 0 ]]; then local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}' + local user_symbol='#' else local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' + local user_symbol='$' fi local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' @@ -20,8 +22,9 @@ fi local git_branch='$(git_prompt_info)%{$reset_color%}' PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} -╰─%B$%b " -RPS1="${return_code}" +╰─%B${user_symbol}%b " +RPS1="%B${return_code}%b" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" + From 5cd7ad38cbb691c70377b5c82d3de5b0af076164 Mon Sep 17 00:00:00 2001 From: kennyklee Date: Mon, 17 Oct 2016 01:00:14 -0700 Subject: [PATCH 4/6] Fix regex for optional http(s), and variable reference inside osascript. --- plugins/droplr/droplr.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/droplr/droplr.plugin.zsh b/plugins/droplr/droplr.plugin.zsh index 296a8b98b..af0a21299 100644 --- a/plugins/droplr/droplr.plugin.zsh +++ b/plugins/droplr/droplr.plugin.zsh @@ -7,8 +7,8 @@ droplr() { return 1 fi - if [[ "$1" =~ ^http[|s]:// ]]; then - osascript -e "tell app 'Droplr' to shorten '$1'" + if [[ "$1" =~ ^https?:// ]]; then + osascript -e 'tell app "Droplr" to shorten "'"$1"'"' else open -ga /Applications/Droplr.app "$1" fi From 7d8618ec9a3a311a8df3cd2062e7fb2277fb8604 Mon Sep 17 00:00:00 2001 From: Sayalee Pote Date: Tue, 18 Oct 2016 00:57:58 +0530 Subject: [PATCH 5/6] Update README with grammar corrections (#5503) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2b0856c2d..c304c75d3 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Oh My Zsh comes with a shit load of plugins to take advantage of. You can take a #### Enabling Plugins -If you spot a plugin (or several) that you would like to use with Oh My Zsh, you will need to edit the `~/.zshrc` file. Once you open it with your favorite editor, you'll see a spot to list all the plugins that you'd like Oh My Zsh to load in initialization. +If you spot a plugin (or several) that you would like to use with Oh My Zsh, you will need to edit the `~/.zshrc` file. Once you open it with your favorite editor, you'll see a spot to list all the plugins that you'd like Oh My Zsh to load on initialization. For example, this line might begin to look like... @@ -67,7 +67,7 @@ We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme #### Selecting a Theme -_Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just right (for him)._ +_Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just the right one (for him)._ Once you find a theme that you want to use, you will need to edit the `~/.zshrc` file. You'll see an environment variable (all caps) in there that looks like: @@ -81,7 +81,7 @@ To use a different theme, simply change the value to match the name of your desi ZSH_THEME="agnoster" # (this is one of the fancy ones) ``` -Open up a new terminal window and your prompt should look something like... +Open up a new terminal window and your prompt should look something like this: ![Agnoster theme](https://cloud.githubusercontent.com/assets/2618447/6316862/70f58fb6-ba03-11e4-82c9-c083bf9a6574.png) @@ -129,7 +129,7 @@ cp ~/.zshrc ~/.zshrc.orig ##### 3. Create a new zsh configuration file -You can create a new zsh config file by copying the template that we included for you. +You can create a new zsh config file by copying the template that we have included for you. ```shell cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc @@ -208,7 +208,7 @@ Thank you so much! ## Follow Us -We're on the social medias. +We're on the social media. * [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. You should follow it. * [Oh My Zsh](https://www.facebook.com/Oh-My-Zsh-296616263819290/) on Facebook. From f94d4e6a4019ed7fcc5470655b1154b3d1f67913 Mon Sep 17 00:00:00 2001 From: Mason Date: Tue, 18 Oct 2016 13:42:27 -0500 Subject: [PATCH 6/6] Change from OSX to macOS in README (#5545) --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index ed258f0ea..a7de646f2 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -53,7 +53,7 @@ done # Figure out the SHORT hostname if [[ "$OSTYPE" = darwin* ]]; then - # OS X's $HOST changes with dhcp, etc. Use ComputerName if possible. + # macOS's $HOST changes with dhcp, etc. Use ComputerName if possible. SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/} else SHORT_HOST=${HOST/.*/}