Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (102 commits)
  virtualenvwrapper: Replace "realpath" with portable zsh-native `:A` and `:h` modifiers
  Plugin now uses completion script from docker-compose repo.
  git plugin: fix ggl to avoid empty string see ohmyzsh#2790 (comment)
  Fix plugin/git ggpull and ggpush backward compatibility
  Fix merge conflict for jira-prefix and jira add comment
  Add missing space causing parse error.
  Fixed odd chars on mac for agnoster theme
  Add mix-fast plugin (similar to rake-fast)
  Update _docker
  Adding quotes to git completion discovery path
  A paver (Python build and configuration utility) plugin
  Revert "Added migration notification for rails plugin"
  Added github in web_search plugin.
  last-working-dir working with spaces in dirnames
  use local options to set no_equals before sourcing bash completion script
  git plugin: new/changed aliases gaa was brought back by popular demand — see ohmyzsh#3535 gap was replaced with gapa — see ohmyzsh#3682 gdc was replaced with gdca — see ohmyzsh#3977
  Add reference to bundler plugin issue in README
  Add `leaves` command to `brew` completion
  remove trash command from osx plugin
  Added README.md file for ForkLift plugin
  ...
  • Loading branch information
lesterchan committed Jul 19, 2015
2 parents 5b2891f + a207a38 commit 06874ef
Show file tree
Hide file tree
Showing 79 changed files with 2,316 additions and 941 deletions.
14 changes: 8 additions & 6 deletions README.markdown
Expand Up @@ -15,21 +15,21 @@ To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com
__Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._

* Unix-based operating system (Mac OS X or Linux)
* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent)
* This is commonly pre-installed. (`zsh --version` to confirm)
* [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

### Basic Installation

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`.

#### via curl

`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh`
`sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"`

#### via wget

`wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh`
`sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"`

## Using Oh My Zsh

Expand All @@ -51,7 +51,7 @@ Most plugins (should! we're working on this) include a __README__, which documen

### Themes

We'll admit it. Early in the Oh My Zsh world... we may have gotten a far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out!
We'll admit it. Early in the Oh My Zsh world... we may have gotten far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out!

#### Selecting a Theme

Expand All @@ -67,6 +67,8 @@ To use a different theme, simple change the value to match the name of your desi

Open up a new terminal window and your prompt should look something like...

In case you did not find a suitable theme for your needs, please have a look at the wiki for [more themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes).

## Advanced Topics

If you're the type that likes to get their hands dirty... these sections might resonate.
Expand Down Expand Up @@ -154,7 +156,7 @@ We also need people to test out pull-requests. So take a look through [the open

### Do NOT Send Us Themes

We have (more than) enough themes for the time being. Please fork the project and add one in there – you can let people know how to grab it from there.
We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page.

## Contributors

Expand Down
7 changes: 6 additions & 1 deletion lib/completion.zsh
Expand Up @@ -13,7 +13,12 @@ if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
unset CASE_SENSITIVE
else
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
if [ "x$HYPHEN_INSENSITIVE" = "xtrue" ]; then
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
unset HYPHEN_INSENSITIVE
else
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
fi
fi

zstyle ':completion:*' list-colors ''
Expand Down
50 changes: 38 additions & 12 deletions lib/git.zsh
Expand Up @@ -36,24 +36,27 @@ git_remote_status() {
ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)

if [ $ahead -eq 0 ] && [ $behind -gt 0 ]
if [ $ahead -gt 0 ] && [ $behind -eq 0 ]
then
echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
elif [ $behind -gt 0 ] && [ $ahead -eq 0 ]
then
echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
elif [ $ahead -gt 0 ] && [ $behind -gt 0 ]
then
echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
fi
fi
}

# Checks if there are commits ahead from remote
function git_prompt_ahead() {
if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
if [ $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]
then
git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX"
fi

echo $git_remote_status
fi
}

# Gets the number of commits ahead from remote
Expand All @@ -64,6 +67,29 @@ function git_commits_ahead() {
fi
}

# Outputs if current branch is ahead of remote
function git_prompt_ahead() {
if [[ -n "$(command git rev-list origin/$(current_branch)..HEAD 2> /dev/null)" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
}

# Outputs if current branch is behind remote
function git_prompt_behind() {
if [[ -n "$(command git rev-list HEAD..origin/$(current_branch) 2> /dev/null)" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
}

# Outputs if current branch exists on remote or not
function git_prompt_remote() {
if [[ -n "$(command git show-ref origin/$(current_branch) 2> /dev/null)" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
else
echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING"
fi
}

# Formats prompt string for current git commit short SHA
function git_prompt_short_sha() {
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
Expand Down
13 changes: 10 additions & 3 deletions lib/misc.zsh
@@ -1,6 +1,10 @@
## smart urls
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
## Load smart urls if available
for d in $fpath; do
if [[ -e "$d/url-quote-magic" ]]; then
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
fi
done

## jobs
setopt long_list_jobs
Expand All @@ -20,3 +24,6 @@ alias afind='ack-grep -il'
if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
fi

# recognize comments
setopt interactivecomments
13 changes: 6 additions & 7 deletions oh-my-zsh.sh
Expand Up @@ -14,7 +14,7 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM="$ZSH/custom"
fi

# Set ZSH_CACHE_DIR to the path where cache files sould be created
# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache/"
Expand All @@ -29,6 +29,11 @@ for config_file ($ZSH/lib/*.zsh); do
source $config_file
done

# Load all of your custom configurations from custom/
for config_file ($ZSH_CUSTOM/*.zsh(N)); do
source $config_file
done
unset config_file

is_plugin() {
local base_dir=$1
Expand Down Expand Up @@ -72,12 +77,6 @@ for plugin ($plugins); do
fi
done

# Load all of your custom configurations from custom/
for config_file ($ZSH_CUSTOM/*.zsh(N)); do
source $config_file
done
unset config_file

# Load the theme
if [ "$ZSH_THEME" = "random" ]; then
themes=($ZSH/themes/*zsh-theme)
Expand Down
12 changes: 10 additions & 2 deletions plugins/adb/_adb
Expand Up @@ -16,14 +16,22 @@ _1st_arguments=(
'help:show the help message'
'install:push this package file to the device and install it'
'jdwp:list PIDs of processes hosting a JDWP transport'
'logcat:View device log'
'kill-server:kill the server if it is running'
'logcat:view device log'
'pull:copy file/dir from device'
'push:copy file/dir to device'
'reboot:reboots the device, optionally into the bootloader or recovery program'
'reboot-bootloader:reboots the device into the bootloader'
'remount:remounts the partitions on the device read-write'
'root:restarts the adbd daemon with root permissions'
'sideload:push a ZIP to device and install it'
'shell:run remote shell interactively'
'sync:copy host->device only if changed (-l means list but dont copy)'
‘tcpip:restart host adb in tcpip mode’
'start-server:ensure that there is a server running'
'tcpip:restart host adb in tcpip mode'
'uninstall:remove this app package from the device'
'version:show version num'
'wait-for-device:block until device is online'
)

local expl
Expand Down
19 changes: 19 additions & 0 deletions plugins/apache2-macports/README.md
@@ -0,0 +1,19 @@
## APACHE2 MACPORTS PLUGIN


---

### FEATURES

| Alias | Function | Description |
|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
| apache2start | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start | Start apache daemon |
| apache2stop | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop | Stop apache daemon |

---

### CONTRIBUTORS
- Alexander Rinass (alex@rinass.net)

---
64 changes: 64 additions & 0 deletions plugins/archlinux/README.md
@@ -0,0 +1,64 @@
## ARCHLINUX PLUGIN


---

### FEATURES

| Alias | Function | Description |
|:------------:|-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
| pacin | sudo pacman -S | Install specific package(s) from the repositories |
| pacins | sudo pacman -U | Install specific package not from the repositories but from a file |
| pacinsd | sudo pacman -S --asdeps | Install given package(s) as dependencies of another package |
| pacloc | pacman -Qi | Display information about a given package in the local database |
| paclocs | pacman -Qs | Search for package(s) in the local database |
| paclsorphans | sudo pacman -Qdt' | List all orphaned packages |
| pacmir | sudo pacman -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
| pacre | sudo pacman -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
| pacrem | sudo pacman -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
| pacrep | pacman -Si | Display information about a given package in the repositories |
| pacreps | pacman -Ss | Search for package(s) in the repositories |
| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq)' | Delete all orphaned packages |
| pacupd | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
| pacupd | sudo pacman -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
| pacupd | sudo pacman -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
| pacupd | sudo pacman -Sy | Update and refresh the local package database against repositories |
| pacupg | sudo pacman -Syu | Synchronize with repositories before upgrading packages that are out of date on the local system. |
| yaconf | yaourt -C | Fix all configuration files with vimdiff |
| yain | yaourt -S | Install specific package(s) from the repositories |
| yains | yaourt -U | Install specific package not from the repositories but from a file |
| yainsd | yaourt -S --asdeps | Install given package(s) as dependencies of another package |
| yaloc | yaourt -Qi | Display information about a given package in the local database |
| yalocs | yaourt -Qs | Search for package(s) in the local database |
| yalst | yaourt -Qe | List installed packages, even those installed from AUR (they're tagged as "local") |
| yamir | yaourt -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
| yaorph | yaourt -Qtd | Remove orphans using yaourt |
| yare | yaourt -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
| yarem | yaourt -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
| yarep | yaourt -Si | Display information about a given package in the repositories |
| yareps | yaourt -Ss | Search for package(s) in the repositories |
| yasu | yaourt --sucre | Same as yaupg, but without confirmation |
| yaupd | yaourt -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
| yaupd | yaourt -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
| yaupd | yaourt -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
| yaupd | yaourt -Sy | Update and refresh the local package database against repositories |
| yaupg | yaourt -Syua | Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system |

| Function | Description |
|----------------|:------------------------------------------------------------------------------------------------------------------|
| pacdisowned | List all disowned files in your system |
| paclist | List all installed packages with a short description - [Source](https://bbs.archlinux.org/viewtopic.php?id=93683) |
| pacmanallkeys | Get all keys for developers and trusted users |
| pacmansignkeys | |

---

### CONTRIBUTORS
- Benjamin Boudreau - dreurmail@gmail.com
- Celso Miranda - contacto@celsomiranda.net
- KhasMek - Boushh@gmail.com
- Martin Putniorz - mputniorz@gmail.com
- MatthR3D - matthr3d@gmail.com
- ornicar - thibault.duplessis@gmail.com

---

0 comments on commit 06874ef

Please sign in to comment.