From fdb3c0e68d36d20d1b75163755d568d42def5ac1 Mon Sep 17 00:00:00 2001 From: Anton Eicher Date: Wed, 19 Dec 2012 07:22:03 -0800 Subject: Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc. --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 154aa6db1..79300a166 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -73,12 +73,14 @@ alias gsd='git svn dcommit' # Usage example: git pull origin $(current_branch) # function current_branch() { + if [ ! -d .git ]; then return; fi ref=$(git symbolic-ref HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo ${ref#refs/heads/} } function current_repository() { + if [ ! -d .git ]; then return; fi ref=$(git symbolic-ref HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo $(git remote -v | cut -d':' -f 2) -- cgit v1.2.3-70-g09d2 From 9674a96b5bc296a767c2560757626bf2bc3a9ad3 Mon Sep 17 00:00:00 2001 From: Frank Louwers Date: Wed, 13 Feb 2013 12:02:36 +0100 Subject: [pj-plugin] delete ugly ls -l | awk print $9 thing to use something not depending on date format + add support for projects with spaces in them --- plugins/pj/pj.plugin.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index ba3765b83..b98bfec34 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -18,8 +18,11 @@ function pj() { file=$1 if [[ "open" == "$file" ]] then - file=$2 + shift + file=$* cmd=(${(s: :)EDITOR}) + else + file=$* fi for project in $PROJECT_PATHS; do @@ -36,7 +39,14 @@ function pj() { alias pjo="pj open" function _pj () { - compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'` + # might be possible to improve this using glob, without the basename trick + typeset -a projects + foreach i ($PROJECT_PATHS/*) + do + projects+=`basename $i` + done + + _arguments '*:file:($projects)' } compdef _pj pj -- cgit v1.2.3-70-g09d2 From df67f2ee30dbad61117e1886b0a4de326cb6daf7 Mon Sep 17 00:00:00 2001 From: Frank Louwers Date: Wed, 13 Feb 2013 13:39:47 +0100 Subject: [pj-plugin] avoid using basename. migth be (a lot?) faster --- plugins/pj/pj.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index b98bfec34..dac561189 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -43,7 +43,7 @@ function _pj () { typeset -a projects foreach i ($PROJECT_PATHS/*) do - projects+=`basename $i` + projects+=(${i##*/}) done _arguments '*:file:($projects)' -- cgit v1.2.3-70-g09d2 From 7fb17127c7ef2ff11240af5c42430ae3ae1c0369 Mon Sep 17 00:00:00 2001 From: Dmitri Akatov Date: Wed, 24 Jul 2013 14:30:12 -0700 Subject: carton completion plugin --- plugins/carton/carton.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/carton/carton.plugin.zsh (limited to 'plugins') diff --git a/plugins/carton/carton.plugin.zsh b/plugins/carton/carton.plugin.zsh new file mode 100644 index 000000000..23868b09c --- /dev/null +++ b/plugins/carton/carton.plugin.zsh @@ -0,0 +1,6 @@ +if which carton &> /dev/null +then + source $(dirname $(which carton))/../etc/carton_completion.zsh +else + print "zsh carton plugin: carton not found" +fi -- cgit v1.2.3-70-g09d2 From 55c90b1d6cbda581f9ccd41ea1c8da15da98d5ee Mon Sep 17 00:00:00 2001 From: Dmitri Akatov Date: Fri, 26 Jul 2013 20:00:45 -0700 Subject: grunt completion courtesy of @yonchu: https://github.com/yonchu/grunt-zsh-completion --- plugins/grunt/grunt.plugin.zsh | 253 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 plugins/grunt/grunt.plugin.zsh (limited to 'plugins') diff --git a/plugins/grunt/grunt.plugin.zsh b/plugins/grunt/grunt.plugin.zsh new file mode 100644 index 000000000..48f6cb5a2 --- /dev/null +++ b/plugins/grunt/grunt.plugin.zsh @@ -0,0 +1,253 @@ +#compdef grunt +# ----------------------------------------------------------------------------- +# _grunt +# +# Completion script for grunt. +# - https://github.com/gruntjs/grunt +# - https://github.com/gruntjs/grunt-cli +# +# ----------------------------------------------------------------------------- +# +# Version : 0.1.0 +# Author : Yonchu +# License : MIT License +# Repository : https://github.com/yonchu/grunt-zsh-completion +# Last Change : 22 Jul 2013. +# +# Copyright (c) 2013 Yonchu. +# +# ----------------------------------------------------------------------------- +# USAGE +# ----- +# +# Enable caching: +# +# If you want to use the cache, set the followings in your .zshrc: +# +# zstyle ':completion:*' use-cache yes +# +# +# Settings: +# +# - Show grunt file path: +# zstyle ':completion::complete:grunt::options:' show_grunt_path yes +# +# - Cache expiration days (default: 7): +# zstyle ':completion::complete:grunt::options:' expire 1 +# +# - Not update options cache if target gruntfile is changed. +# zstyle ':completion::complete:grunt::options:' no_update_options yes +# +# Note that if you change the zstyle settings, +# you should delete the cache file and restart zsh. +# +# $ rm ~/.zcompcache/grunt +# $ exec zsh +# +# ----------------------------------------------------------------------------- + +function _grunt() { + local curcontext="$curcontext" update_policy state + local show_grunt_path update_msg gruntfile opts tasks + + # Setup cache-policy. + zstyle -s ":completion:${curcontext}:" cache-policy update_policy + if [[ -z $update_policy ]]; then + zstyle ":completion:${curcontext}:" cache-policy __grunt_caching_policy + fi + + # Check show_path option. + zstyle -b ":completion:${curcontext}:options:" show_grunt_path show_grunt_path + + # Get current gruntfile. + gruntfile=$(__grunt_get_gruntfile) + + # Initialize opts and tasks. + opts=() + tasks=() + + # Add help options. + opts+=('(- 1 *)'{-h,--help}'[Display this help text.]') + + ## Complete without gruntfile. + if [[ ! -f $gruntfile ]]; then + _arguments "${opts[@]}" + return + fi + + ## Complete with gruntfile. + # Retrieve cache. + if ! __grunt_update_cache "$gruntfile"; then + update_msg=' (cache updated)' + fi + + # Make optioins completion. + if [[ ${#__grunt_opts} -gt 0 ]]; then + opts+=("${__grunt_opts[@]}") + fi + + # Complete arguments. + _arguments \ + "${opts[@]}" \ + '*: :->tasks' \ + && return + + case $state in + tasks) + if [[ $show_grunt_path == 'yes' ]]; then + update_msg="$update_msg: ${${gruntfile/#$HOME/~}%/}" + fi + # Make tasks completion. + if [[ ${#__grunt_tasks} -gt 0 ]]; then + tasks+=("${__grunt_tasks[@]}") + _describe -t grunt-task "$verbose grunt task$update_msg" tasks || return 1 + fi + ;; + esac + + return 0 +} + +# Cache policy: +# The cache file name: grunt +# The cache variable name: __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks +function __grunt_update_cache() { + # TODO + local version='0.1.0' + local is_updating=0 + local gruntfile="$1" + local grunt_info no_update_options cache_path + + # Check no_update_options option. + zstyle -b ":completion:${curcontext}:options:" no_update_options no_update_options + + + if ! ( (( $+__grunt_gruntfile )) \ + && (( $+__grunt_opts )) \ + && (( $+__grunt_tasks )) ) \ + && ! _retrieve_cache 'grunt'; then + is_updating=1 + fi + + if [[ $gruntfile != $__grunt_gruntfile ]]; then + # Except for --help options. + __grunt_gruntfile=$gruntfile + if [[ $no_update_options == 'yes' ]]; then + if [[ $PREFIX == ${PREFIX#-} ]]; then + # Not options completions. + is_updating=1 + elif [[ ${#__grunt_opts} -lt 2 ]]; then + is_updating=1 + else + unset __grunt_gruntfile + fi + else + is_updating=1 + fi + else + if [[ $PREFIX != ${PREFIX#-} && ${#__grunt_opts} -gt 1 ]]; then + unset __grunt_gruntfile + fi + fi + + if _cache_invalid 'grunt'; then + is_updating=1 + fi + + # Check _grunt version. + if [[ $__grunt_version != $version ]]; then + is_updating=1 + fi + + if [[ $is_updating -ne 0 ]]; then + # Update caceh. + __grunt_version=$version + __grunt_gruntfile=$gruntfile + is_updating=1 + grunt_info=$(grunt --help --no-color --gruntfile "$__grunt_gruntfile" 2>/dev/null) + __grunt_opts=(${(f)"$(__grunt_get_opts "$grunt_info")"}) + __grunt_tasks=(${(f)"$(__grunt_get_tasks "$grunt_info")"}) + _store_cache 'grunt' __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks + fi + return $is_updating +} + +function __grunt_get_tasks() { + echo -E "$1" \ + | grep 'Available tasks' -A 100 \ + | grep '^ ' \ + | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' \ + | sed -e 's/ /:/' +} + +function __grunt_get_opts() { + local opt_hunk opt_sep opt_num line opt + opt_hunk=$(echo -E "$1" \ + | grep 'Options$' -A 100 \ + | sed '1 d' \ + | sed -e 's/[[:blank:]]*$//' \ + ) + + opt_sep=() + opt_hunk=(${(f)opt_hunk}) + opt_num=0 + for line in "$opt_hunk[@]"; do + opt=$(echo -E "$line" | sed -e 's/^[[:blank:]]*//') + if [[ $line == $opt ]]; then + break + fi + if [[ $opt != ${opt#-} ]]; then + # Start with - + (( opt_num++ )) + opt=$(echo -E "$opt" | sed 's/^\(\(--[^ ]*\)\(, \(-[^ ]*\)\)*\) */\2\\t\4\\\t/') + fi + opt_sep[$opt_num]=("${opt_sep[$opt_num]}${opt}") + done + + for line in "$opt_sep[@]"; do + opt=(${(s:\t:)line}) + if [[ ${opt[1]} == '--help' ]]; then + continue + fi + if [[ ${#opt} -eq 2 ]]; then + echo -E "(${opt[1]})${opt[1]}[${opt[2]}]" + else + echo -E "(${opt[1]},${opt[2]})${opt[1]}[${opt[3]}]" + echo -E "(${opt[1]},${opt[2]})${opt[2]}[${opt[3]}]" + fi + done +} + +function __grunt_get_gruntfile() { + local gruntfile + local curpath="$PWD" + while [ "$curpath" ]; do + for gruntfile in "$curpath/"{G,g}runtfile.{js,coffee}; do + if [[ -e "$gruntfile" ]]; then + echo "$gruntfile" + return + fi + done + curpath=${curpath%/*} + done + return 1 +} + +function __grunt_caching_policy() { + # Returns status zero if the completions cache needs rebuilding. + + # Rebuild if .agignore more recent than cache. + if [[ -f $__grunt_gruntfile && $__grunt_gruntfile -nt $1 ]]; then + # Invalid cache because gruntfile is old. + return 0 + fi + + local -a oldp + local expire + zstyle -s ":completion:${curcontext}:options:" expire expire || expire=7 + # Rebuild if cache is more than $expire days. + oldp=( "$1"(Nm+$expire) ) + (( $#oldp )) +} + +compdef _grunt grunt -- cgit v1.2.3-70-g09d2 From 1af012d4991a36bfb0e2def3e67f5a0e56fc49e4 Mon Sep 17 00:00:00 2001 From: Dmitri Akatov Date: Tue, 6 Aug 2013 13:28:52 -0700 Subject: carton was renamed to cask --- plugins/carton/carton.plugin.zsh | 6 ------ plugins/cask/cask.plugin.zsh | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 plugins/carton/carton.plugin.zsh create mode 100644 plugins/cask/cask.plugin.zsh (limited to 'plugins') diff --git a/plugins/carton/carton.plugin.zsh b/plugins/carton/carton.plugin.zsh deleted file mode 100644 index 23868b09c..000000000 --- a/plugins/carton/carton.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -if which carton &> /dev/null -then - source $(dirname $(which carton))/../etc/carton_completion.zsh -else - print "zsh carton plugin: carton not found" -fi diff --git a/plugins/cask/cask.plugin.zsh b/plugins/cask/cask.plugin.zsh new file mode 100644 index 000000000..c55862924 --- /dev/null +++ b/plugins/cask/cask.plugin.zsh @@ -0,0 +1,5 @@ +if which cask &> /dev/null; then + source $(dirname $(which cask))/../etc/cask_completion.zsh +else + print "zsh cask plugin: cask not found" +fi -- cgit v1.2.3-70-g09d2 From a7c88c988a4be02b8883c06e57c6eb290c8fcb21 Mon Sep 17 00:00:00 2001 From: Fräntz Miccoli Date: Sun, 15 Sep 2013 23:16:11 +0200 Subject: Removed comments and other elements that might appear in the phing -l output. The current version doesn't work at all on my environment (OSX 10.7) --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 795f1db85..9af03af24 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -7,7 +7,7 @@ _phing_does_target_list_need_generating () { _phing () { if [ -f build.xml ]; then if _phing_does_target_list_need_generating; then - phing -l |grep -v ":$" |grep -v "^-*$" > .phing_targets + phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|awk '{print $1}' > .phing_targets fi compadd `cat .phing_targets` fi -- cgit v1.2.3-70-g09d2 From 244533320062afd470e4aa6aab92e1532cf2fec3 Mon Sep 17 00:00:00 2001 From: Rimenes Ribeiro Date: Tue, 24 Sep 2013 15:20:52 -0300 Subject: Add reload and status alises to postgres --- plugins/postgres/postgres.plugin.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/postgres/postgres.plugin.zsh b/plugins/postgres/postgres.plugin.zsh index cdd142e92..c2dbef244 100644 --- a/plugins/postgres/postgres.plugin.zsh +++ b/plugins/postgres/postgres.plugin.zsh @@ -1,6 +1,8 @@ -# Aliases to stop, start and restart Postgres -# Paths noted below are for Postgress installed via Homebrew on OSX +# Aliases to control Postgres +# Paths noted below are for Postgres installed via Homebrew on OSX alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' -alias restartpost='stoppost && sleep 1 && startpost' \ No newline at end of file +alias restartpost='stoppost && sleep 1 && startpost' +alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' +alias statuspost='pg_ctl status -D /usr/local/var/postgres -s' \ No newline at end of file -- cgit v1.2.3-70-g09d2 From d608fbfc7fcabf9994f8064e67670e69130d2ee1 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Tue, 15 Oct 2013 14:34:03 +0200 Subject: Make the virtualenv plugin themable --- plugins/virtualenv/virtualenv.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/virtualenv/virtualenv.plugin.zsh b/plugins/virtualenv/virtualenv.plugin.zsh index 8e06450b1..e250eb63e 100644 --- a/plugins/virtualenv/virtualenv.plugin.zsh +++ b/plugins/virtualenv/virtualenv.plugin.zsh @@ -1,7 +1,6 @@ function virtualenv_prompt_info(){ - if [[ -n $VIRTUAL_ENV ]]; then - printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t} - fi + [[ -n ${VIRTUAL_ENV} ]] || return + echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}" } # disables prompt mangling in virtual_env/bin/activate -- cgit v1.2.3-70-g09d2 From 00b2cc653421c1465f7596f22c19d21f42aa0396 Mon Sep 17 00:00:00 2001 From: Andrew Dwyer Date: Sat, 21 Dec 2013 11:17:05 +1030 Subject: New plugin for the n98-magerun Magento command line tool --- plugins/n98-magerun/n98-magerun.plugin.zsh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 plugins/n98-magerun/n98-magerun.plugin.zsh (limited to 'plugins') diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh new file mode 100755 index 000000000..e4b0d6885 --- /dev/null +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# FILE: n98-magerun.plugin.zsh +# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin +# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com) +# VERSION: 1.0.0 +# ------------------------------------------------------------------------------ + +# n98-magerun basic command completion +_n98_magerun_get_command_list () { + n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }' +} + +_n98_magerun () { + compadd `_n98_magerun_get_command_list` +} + +compdef _n98_magerun n98-magerun.phar + +# Aliases +alias n98-magerun='n98-magerun.phar' +alias mage='n98-magerun.phar' +alias magefl='n98-magerun.phar cache:flush' + +# Install n98-magerun into the current directory +alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar' -- cgit v1.2.3-70-g09d2 From b2ea7d3ec12152ab4d864c27c33d8b9396c68858 Mon Sep 17 00:00:00 2001 From: Stanislav Schultz Date: Fri, 28 Mar 2014 20:25:13 +0300 Subject: Add Ruby 2.1.1 support to rvm plugin --- plugins/rvm/rvm.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins') diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 3bde154df..ad23e18d7 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -6,6 +6,7 @@ alias gemsets='rvm gemset list' local ruby18='ruby-1.8.7' local ruby19='ruby-1.9.3' local ruby20='ruby-2.0.0' +local ruby21='ruby-2.1.1' function rb18 { if [ -z "$1" ]; then @@ -40,6 +41,17 @@ function rb20 { _rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`} compdef _rb20 rb20 +function rb21 { + if [ -z "$1" ]; then + rvm use "$ruby21" + else + rvm use "$ruby21@$1" + fi +} + +_rb21() {compadd `ls -1 $rvm_path/gems | grep "^$ruby21@" | sed -e "s/^$ruby21@//" | awk '{print $1}'`} +compdef _rb21 rb21 + function rvm-update { rvm get head } -- cgit v1.2.3-70-g09d2 From 6a5c8fb81b369566ed0f5e408dab7a7213354ade Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 21 Apr 2014 21:11:49 -0500 Subject: gitfast: update to upstream v1.9.2 Signed-off-by: Felipe Contreras --- plugins/gitfast/_git | 10 +++++++- plugins/gitfast/git-completion.bash | 47 +++++++++++++++++++++++++------------ plugins/gitfast/git-prompt.sh | 15 +++++++++--- 3 files changed, 53 insertions(+), 19 deletions(-) (limited to 'plugins') diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git index fac5e711e..6b7796857 100644 --- a/plugins/gitfast/_git +++ b/plugins/gitfast/_git @@ -30,10 +30,10 @@ if [ -z "$script" ]; then local -a locations local e locations=( + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash '/etc/bash_completion.d/git' # fedora, old debian '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian '/usr/share/bash-completion/git' # gentoo - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash ) for e in $locations; do test -f $e && script="$e" && break @@ -76,6 +76,14 @@ __gitcomp_nl () compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 } +__gitcomp_nl_append () +{ + emulate -L zsh + + local IFS=$'\n' + compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 +} + __gitcomp_file () { emulate -L zsh diff --git a/plugins/gitfast/git-completion.bash b/plugins/gitfast/git-completion.bash index 5da920ecd..9525343fc 100644 --- a/plugins/gitfast/git-completion.bash +++ b/plugins/gitfast/git-completion.bash @@ -1,5 +1,3 @@ -#!bash -# # bash/zsh completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce @@ -180,9 +178,9 @@ _get_comp_words_by_ref () } fi -__gitcompadd () +__gitcompappend () { - local i=0 + local i=${#COMPREPLY[@]} for x in $1; do if [[ "$x" == "$3"* ]]; then COMPREPLY[i++]="$2$x$4" @@ -190,6 +188,12 @@ __gitcompadd () done } +__gitcompadd () +{ + COMPREPLY=() + __gitcompappend "$@" +} + # Generates completion reply, appending a space to possible completion words, # if necessary. # It accepts 1 to 4 arguments: @@ -220,6 +224,14 @@ __gitcomp () esac } +# Variation of __gitcomp_nl () that appends to the existing list of +# completion candidates, COMPREPLY. +__gitcomp_nl_append () +{ + local IFS=$'\n' + __gitcompappend "$1" "${2-}" "${3-$cur}" "${4- }" +} + # Generates completion reply from newline-separated possible completion words # by appending a space to all of them. # It accepts 1 to 4 arguments: @@ -231,8 +243,8 @@ __gitcomp () # appended. __gitcomp_nl () { - local IFS=$'\n' - __gitcompadd "$1" "${2-}" "${3-$cur}" "${4- }" + COMPREPLY=() + __gitcomp_nl_append "$@" } # Generates completion reply with compgen from newline-separated possible @@ -673,7 +685,6 @@ __git_list_porcelain_commands () index-pack) : plumbing;; init-db) : deprecated;; local-fetch) : plumbing;; - lost-found) : infrequent;; ls-files) : plumbing;; ls-remote) : plumbing;; ls-tree) : plumbing;; @@ -687,14 +698,12 @@ __git_list_porcelain_commands () pack-refs) : plumbing;; parse-remote) : plumbing;; patch-id) : plumbing;; - peek-remote) : plumbing;; prune) : plumbing;; prune-packed) : plumbing;; quiltimport) : import;; read-tree) : plumbing;; receive-pack) : plumbing;; remote-*) : transport;; - repo-config) : deprecated;; rerere) : plumbing;; rev-list) : plumbing;; rev-parse) : plumbing;; @@ -707,7 +716,6 @@ __git_list_porcelain_commands () ssh-*) : transport;; stripspace) : plumbing;; symbolic-ref) : plumbing;; - tar-tree) : deprecated;; unpack-file) : plumbing;; unpack-objects) : plumbing;; update-index) : plumbing;; @@ -901,7 +909,7 @@ _git_add () esac # XXX should we check for --update and --all options ? - __git_complete_index_file "--others --modified" + __git_complete_index_file "--others --modified --directory --no-empty-directory" } _git_archive () @@ -1063,7 +1071,7 @@ _git_clean () esac # XXX should we check for -x option ? - __git_complete_index_file "--others" + __git_complete_index_file "--others --directory" } _git_clone () @@ -1188,7 +1196,7 @@ _git_diff () __git_complete_revlist_file } -__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff +__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare " @@ -1491,6 +1499,12 @@ _git_mergetool () _git_merge_base () { + case "$cur" in + --*) + __gitcomp "--octopus --independent --is-ancestor --fork-point" + return + ;; + esac __gitcomp_nl "$(__git_refs)" } @@ -1623,7 +1637,7 @@ _git_rebase () --preserve-merges --stat --no-stat --committer-date-is-author-date --ignore-date --ignore-whitespace --whitespace= - --autosquash + --autosquash --fork-point --no-fork-point " return @@ -1833,6 +1847,7 @@ _git_config () branch.*) local pfx="${cur%.*}." cur_="${cur#*.}" __gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "." + __gitcomp_nl_append $'autosetupmerge\nautosetuprebase\n' "$pfx" "$cur_" return ;; guitool.*.*) @@ -1875,6 +1890,7 @@ _git_config () remote.*) local pfx="${cur%.*}." cur_="${cur#*.}" __gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "." + __gitcomp_nl_append "pushdefault" "$pfx" "$cur_" return ;; url.*.*) @@ -1997,6 +2013,7 @@ _git_config () fetch.unpackLimit format.attach format.cc + format.coverLetter format.headers format.numbered format.pretty @@ -2580,7 +2597,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then --*=*|*.) ;; *) c="$c " ;; esac - array[$#array+1]="$c" + array[${#array[@]}+1]="$c" done compset -P '*[=:]' compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index a81ef5a48..7b732d2ae 100644 --- a/plugins/gitfast/git-prompt.sh +++ b/plugins/gitfast/git-prompt.sh @@ -60,6 +60,7 @@ # of values: # # verbose show number of commits ahead/behind (+/-) upstream +# name if verbose, then also show the upstream abbrev name # legacy don't use the '--count' option available in recent # versions of git-rev-list # git always compare HEAD to @{upstream} @@ -84,13 +85,17 @@ # the colored output of "git status -sb" and are available only when # using __git_ps1 for PROMPT_COMMAND or precmd. +# check whether printf supports -v +__git_printf_supports_v= +printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1 + # stores the divergence from upstream in $p # used by GIT_PS1_SHOWUPSTREAM __git_ps1_show_upstream () { local key value local svn_remote svn_url_pattern count n - local upstream=git legacy="" verbose="" + local upstream=git legacy="" verbose="" name="" svn_remote=() # get some config options from git-config @@ -106,7 +111,7 @@ __git_ps1_show_upstream () ;; svn-remote.*.url) svn_remote[$((${#svn_remote[@]} + 1))]="$value" - svn_url_pattern+="\\|$value" + svn_url_pattern="$svn_url_pattern\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; esac @@ -118,6 +123,7 @@ __git_ps1_show_upstream () git|svn) upstream="$option" ;; verbose) verbose=1 ;; legacy) legacy=1 ;; + name) name=1 ;; esac done @@ -200,6 +206,9 @@ __git_ps1_show_upstream () *) # diverged from upstream p=" u+${count#* }-${count% *}" ;; esac + if [[ -n "$count" && -n "$name" ]]; then + p="$p $(git rev-parse --abbrev-ref "$upstream" 2>/dev/null)" + fi fi } @@ -433,7 +442,7 @@ __git_ps1 () local gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p" if [ $pcmode = yes ]; then - if [[ -n ${ZSH_VERSION-} ]]; then + if [ "${__git_printf_supports_v-}" != yes ]; then gitstring=$(printf -- "$printf_format" "$gitstring") else printf -v gitstring -- "$printf_format" "$gitstring" -- cgit v1.2.3-70-g09d2 From 5918d9100b294beb490cbd5f1f15fe2b064d9e62 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 21 Apr 2014 21:13:06 -0500 Subject: gitfast: back-port prompt fix Signed-off-by: Felipe Contreras --- plugins/gitfast/git-prompt.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index 7b732d2ae..54489080f 100644 --- a/plugins/gitfast/git-prompt.sh +++ b/plugins/gitfast/git-prompt.sh @@ -259,6 +259,13 @@ __git_ps1_colorize_gitstring () r="$c_clear$r" } +eread () +{ + f="$1" + shift + test -r "$f" && read "$@" <"$f" +} + # __git_ps1 accepts 0 or 1 arguments (i.e., format string) # when called from PS1 using command substitution # in this mode it prints text to add to bash PS1 prompt (includes branch name) @@ -321,9 +328,9 @@ __git_ps1 () local step="" local total="" if [ -d "$g/rebase-merge" ]; then - read b 2>/dev/null <"$g/rebase-merge/head-name" - read step 2>/dev/null <"$g/rebase-merge/msgnum" - read total 2>/dev/null <"$g/rebase-merge/end" + eread "$g/rebase-merge/head-name" b + eread "$g/rebase-merge/msgnum" step + eread "$g/rebase-merge/end" total if [ -f "$g/rebase-merge/interactive" ]; then r="|REBASE-i" else @@ -331,10 +338,10 @@ __git_ps1 () fi else if [ -d "$g/rebase-apply" ]; then - read step 2>/dev/null <"$g/rebase-apply/next" - read total 2>/dev/null <"$g/rebase-apply/last" + eread "$g/rebase-apply/next" step + eread "$g/rebase-apply/last" total if [ -f "$g/rebase-apply/rebasing" ]; then - read b 2>/dev/null <"$g/rebase-apply/head-name" + eread "$g/rebase-apply/head-name" b r="|REBASE" elif [ -f "$g/rebase-apply/applying" ]; then r="|AM" @@ -358,7 +365,7 @@ __git_ps1 () b="$(git symbolic-ref HEAD 2>/dev/null)" else local head="" - if ! read head 2>/dev/null <"$g/HEAD"; then + if ! eread "$g/HEAD" head; then if [ $pcmode = yes ]; then PS1="$ps1pc_start$ps1pc_end" fi -- cgit v1.2.3-70-g09d2 From 73bf940c34fe359c27031a1144237ccaad7d2b9b Mon Sep 17 00:00:00 2001 From: Nicolas Brousse Date: Wed, 23 Apr 2014 19:44:59 +0200 Subject: Update brew.plugin.zsh --- plugins/brew/brew.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index c2e95884e..f9497aefb 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1 +1,2 @@ alias brews='brew list -1' +alias bubu="brew update && brew upgrade" -- cgit v1.2.3-70-g09d2 From 33ef34baa5f703ee7fcc502eabed4f1ab968127e Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Tue, 7 Jan 2014 12:47:58 -0800 Subject: Fix gmt compdef Fix typo: gm -> gmt --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..c579d1e82 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -82,7 +82,7 @@ alias gwc='git whatchanged -p --abbrev-commit --pretty=medium' alias gpoat='git push origin --all && git push origin --tags' alias gmt='git mergetool --no-prompt' -compdef _git gm=git-mergetool +compdef _git gmt=git-mergetool alias gg='git gui citool' alias gga='git gui citool --amend' -- cgit v1.2.3-70-g09d2 From 236c8de7f31a71878279ed2421bd2547ab3cdd03 Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Tue, 6 May 2014 10:45:26 -0700 Subject: [FEATURE] Support Vagrant 1.6 version command Vagrant 1.6 introduces a couple new commands, including the `version` command. The `version` command shows the currently installed version information and also checks for new updates available. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 9af8cb036..f9aef0880 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -19,6 +19,7 @@ _1st_arguments=( 'status:Shows the status of the current Vagrant environment.' 'suspend:Suspends the currently running vagrant environment' 'up:Creates the vagrant environment' + 'version:Prints the currently installed Vagrant version and checks for new updates' '--help:[TASK] Describe available tasks or one specific task' '--version:Prints the Vagrant version information' ) -- cgit v1.2.3-70-g09d2 From 38fe100efe9b7d4df87746818bae508c4c00d4a6 Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Tue, 6 May 2014 10:46:55 -0700 Subject: [FEATURE] Support Vagrant Share Vagrant 1.5 introduced Vagrant Share to allow remote access to a Vagrant environment. This adds support for the `share` and `connect` commands. --- plugins/vagrant/_vagrant | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index f9aef0880..7bdfb0f1c 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -6,6 +6,7 @@ local -a _1st_arguments _1st_arguments=( 'box:Box commands' + 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' @@ -14,6 +15,7 @@ _1st_arguments=( 'provision:Run the provisioner' 'reload:Reload the vagrant environment' 'resume:Resumes a suspend vagrant environment' + 'share:Shares the Vagrant environment and allows remote access' 'ssh:SSH into the currently running environment' 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh.' 'status:Shows the status of the current Vagrant environment.' -- cgit v1.2.3-70-g09d2 From 7f8ee9aabe5f551a83babd4083ab6490cd324bda Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Tue, 6 May 2014 10:48:49 -0700 Subject: [FEATURE] Support Vagrant Cloud commands Vagrant 1.5 added Vagrant Cloud to share boxes. Some boxes may be protected, the `login` command allows to access those protected boxes from Vagrant Cloud. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 7bdfb0f1c..a590b0621 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -10,6 +10,7 @@ _1st_arguments=( 'destroy:Destroys the vagrant environment' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' + 'login:Authenticates against a Vagrant Cloud server to access protected boxes' 'package:Packages a vagrant environment for distribution' 'plugin:Plugin commands' 'provision:Run the provisioner' -- cgit v1.2.3-70-g09d2 From 30d9952b6235694cb7fa370fcefebac623d48ce6 Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Tue, 6 May 2014 10:53:12 -0700 Subject: [FEATURE] Support vagrant global-status Vagrant 1.6 introduced the `global-status` command which allows to get a quick overview of all active Vagrant environments for the currently logged in user. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index a590b0621..93d6c57b1 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,6 +8,7 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' + 'global-status:Reports the status of all active Vagrant environments on the system.' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' 'login:Authenticates against a Vagrant Cloud server to access protected boxes' -- cgit v1.2.3-70-g09d2 From 8ed800510262157adab151cad12959095a5a1b62 Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Thu, 15 May 2014 12:26:39 -0700 Subject: Improve consistency, remove dots at end of command descriptions --- plugins/vagrant/_vagrant | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 93d6c57b1..14f8b965c 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,7 +8,7 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' - 'global-status:Reports the status of all active Vagrant environments on the system.' + 'global-status:Reports the status of all active Vagrant environments on the system' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' 'login:Authenticates against a Vagrant Cloud server to access protected boxes' @@ -19,8 +19,8 @@ _1st_arguments=( 'resume:Resumes a suspend vagrant environment' 'share:Shares the Vagrant environment and allows remote access' 'ssh:SSH into the currently running environment' - 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh.' - 'status:Shows the status of the current Vagrant environment.' + 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh' + 'status:Shows the status of the current Vagrant environment' 'suspend:Suspends the currently running vagrant environment' 'up:Creates the vagrant environment' 'version:Prints the currently installed Vagrant version and checks for new updates' -- cgit v1.2.3-70-g09d2 From 2c19c0e59e6a3fd1f844ee6f5f883e199a3c1adc Mon Sep 17 00:00:00 2001 From: ncanceill Date: Sat, 24 May 2014 08:31:59 +0200 Subject: typo, fixes #1806 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 2fb8d5462..610ad34dc 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -1,7 +1,7 @@ # # INSTRUCTIONS # -# To enabled agent forwarding support add the following to +# To enable agent forwarding support add the following to # your .zshrc file: # # zstyle :omz:plugins:ssh-agent agent-forwarding on -- cgit v1.2.3-70-g09d2 From 8355233f7fc055d8446c7ebf50569202fa5bd1f5 Mon Sep 17 00:00:00 2001 From: Trevor Strieber Date: Thu, 8 May 2014 14:19:37 -0400 Subject: Fixing typo. --- plugins/colorize/colorize.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 0696607d9..dc0947d4f 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -1,4 +1,4 @@ -# Plugin for highligthing file content +# Plugin for highlighting file content # Plugin highlights file content based on the filename extension. # If no highlighting method supported for given extension then it tries # guess it by looking for file content. @@ -25,4 +25,4 @@ colorize_via_pygmentize() { pygmentize -g "$FNAME" fi done -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2 From c1f5a1792be3f11f9b298a11232bc5913c8b71a2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen Date: Thu, 13 Feb 2014 17:33:27 -0700 Subject: This is already done in lib/theme-and-appearance.zsh and supports Darwin/BSD/etc --- plugins/common-aliases/common-aliases.plugin.zsh | 1 - 1 file changed, 1 deletion(-) (limited to 'plugins') diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index b19650fee..0ee17014b 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -3,7 +3,6 @@ # # ls, the common ones I use a lot shortened for rapid fire usage -alias ls='ls --color' #I like color alias l='ls -lFh' #size,show type,human readable alias la='ls -lAFh' #long list,show almost all,show type,human readable alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable -- cgit v1.2.3-70-g09d2 From 5e601d6515f9ee51c733aea71acf6757066943e2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen Date: Thu, 13 Feb 2014 17:41:38 -0700 Subject: Fix dud alias. Switch --max-depth for just -d As far as I can tell (tested on Linux & Darwin, BSD man page seems to agree), `-d` is pretty univerally accepted as the depth argument. So instead of doing a test, we can just use -d and call it a day. --- plugins/common-aliases/common-aliases.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 0ee17014b..228a39da0 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -38,7 +38,7 @@ alias -g NE="2> /dev/null" alias -g NUL="> /dev/null 2>&1" alias -g P="2>&1| pygmentize -l pytb" -alias dud='du --max-depth=1 -h' +alias dud='du -d 1 -h' alias duf='du -sh *' alias fd='find . -type d -name' alias ff='find . -type f -name' -- cgit v1.2.3-70-g09d2 From c0b094cf859899bd78db43a4dc59a0ae6786d49d Mon Sep 17 00:00:00 2001 From: pangratz Date: Mon, 3 Feb 2014 10:35:40 +0100 Subject: Fix function/alias naming clash between bower and bundle plugin Since the `bower` plugin specifies a `bi` alias and `bundle` plugin specifies a `bi` function, there is a name clash when using both plugins, which results in the message "Can't 'bundle install' outside a bundled project" when trying to execute `bower`. This adresses #2486 --- plugins/bundler/bundler.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 3338d78be..8571eeda3 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -3,6 +3,7 @@ alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" +alias bi="bundle_install" # The following is based on https://github.com/gma/bundler-exec @@ -15,7 +16,7 @@ done ## Functions -bi() { +bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then -- cgit v1.2.3-70-g09d2 From 6fc241b0d2f4690f7fd00f26eb91045a04c05fbd Mon Sep 17 00:00:00 2001 From: Frank Behrens Date: Fri, 18 Apr 2014 11:26:06 +0200 Subject: extract plugin will unzip *.sublime-package files --- plugins/extract/extract.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 7352e5bad..a6e16ddf7 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -52,7 +52,7 @@ function extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; - (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) -- cgit v1.2.3-70-g09d2 From b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 Mon Sep 17 00:00:00 2001 From: Josh Datko Date: Tue, 27 May 2014 10:34:03 -0600 Subject: Adds itunes vol command. Adds itunes vol, which takes an argument from 0 to 100 to set the volume from the shell. --- plugins/osx/osx.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 63760b5ff..a63f0ee05 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -174,12 +174,16 @@ function itunes() { next|previous) opt="$opt track" ;; + vol) + opt="set sound volume to $1" #$1 Due to the shift + ;; ""|-h|--help) echo "Usage: itunes