Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into git_status2
Browse files Browse the repository at this point in the history
* upstream/master:
  Add installation instructions to README
  Round 3 of batch-closing obsolete issues
  Create new aliases for homebrew plugin
  Add CakePHP3 plugin
  Many updates to git plugin (see ohmyzsh#2790)
  Fix 'chsh' by checking '/etc/shells' instead of using 'which'
  Fix echo nothing if $SHORT_HOST doesn't exist.
  Add .ipsw to the extract plugin.
  Minor cosmetic fix to minimal theme
  [boot2docker plugin] Initial version
  fix paclist() for non-english locales
  gitfast: back-port prompt fix
  gitfast: update to upstream v1.9.2
  • Loading branch information
Hamish Downer committed Jun 11, 2015
2 parents 4f0faa0 + 4224c2a commit 5668b5f
Show file tree
Hide file tree
Showing 20 changed files with 373 additions and 356 deletions.
2 changes: 1 addition & 1 deletion plugins/archlinux/archlinux.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ alias pacmir='sudo pacman -Syy' # Force refresh of all package li

# https://bbs.archlinux.org/viewtopic.php?id=93683
paclist() {
sudo pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
LC_ALL=C pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
}

alias paclsorphans='sudo pacman -Qdt'
Expand Down
6 changes: 6 additions & 0 deletions plugins/boot2docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Boot2docker autocomplete plugin

- Adds autocomplete options for all boot2docker commands.


Maintainer : Manfred Touron ([@moul](https://github.com/moul))
70 changes: 70 additions & 0 deletions plugins/boot2docker/_boot2docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#compdef boot2docker

# Boot2docker autocompletion for oh-my-zsh
# Requires: Boot2docker installed
# Author: Manfred Touron (@moul)

local -a _1st_arguments
_1st_arguments=(
"init":"Create a new Boot2Docker VM."
"up":"Start VM from any states."
"start":"Start VM from any states."
"boot":"Start VM from any states."
"ssh":"[ssh-command] Login to VM via SSH."
"save":"Suspend VM and save state to disk."
"suspend":"Suspend VM and save state to disk."
"down":"Gracefully shutdown the VM."
"stop":"Gracefully shutdown the VM."
"halt":"Gracefully shutdown the VM."
"restart":"Gracefully reboot the VM."
"poweroff":"Forcefully power off the VM (may corrupt disk image)."
"reset":"Forcefully power cycle the VM (may corrupt disk image)."
"delete":"Delete Boot2Docker VM and its disk image."
"destroy":"Delete Boot2Docker VM and its disk image."
"config":"Show selected profile file settings."
"cfg":"Show selected profile file settings."
"info":"Display detailed information of VM."
"ip":"Display the IP address of the VM's Host-only network."
"socket":"Display the DOCKER_HOST socket to connect to."
"shellinit":"Display the shell command to set up the Docker client."
"status":"Display current state of VM."
"download":"Download Boot2Docker ISO image."
"upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
"version":"Display version information."
)

_arguments \
'(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
'(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
'(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
'(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
'(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
'(--driver)--driver[hypervisor driver.]' \
'(--hostip)--hostip[VirtualBox host-only network IP address.]' \
'(--iso)--iso[path to boot2docker ISO image.]' \
'(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
'(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
'(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
'(--netmask)--netmask[VirtualBox host-only network mask.]' \
'(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
'(--retries)--retries[number of port knocking retries during 'start']' \
'(--serial)--serial[try serial console to get IP address (experimental)]' \
'(--serialfile)--serialfile[path to the serial socket/pipe.]' \
'(--ssh)--ssh[path to SSH client utility.]' \
'(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
'(--sshkey)--sshkey[path to SSH key to use.]' \
'(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
'(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
'(--vbm)--vbm[path to VirtualBox management utility.]' \
'(--vbox-share)--vbox-share[(defaults to "/Users=Users" if no shares are specified; use "disable" to explicitly prevent any shares from being created) List of directories to share during "up|start|boot" via VirtualBox Guest Additions, with optional labels]' \
'(--verbose)'{-v,--verbose}'[display verbose command invocations.]' \
'(--vm)--vm[virtual machine name.]' \
'(--waittime)--waittime[Time in milliseconds to wait between port knocking retries during 'start']' \
'*:: :->subcmds' && return 0

#_arguments '*:: :->command'

if (( CURRENT == 1 )); then
_describe -t commands "boot2docker command" _1st_arguments
return
fi
4 changes: 3 additions & 1 deletion plugins/brew/brew.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
alias brews='brew list -1'
alias bubu="brew update && brew upgrade && brew cleanup"
alias bubo='brew update && brew outdated'
alias bubc='brew upgrade && brew cleanup'
alias bubu='bubo && bubc'
19 changes: 19 additions & 0 deletions plugins/cakephp3/cakephp3.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# CakePHP 3 basic command completion
_cakephp3_get_command_list () {
cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
}

_cakephp3 () {
if [ -f bin/cake ]; then
compadd `_cakephp3_get_command_list`
fi
}

compdef _cakephp3 bin/cake
compdef _cakephp3 cake

#Alias
alias c3='bin/cake'

alias c3cache='bin/cake orm_cache clear'
alias c3migrate='bin/cake migrations migrate'
2 changes: 1 addition & 1 deletion plugins/extract/_extract
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
"*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0
"*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|ipsw|rar|7z|deb)(-.)'" && return 0


10 changes: 5 additions & 5 deletions plugins/extract/extract.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function extract() {

remove_archive=1
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
remove_archive=0
remove_archive=0
shift
fi

Expand Down Expand Up @@ -52,7 +52,7 @@ function extract() {
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;;
(*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;;
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
Expand All @@ -64,10 +64,10 @@ function extract() {
cd ..; rm *.tar.gz debian-binary
cd ..
;;
(*)
(*)
echo "extract: '$1' cannot be extracted" 1>&2
success=1
;;
success=1
;;
esac

(( success = $success > 0 ? $success : $? ))
Expand Down
10 changes: 8 additions & 2 deletions plugins/git/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## git
**Maintainer:** [Stibbons](https://github.com/Stibbons)

This plugin adds several git aliases and increase the completion function provided by zsh
**Maintainer:** [@ncanceill](https://github.com/ncanceill)

This plugin adds many useful aliases and functions.

### Usage

See the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git) for a list of aliases and functions provided by the plugin.

83 changes: 0 additions & 83 deletions plugins/git/_git-branch

This file was deleted.

74 changes: 0 additions & 74 deletions plugins/git/_git-remote

This file was deleted.

0 comments on commit 5668b5f

Please sign in to comment.