summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/adb/_adb9
-rw-r--r--plugins/ansible/README.md34
-rw-r--r--plugins/ansible/ansible.plugin.zsh28
-rw-r--r--plugins/ant/README.md12
-rw-r--r--plugins/asdf/asdf.plugin.zsh8
-rw-r--r--plugins/aws/README.md20
-rw-r--r--plugins/aws/aws.plugin.zsh64
-rw-r--r--plugins/brew/README.md2
-rw-r--r--plugins/brew/brew.plugin.zsh2
-rw-r--r--plugins/bwana/README.md9
-rw-r--r--plugins/cabal/README.md9
-rw-r--r--plugins/cake/README.md15
-rw-r--r--plugins/capistrano/README.md14
-rw-r--r--plugins/capistrano/capistrano.plugin.zsh4
-rw-r--r--plugins/celery/README.md9
-rw-r--r--plugins/cpanm/README.md9
-rw-r--r--plugins/cpanm/_cpanm3
-rw-r--r--plugins/debian/README.md75
-rw-r--r--plugins/docker/_docker8
-rw-r--r--plugins/doctl/README.md9
-rw-r--r--plugins/extract/README.md1
-rw-r--r--plugins/extract/_extract2
-rw-r--r--plugins/extract/extract.plugin.zsh2
-rw-r--r--plugins/fabric/README.md9
-rw-r--r--plugins/fabric/fabric.plugin.zsh1
-rw-r--r--plugins/fancy-ctrl-z/README.md6
-rw-r--r--plugins/git-flow-avh/README.md19
-rw-r--r--plugins/git-flow-avh/git-flow-avh.plugin.zsh22
-rw-r--r--plugins/git-hubflow/README.md24
-rw-r--r--plugins/git-hubflow/git-hubflow.plugin.zsh22
-rw-r--r--plugins/git/git.plugin.zsh9
-rw-r--r--plugins/golang/golang.plugin.zsh1
-rw-r--r--plugins/grails/README.md71
-rw-r--r--plugins/helm/README.md9
-rw-r--r--plugins/heroku/README.md9
-rw-r--r--plugins/homestead/README.md9
-rw-r--r--plugins/jake-node/README.md9
-rw-r--r--plugins/jenv/jenv.plugin.zsh2
-rw-r--r--plugins/jump/jump.plugin.zsh11
-rw-r--r--plugins/keychain/README.md45
-rw-r--r--plugins/keychain/keychain.plugin.zsh32
-rw-r--r--plugins/kops/README.md12
-rw-r--r--plugins/kops/kops.plugin.zsh6
-rw-r--r--plugins/kubectl/README.md3
-rw-r--r--plugins/kubectl/kubectl.plugin.zsh7
-rw-r--r--plugins/laravel/README.md45
-rw-r--r--plugins/laravel/laravel.plugin.zsh23
-rw-r--r--plugins/minikube/README.md9
-rw-r--r--plugins/mvn/README.md54
-rw-r--r--plugins/mvn/mvn.plugin.zsh549
-rw-r--r--plugins/osx/osx.plugin.zsh2
-rw-r--r--plugins/osx/spotify11
-rw-r--r--plugins/otp/otp.plugin.zsh54
-rw-r--r--plugins/per-directory-history/per-directory-history.zsh11
-rw-r--r--plugins/react-native/README.md67
-rw-r--r--plugins/react-native/react-native.plugin.zsh17
-rw-r--r--plugins/ros/README.mkd10
-rw-r--r--plugins/ros/_ros64
-rw-r--r--plugins/ssh-agent/ssh-agent.plugin.zsh47
-rw-r--r--plugins/stack/README.md9
-rw-r--r--plugins/suse/README.md40
-rw-r--r--plugins/suse/suse.plugin.zsh40
-rw-r--r--plugins/svcat/README.md9
-rw-r--r--plugins/svcat/svcat.plugin.zsh6
-rw-r--r--plugins/symfony/README.md9
-rw-r--r--plugins/symfony2/README.md28
-rw-r--r--plugins/symfony2/symfony2.plugin.zsh3
-rw-r--r--plugins/systemadmin/systemadmin.plugin.zsh6
-rw-r--r--plugins/timer/README.md17
-rw-r--r--plugins/timer/timer.plugin.zsh29
-rw-r--r--plugins/tmux/tmux.plugin.zsh2
-rw-r--r--plugins/transfer/transfer.plugin.zsh4
-rw-r--r--plugins/vagrant/_vagrant7
-rw-r--r--plugins/web-search/README.md2
-rw-r--r--plugins/web-search/web-search.plugin.zsh4
-rw-r--r--plugins/wp-cli/wp-cli.plugin.zsh2
-rw-r--r--plugins/yarn/README.md6
-rw-r--r--plugins/yarn/yarn.plugin.zsh6
-rw-r--r--plugins/z/z.sh6
79 files changed, 1403 insertions, 481 deletions
diff --git a/plugins/adb/_adb b/plugins/adb/_adb
index e3c20d751..78c457746 100644
--- a/plugins/adb/_adb
+++ b/plugins/adb/_adb
@@ -49,7 +49,12 @@ _arguments \
case "$state" in
specify_device)
_values -C 'devices' ${$(adb devices -l|awk 'NR>1&& $1 \
- {sub(/ +/," ",$0);gsub(":","\\:",$1); printf "%s[%s] ",$1, $NF}'):-""}
+ {sub(/ +/," ",$0); \
+ gsub(":","\\:",$1); \
+ for(i=1;i<=NF;i++) {
+ if($i ~ /model:/) { split($i,m,":") } \
+ else if($i ~ /product:/) { split($i,p,":") } } \
+ printf "%s[%s(%s)] ",$1, p[2], m[2]}'):-""}
return
;;
esac
@@ -59,4 +64,4 @@ if (( CURRENT == 1 )); then
return
fi
-_files \ No newline at end of file
+_files
diff --git a/plugins/ansible/README.md b/plugins/ansible/README.md
new file mode 100644
index 000000000..e0e6a19bb
--- /dev/null
+++ b/plugins/ansible/README.md
@@ -0,0 +1,34 @@
+# ansible plugin
+
+## Introduction
+
+The `ansible plugin` adds several aliases for useful [ansible](https://docs.ansible.com/ansible/latest/index.html) commands and [aliases](#aliases).
+
+To use it, add `ansible` to the plugins array of your zshrc file:
+
+```
+plugins=(... ansible)
+```
+
+## Aliases
+
+| Command | Description |
+|:-------------------------------------------|:--------------------------------------------------------------------|
+| `ansible-version` / `aver` | Show the version on ansible installed in this host |
+| `ansible-role-init <role name>` / `arinit` | Creates the Ansible Role as per Ansible Galaxy standard |
+| `a` | command `ansible` |
+| `aconf` | command `ansible-config` |
+| `acon` | command `ansible-console` |
+| `ainv` | command `ansible-inventory` |
+| `aplaybook` | command `ansible-playbook` |
+| `ainv` | command `ansible-inventory` |
+| `adoc` | command `ansible-doc` |
+| `agal` | command `ansible-galaxy` |
+| `apull` | command `ansible-pull` |
+| `aval` | command `ansible-vault` |
+
+## Maintainer
+
+### [Deepankumar](https://github.com/deepan10)
+
+[https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin](https://github.com/deepan10/oh-my-zsh/tree/features/ansible-plugin)
diff --git a/plugins/ansible/ansible.plugin.zsh b/plugins/ansible/ansible.plugin.zsh
new file mode 100644
index 000000000..f68ff23a5
--- /dev/null
+++ b/plugins/ansible/ansible.plugin.zsh
@@ -0,0 +1,28 @@
+# Functions
+function ansible-version(){
+ ansible --version
+}
+
+function ansible-role-init(){
+ if ! [ -z $1] ; then
+ echo "Ansible Role : $1 Creating...."
+ ansible-galaxy init $1
+ tree $1
+ else
+ echo "Usage : ansible-role-init <role name>"
+ echo "Example : ansible-role-init role1"
+ fi
+}
+
+# Alias
+alias a='ansible '
+alias aconf='ansible-config '
+alias acon='ansible-console '
+alias aver='ansible-version'
+alias arinit='ansible-role-init'
+alias aplaybook='ansible-playbook '
+alias ainv='ansible-inventory '
+alias adoc='ansible-doc '
+alias agal='ansible-galaxy '
+alias apull='ansible-pull '
+alias aval='ansible-vault' \ No newline at end of file
diff --git a/plugins/ant/README.md b/plugins/ant/README.md
new file mode 100644
index 000000000..5f88984ac
--- /dev/null
+++ b/plugins/ant/README.md
@@ -0,0 +1,12 @@
+# Ant
+
+This plugin provides completion for [Ant](https://ant.apache.org/).
+
+To use it add ant to the plugins array in your zshrc file.
+
+```bash
+plugins=(... ant)
+```
+
+It caches ant targets in a file named `.ant_targets`, you might want to add that to
+your `.gitignore` file.
diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh
index 75395c718..38b225538 100644
--- a/plugins/asdf/asdf.plugin.zsh
+++ b/plugins/asdf/asdf.plugin.zsh
@@ -1,9 +1,11 @@
# Find where asdf should be installed
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
+ASDF_COMPLETIONS="$ASDF_DIR/completions"
# If not found, check for Homebrew package
-if [[ ! -d $ASDF_DIR ]] && (( $+commands[brew] )); then
+if [[ ! -f "$ASDF_DIR/asdf.sh" ]] && (( $+commands[brew] )); then
ASDF_DIR="$(brew --prefix asdf)"
+ ASDF_COMPLETIONS="$ASDF_DIR/etc/bash_completion.d"
fi
# Load command
@@ -11,7 +13,7 @@ if [[ -f "$ASDF_DIR/asdf.sh" ]]; then
. "$ASDF_DIR/asdf.sh"
# Load completions
- if [[ -f "$ASDF_DIR/completions/asdf.bash" ]]; then
- . "$ASDF_DIR/completions/asdf.bash"
+ if [[ -f "$ASDF_COMPLETIONS/asdf.bash" ]]; then
+ . "$ASDF_COMPLETIONS/asdf.bash"
fi
fi
diff --git a/plugins/aws/README.md b/plugins/aws/README.md
new file mode 100644
index 000000000..8a45199b8
--- /dev/null
+++ b/plugins/aws/README.md
@@ -0,0 +1,20 @@
+# aws
+
+This plugin provides completion support for [awscli](https://docs.aws.amazon.com/cli/latest/reference/index.html)
+and a few utilities to manage AWS profiles: a function to change profiles with autocompletion support
+and a function to get the current AWS profile. The current AWS profile is also displayed in `RPROMPT`.
+
+To use it, add `aws` to the plugins array in your zshrc file.
+
+```zsh
+plugins=(... aws)
+```
+
+## Plugin commands
+
+* `asp <profile>`: Sets `AWS_PROFILE` and `AWS_DEFAULT_PROFILE` (legacy) to `<profile>`.
+It also adds it to your RPROMPT.
+
+* `agp`: Gets the current value of `AWS_PROFILE`.
+
+* `aws_profiles`: Lists the available profiles in the file referenced in `AWS_CONFIG_FILE` (default: ~/.aws/config). Used to provide completion for the `asp` function.
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 183b0f226..9cb69dd09 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -1,51 +1,47 @@
-_homebrew-installed() {
- type brew &> /dev/null
- _xit=$?
- if [ $_xit -eq 0 ];then
- # ok , we have brew installed
- # speculatively we check default brew prefix
- if [ -h /usr/local/opt/awscli ];then
- _brew_prefix="/usr/local/opt/awscli"
- else
- # ok , it is not default prefix
- # this call to brew is expensive ( about 400 ms ), so at least let's make it only once
- _brew_prefix=$(brew --prefix awscli)
- fi
- return 0
- else
- return $_xit
- fi
-}
-
-_awscli-homebrew-installed() {
- [ -r $_brew_prefix/libexec/bin/aws_zsh_completer.sh ] &> /dev/null
-}
-
-export AWS_HOME=~/.aws
-
function agp {
- echo $AWS_DEFAULT_PROFILE
+ echo $AWS_PROFILE
}
function asp {
- local rprompt=${RPROMPT/<aws:$(agp)>/}
+ local rprompt=${RPROMPT/<aws:$AWS_PROFILE>/}
export AWS_DEFAULT_PROFILE=$1
export AWS_PROFILE=$1
- export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$rprompt"
+ export RPROMPT="<aws:$AWS_PROFILE>$rprompt"
}
function aws_profiles {
- reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
+ reply=($(grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
}
compctl -K aws_profiles asp
-if which aws_zsh_completer.sh &>/dev/null; then
- _aws_zsh_completer_path=$(which aws_zsh_completer.sh 2>/dev/null)
-elif _homebrew-installed && _awscli-homebrew-installed; then
+
+# Load awscli completions
+
+_awscli-homebrew-installed() {
+ # check if Homebrew is installed
+ (( $+commands[brew] )) || return 1
+
+ # speculatively check default brew prefix
+ if [ -h /usr/local/opt/awscli ]; then
+ _brew_prefix=/usr/local/opt/awscli
+ else
+ # ok, it is not in the default prefix
+ # this call to brew is expensive (about 400 ms), so at least let's make it only once
+ _brew_prefix=$(brew --prefix awscli)
+ fi
+}
+
+# get aws_zsh_completer.sh location from $PATH
+_aws_zsh_completer_path="$commands[aws_zsh_completer.sh]"
+
+# otherwise check if installed via Homebrew
+if [[ -z $_aws_zsh_completer_path ]] && _awscli-homebrew-installed; then
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
+else
+ _aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh
fi
-[ -n "$_aws_zsh_completer_path" ] && [ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
-unset _aws_zsh_completer_path
+[[ -r $_aws_zsh_completer_path ]] && source $_aws_zsh_completer_path
+unset _aws_zsh_completer_path _brew_prefix
diff --git a/plugins/brew/README.md b/plugins/brew/README.md
index aab55ea39..c129a7652 100644
--- a/plugins/brew/README.md
+++ b/plugins/brew/README.md
@@ -17,3 +17,5 @@ plugins=(... brew)
| bubo | `brew update && brew outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated formulae. |
| bubc | `brew upgrade && brew cleanup` | Upgrade outdated, unpinned brews (with existing install options), then removes stale lock files and outdated downloads for formulae and casks, and removes old versions of installed formulae. |
| bubu | `bubo && bubc` | Updates Homebrew, lists outdated formulae, upgrades oudated and unpinned formulae, and removes stale and outdated downloads and versions. |
+| bcubo | `brew update && brew cask outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated casks. |
+| bcubc | `brew cask reinstall $(brew cask outdated) && brew cleanup` | Updates outdated casks, then runs cleanup. | \ No newline at end of file
diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh
index 60b81f8ec..cfbaa3480 100644
--- a/plugins/brew/brew.plugin.zsh
+++ b/plugins/brew/brew.plugin.zsh
@@ -4,6 +4,8 @@ alias brewsp='brew list --pinned'
alias bubo='brew update && brew outdated'
alias bubc='brew upgrade && brew cleanup'
alias bubu='bubo && bubc'
+alias bcubo='brew update && brew cask outdated'
+alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
if command mkdir "$ZSH_CACHE_DIR/.brew-completion-message" 2>/dev/null; then
print -P '%F{yellow}'Oh My Zsh brew plugin:
diff --git a/plugins/bwana/README.md b/plugins/bwana/README.md
new file mode 100644
index 000000000..8cbeaa32e
--- /dev/null
+++ b/plugins/bwana/README.md
@@ -0,0 +1,9 @@
+# Bwana
+
+This plugin provides a function to open `man` pages directly with [Bwana](https://www.bruji.com/bwana/).
+
+To use it add bwana to the plugins array in your zshrc file.
+
+```bash
+plugins=(... bwana)
+```
diff --git a/plugins/cabal/README.md b/plugins/cabal/README.md
new file mode 100644
index 000000000..b1106c40f
--- /dev/null
+++ b/plugins/cabal/README.md
@@ -0,0 +1,9 @@
+# Cabal
+
+This plugin provides completion for [Cabal](https://www.haskell.org/cabal/), a build tool for Haskell. It
+also provides a function `cabal_sandbox_info` that prints whether the current working directory is in a sandbox.
+
+To use it, add cabal to the plugins array of your zshrc file:
+```
+plugins=(... cabal)
+```
diff --git a/plugins/cake/README.md b/plugins/cake/README.md
new file mode 100644
index 000000000..aad92a3ec
--- /dev/null
+++ b/plugins/cake/README.md
@@ -0,0 +1,15 @@
+# Cake
+
+This plugin provides completion for [CakePHP](https://cakephp.org/).
+
+To use it add cake to the plugins array in your zshrc file.
+
+```bash
+plugins=(... cake)
+```
+
+## Note
+
+This plugin generates a cache file of the cake tasks found, named `.cake_task_cache`, in the current working directory.
+It is regenerated when the Cakefile is newer than the cache file. It is advised that you add the cake file to your
+`.gitignore` files.
diff --git a/plugins/capistrano/README.md b/plugins/capistrano/README.md
new file mode 100644
index 000000000..335b794fa
--- /dev/null
+++ b/plugins/capistrano/README.md
@@ -0,0 +1,14 @@
+# Capistrano
+
+This plugin provides completion for [Capistrano](https://capistranorb.com/).
+
+To use it add capistrano to the plugins array in your zshrc file.
+
+```bash
+plugins=(... capistrano)
+```
+
+For a working completion use the `capit` command instead of `cap`, because cap is a
+[reserved word in zsh](http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module).
+
+`capit` automatically runs cap with bundler if a Gemfile is found.
diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh
index 0b5559791..819572825 100644
--- a/plugins/capistrano/capistrano.plugin.zsh
+++ b/plugins/capistrano/capistrano.plugin.zsh
@@ -1,7 +1,7 @@
-# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work.
+# Added `capit` because `cap` is a reserved word. `cap` completion doesn't work.
# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
-func capit() {
+function capit() {
if [ -f Gemfile ]
then
bundle exec cap $*
diff --git a/plugins/celery/README.md b/plugins/celery/README.md
new file mode 100644
index 000000000..d2597f702
--- /dev/null
+++ b/plugins/celery/README.md
@@ -0,0 +1,9 @@
+# Celery
+
+This plugin provides completion for [Celery](http://www.celeryproject.org/).
+
+To use it add celery to the plugins array in your zshrc file.
+
+```bash
+plugins=(... celery)
+```
diff --git a/plugins/cpanm/README.md b/plugins/cpanm/README.md
new file mode 100644
index 000000000..3803e3e00
--- /dev/null
+++ b/plugins/cpanm/README.md
@@ -0,0 +1,9 @@
+# Cpanm
+
+This plugin provides completion for [Cpanm](https://github.com/miyagawa/cpanminus) ([docs](https://metacpan.org/pod/App::cpanminus)).
+
+To use it add cpanm to the plugins array in your zshrc file.
+
+ ```bash
+plugins=(... cpanm)
+```
diff --git a/plugins/cpanm/_cpanm b/plugins/cpanm/_cpanm
index 58451d35a..ff9ae1c15 100644
--- a/plugins/cpanm/_cpanm
+++ b/plugins/cpanm/_cpanm
@@ -6,9 +6,6 @@
#
# Current supported cpanm version: 1.4000 (Tue Mar 8 01:00:49 PST 2011)
#
-# The latest code is always located at:
-# https://github.com/rshhh/cpanminus/blob/master/etc/_cpanm
-#
local arguments curcontext="$curcontext"
typeset -A opt_args
diff --git a/plugins/debian/README.md b/plugins/debian/README.md
new file mode 100644
index 000000000..a676674dc
--- /dev/null
+++ b/plugins/debian/README.md
@@ -0,0 +1,75 @@
+# debian
+
+This plugin provides debian related zsh aliases.
+To use it add `debian` to the plugins array in your zshrc file.
+
+```zsh
+plugins=(... debian)
+```
+
+## Common Aliases
+
+| Alias | Command | Description |
+| -------- | ------------------------------------------------------------------------------|--------------------------------------------------------------------------- |
+| `age` | apt-get | Command line tool for handling packages |
+| `api` | aptitude | Same functionality as `apt-get`, provides extra options while installation |
+| `acs` | apt-cache search | Command line tool for searching apt software package cache |
+| `aps` | aptitude search | Searches installed packages using aptitude |
+| `as` | aptitude -F \"* %p -> %d \n(%v/%V)\" \ -no-gui --disable-columns search | - |
+| `afs` | apt-file search --regexp | Search file in packages |
+| `asrc` | apt-get source | Fetch source packages through `apt-get` |
+| `app` | apt-cache policy | Displays priority of package sources |
+
+## Superuser Operations Aliases
+
+| Alias | Command | Description |
+| -------- | -------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------- |
+| `aac` | sudo $apt_pref autoclean | Clears out the local repository of retrieved package files |
+| `abd` | sudo $apt_pref build-dep | Installs all dependencies for building packages |
+| `ac` | sudo $apt_pref clean | Clears out the local repository of retrieved package files except lock files |
+| `ad` | sudo $apt_pref update | Updates the package lists for upgrades for packages |
+| `adg` | sudo $apt_pref update && sudo $apt_pref $apt_upgr | Update and upgrade packages |
+| `adu` | sudo $apt_pref update && sudo $apt_pref dist-upgrade | Smart upgrade that handles dependencies |
+| `afu` | sudo apt-file update | Update the files in packages |
+| `au` | sudo $apt_pref $apt_upgr | - |
+| `ai` | sudo $apt_pref install | Command-line tool to install package |
+| `ail` | sed -e 's/ */ /g' -e 's/ *//' &#124; cut -s -d ' ' -f 1 &#124; "' xargs sudo $apt_pref install | Install all packages given on the command line while using only the first word of each line |
+| `ap` | sudo $apt_pref purge | Removes packages along with configuration files |
+| `ar` | sudo $apt_pref remove | Removes packages, keeps the configuration files |
+| `ads` | sudo apt-get dselect-upgrade | Installs packages from list and removes all not in the list |
+| `dia` | sudo dpkg -i ./*.deb | Install all .deb files in the current directory |
+| `di` | sudo dpkg -i | Install all .deb files in the current directory |
+| `kclean` | sudo aptitude remove -P ?and(~i~nlinux-(ima&#124;hea) ?not(~n`uname -r`)) | Remove ALL kernel images and headers EXCEPT the one in use |
+
+- `$apt_pref` - Use apt or aptitude if installed, fallback is apt-get.
+- `$apt_upgr` - Use upgrade.
+
+## Aliases - Commands using `su`
+
+| Alias | Command |
+| -------- | ------------------------------------------------------------------------------|
+| `aac` | su -ls \'$apt_pref autoclean\' root |
+| `ac` | su -ls \'$apt_pref clean\' root |
+| `ad` | su -lc \'$apt_pref update\' root |
+| `adg` | su -lc \'$apt_pref update && aptitude $apt_upgr\' root |
+| `adu` | su -lc \'$apt_pref update && aptitude dist-upgrade\' root |
+| `afu` | su -lc "apt-file update |
+| `ag` | su -lc \'$apt_pref $apt_upgr\' root |
+| `dia` | su -lc "dpkg -i ./*.deb" root |
+
+## Miscellaneous Aliases
+
+| Alias | Command | Description |
+| -------- | -------------------------------------------------|---------------------------------------- |
+| `allpkgs`| aptitude search -F "%p" --disable-columns ~i | Display all installed packages |
+| `mydeb` | time dpkg-buildpackage -rfakeroot -us -uc | Create a basic .deb package |
+
+## Functions
+
+| Fucntion | Description |
+|-----------------------|-------------------------------------------------------------------------------|
+| `apt-copy` | Create a simple script that can be used to 'duplicate' a system |
+| `apt-history` | Displays apt history for a command |
+| `kerndeb` | Builds kernel packages |
+| `apt-list-packages` | List packages by size |
+
diff --git a/plugins/docker/_docker b/plugins/docker/_docker
index 31b83c777..54b5e59c5 100644
--- a/plugins/docker/_docker
+++ b/plugins/docker/_docker
@@ -1,6 +1,6 @@
#compdef docker dockerd
#
-# zsh completion for docker (https://docker.com)
+# zsh completion for docker (http://docker.com)
#
# version: 0.3.0
# github: https://github.com/felixr/docker-zsh-completion
@@ -617,6 +617,7 @@ __docker_container_subcommand() {
"($help)*--dns=[Custom DNS servers]:DNS server: "
"($help)*--dns-option=[Custom DNS options]:DNS option: "
"($help)*--dns-search=[Custom DNS search domains]:DNS domains: "
+ "($help)*--domainname=[Container NIS domain name]:domainname:_hosts"
"($help)*"{-e=,--env=}"[Environment variables]:environment variable: "
"($help)--entrypoint=[Overwrite the default entrypoint of the image]:entry point: "
"($help)*--env-file=[Read environment variables from a file]:environment file:_files"
@@ -2214,7 +2215,7 @@ __docker_stack_subcommand() {
_arguments $(__docker_arguments) \
$opts_help \
"($help)--bundle-file=[Path to a Distributed Application Bundle file]:dab:_files -g \"*.dab\"" \
- "($help -c --compose-file)"{-c=,--compose-file=}"[Path to a Compose file]:compose file:_files -g \"*.(yml|yaml)\"" \
+ "($help -c --compose-file)"{-c=,--compose-file=}"[Path to a Compose file, or '-' to read from stdin]:compose file:_files -g \"*.(yml|yaml)\"" \
"($help)--with-registry-auth[Send registry authentication details to Swarm agents]" \
"($help -):stack:__docker_complete_stacks" && ret=0
;;
@@ -2285,6 +2286,9 @@ __docker_swarm_subcommand() {
$opts_help \
"($help)--advertise-addr=[Advertised address]:ip\:port: " \
"($help)--data-path-addr=[Data path IP or interface]:ip " \
+ "($help)--data-path-port=[Data Path Port]:port " \
+ "($help)--default-addr-pool=[Default address pool]" \
+ "($help)--default-addr-pool-mask-length=[Default address pool subnet mask length]" \
"($help)--autolock[Enable manager autolocking]" \
"($help)--availability=[Availability of the node]:availability:(active drain pause)" \
"($help)--cert-expiry=[Validity period for node certificates]:duration: " \
diff --git a/plugins/doctl/README.md b/plugins/doctl/README.md
new file mode 100644
index 000000000..a81e90b0a
--- /dev/null
+++ b/plugins/doctl/README.md
@@ -0,0 +1,9 @@
+# Doctl
+
+This plugin provides completion for [Doctl](https://github.com/digitalocean/doctl).
+
+To use it add doctl to the plugins array in your zshrc file.
+
+```bash
+plugins=(... doctl)
+```
diff --git a/plugins/extract/README.md b/plugins/extract/README.md
index c6bdd36dd..83b878c32 100644
--- a/plugins/extract/README.md
+++ b/plugins/extract/README.md
@@ -19,6 +19,7 @@ plugins=(... extract)
| `7z` | 7zip file |
| `Z` | Z archive (LZW) |
| `apk` | Android app file |
+| `aar` | Android library file |
| `bz2` | Bzip2 file |
| `deb` | Debian package |
| `gz` | Gzip file |
diff --git a/plugins/extract/_extract b/plugins/extract/_extract
index 3baefa339..33d49fcc5 100644
--- a/plugins/extract/_extract
+++ b/plugins/extract/_extract
@@ -3,5 +3,5 @@
_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
- "*::archive file:_files -g '(#i)*.(7z|Z|apk|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \
+ "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \
&& return 0
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
index 4c72ce870..5e9b9ff24 100644
--- a/plugins/extract/extract.plugin.zsh
+++ b/plugins/extract/extract.plugin.zsh
@@ -46,7 +46,7 @@ extract() {
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.z) uncompress "$1" ;;
- (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.whl) unzip "$1" -d $extract_dir ;;
+ (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
diff --git a/plugins/fabric/README.md b/plugins/fabric/README.md
new file mode 100644
index 000000000..cf0fa81f4
--- /dev/null
+++ b/plugins/fabric/README.md
@@ -0,0 +1,9 @@
+# Fabric
+
+This plugin provides completion for [Fabric](https://www.fabfile.org/).
+
+To use it add fabric to the plugins array in your zshrc file.
+
+```bash
+plugins=(... fabric)
+```
diff --git a/plugins/fabric/fabric.plugin.zsh b/plugins/fabric/fabric.plugin.zsh
index aca411329..e69de29bb 100644
--- a/plugins/fabric/fabric.plugin.zsh
+++ b/plugins/fabric/fabric.plugin.zsh
@@ -1 +0,0 @@
-# DECLARION: This plugin was created by vhbit. What I did is just making a portal from https://github.com/vhbit/fabric-zsh-autocomplete.
diff --git a/plugins/fancy-ctrl-z/README.md b/plugins/fancy-ctrl-z/README.md
index a7670fa2c..f1b1dfa5c 100644
--- a/plugins/fancy-ctrl-z/README.md
+++ b/plugins/fancy-ctrl-z/README.md
@@ -1,10 +1,10 @@
# Use Ctrl-Z to switch back to Vim
-I frequently need to execute random command in my shell. To achieve it I pause
+I frequently need to execute random commands in my shell. To achieve it I pause
Vim by pressing Ctrl-z, type command and press fg<Enter> to switch back to Vim.
-The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back
+The fg part really hurts me. I just wanted to hit Ctrl-z once again to get back
to Vim. I could not find a solution, so I developed one on my own that
-works wonderfully with ZSH
+works wonderfully with ZSH.
Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
diff --git a/plugins/git-flow-avh/README.md b/plugins/git-flow-avh/README.md
new file mode 100644
index 000000000..0768d93ea
--- /dev/null
+++ b/plugins/git-flow-avh/README.md
@@ -0,0 +1,19 @@
+# git-flow (AVH Edition) plugin
+
+This plugin adds completion for the [git-flow (AVH Edition)](https://github.com/petervanderdoes/gitflow-avh).
+The AVH Edition of the git extensions that provides high-level repository operations for [Vincent Driessen's branching model](https://nvie.com/posts/a-successful-git-branching-model/).
+
+To use it, add `git-flow-avh` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... git-flow-avh)
+```
+
+## Requirements
+
+1. The git-flow tool has to be [installed](https://github.com/petervanderdoes/gitflow-avh#installing-git-flow)
+ separately.
+
+2. You have to use zsh's git completion instead of the git project's git completion. This is typically
+ done by default so you don't need to do anything else. If you installed git with Homebrew you
+ might have to uninstall the git completion it's bundled with.
diff --git a/plugins/git-flow-avh/git-flow-avh.plugin.zsh b/plugins/git-flow-avh/git-flow-avh.plugin.zsh
index db8b5ff89..860ca55c5 100644
--- a/plugins/git-flow-avh/git-flow-avh.plugin.zsh
+++ b/plugins/git-flow-avh/git-flow-avh.plugin.zsh
@@ -1,25 +1,3 @@
-#!zsh
-#
-# Installation
-# ------------
-#
-# To achieve git-flow completion nirvana:
-#
-# 0. Update your zsh's git-completion module to the newest version.
-# From here: https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_git
-#
-# 1. Install this file. Either:
-#
-# a. Place it in your .zshrc:
-#
-# b. Or, copy it somewhere (e.g. ~/.git-flow-completion.zsh) and put the following line in
-# your .zshrc:
-#
-# source ~/.git-flow-completion.zsh
-#
-# c. Or, use this file as a oh-my-zsh plugin.
-#
-
_git-flow ()
{
local curcontext="$curcontext" state line
diff --git a/plugins/git-hubflow/README.md b/plugins/git-hubflow/README.md
new file mode 100644
index 000000000..dada60d78
--- /dev/null
+++ b/plugins/git-hubflow/README.md
@@ -0,0 +1,24 @@
+# git-hubflow plugin
+
+This plugin adds completion for [HubFlow](https://datasift.github.io/gitflow/) (GitFlow for GitHub), as well as some
+aliases for common commands. HubFlow is a git extension to make it easy to use GitFlow with GitHub. Based on the
+original gitflow extension for git.
+
+The hubflow tool has to be [installed](https://github.com/datasift/gitflow#installation) separately.
+
+To use it, add `git-hubflow` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... git-hubflow)
+```
+
+## Aliases
+
+| Alias | Command | Description |
+|-------|------------------|------------------------------------------------------------------|
+| ghf | `git hf` | Print command overview |
+| ghff | `git hf feature` | Manage your feature branches |
+| ghfr | `git hf release` | Manage your release branches |
+| ghfh | `git hf hotfix` | Manage your hotfix branches |
+| ghfs | `git hf support` | Manage your support branches |
+| ghfu | `git hf update` | Pull upstream changes down into your master and develop branches |
diff --git a/plugins/git-hubflow/git-hubflow.plugin.zsh b/plugins/git-hubflow/git-hubflow.plugin.zsh
index 8d968229f..05479f7e6 100644
--- a/plugins/git-hubflow/git-hubflow.plugin.zsh
+++ b/plugins/git-hubflow/git-hubflow.plugin.zsh
@@ -1,25 +1,3 @@
-#!zsh
-#
-# Installation
-# ------------
-#
-# To achieve git-hubflow completion nirvana:
-#
-# 0. Update your zsh's git-completion module to the newest version.
-# From here: https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_git
-#
-# 1. Install this file. Either:
-#
-# a. Place it in your .zshrc:
-#
-# b. Or, copy it somewhere (e.g. ~/.git-hubflow-completion.zsh) and put the following line in
-# your .zshrc:
-#
-# source ~/.git-hubflow-completion.zsh
-#
-# c. Or, use this file as an oh-my-zsh plugin.
-#
-
alias ghf='git hf'
alias ghff='git hf feature'
alias ghfr='git hf release'
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 45a706173..4277ac664 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -112,8 +112,8 @@ ggf() {
git push --force origin "${b:=$1}"
}
ggfl() {
-[[ "$#" != 1 ]] && local b="$(git_current_branch)"
-git push --force-with-lease origin "${b:=$1}"
+ [[ "$#" != 1 ]] && local b="$(git_current_branch)"
+ git push --force-with-lease origin "${b:=$1}"
}
compdef _git ggf=git-checkout
@@ -155,10 +155,10 @@ compdef _git ggu=git-checkout
alias ggpur='ggu'
compdef _git ggpur=git-checkout
-alias ggpull='git pull origin $(git_current_branch)'
+alias ggpull='git pull origin "$(git_current_branch)"'
compdef _git ggpull=git-checkout
-alias ggpush='git push origin $(git_current_branch)'
+alias ggpush='git push origin "$(git_current_branch)"'
compdef _git ggpush=git-checkout
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
@@ -220,6 +220,7 @@ alias grbm='git rebase master'
alias grbs='git rebase --skip'
alias grh='git reset'
alias grhh='git reset --hard'
+alias groh='git reset origin/$(git_current_branch) --hard'
alias grm='git rm'
alias grmc='git rm --cached'
alias grmv='git remote rename'
diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
index 919c98629..8284ab83c 100644
--- a/plugins/golang/golang.plugin.zsh
+++ b/plugins/golang/golang.plugin.zsh
@@ -126,6 +126,7 @@ __go_tool_complete() {
;;
help)
_values "${commands[@]}" \
+ 'environment[show Go environment variables available]' \
'gopath[GOPATH environment variable]' \
'packages[description of package lists]' \
'remote[remote import path syntax]' \
diff --git a/plugins/grails/README.md b/plugins/grails/README.md
new file mode 100644
index 000000000..64b4a9f07
--- /dev/null
+++ b/plugins/grails/README.md
@@ -0,0 +1,71 @@
+# Grails plugin
+
+This plugin adds completion for the [Grails 2 CLI](https://grails.github.io/grails2-doc/2.5.x/guide/commandLine.html)
+
+To use it, add `grails` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... grails)
+```
+
+It looks for scripts in the following paths:
+
+- `$GRAILS_HOME/scripts`
+- `~/.grails/scripts`
+- `./scripts`
+- `./plugins/*/scripts`
+
+## Grails Commands
+- `add-proxy`
+- `alias`
+- `bootstrap`
+- `bug-report`
+- `clean`
+- `clean-all`
+- `clear-proxy`
+- `compile`
+- `console`
+- `create-app`
+- `create-controller`
+- `create-domain-class`
+- `create-filters`
+- `create-integration-test`
+- `create-multi-project-build`
+- `create-plugin`
+- `create-pom`
+- `create-script`
+- `create-service`
+- `create-tag-lib`
+- `create-unit-test`
+- `dependency-report`
+- `doc`
+- `help`
+- `init`
+- `install-app-templates`
+- `install-dependency`
+- `install-plugin`
+- `install-templates`
+- `integrate-with`
+- `interactive`
+- `list-plugin-updates`
+- `list-plugins`
+- `migrate-docs`
+- `package`
+- `package-plugin`
+- `plugin-info`
+- `refresh-dependencies`
+- `remove-proxy`
+- `run-app`
+- `run-script`
+- `run-war`
+- `set-grails-version`
+- `set-proxy`
+- `set-version`
+- `shell`
+- `stats`
+- `stop-app`
+- `test-app`
+- `uninstall-plugin`
+- `url-mappings-report`
+- `war`
+- `wrapper`
diff --git a/plugins/helm/README.md b/plugins/helm/README.md
new file mode 100644
index 000000000..49844c78f
--- /dev/null
+++ b/plugins/helm/README.md
@@ -0,0 +1,9 @@
+# Helm plugin
+
+This plugin adds completion for [Helm](https://helm.sh/), the Kubernetes package manager.
+
+To use it, add `helm` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... helm)
+```
diff --git a/plugins/heroku/README.md b/plugins/heroku/README.md
new file mode 100644
index 000000000..2bf92c9de
--- /dev/null
+++ b/plugins/heroku/README.md
@@ -0,0 +1,9 @@
+# Heroku
+
+This plugin provides completion for the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
+
+To use it add heroku to the plugins array in your zshrc file:
+
+```bash
+plugins=(... heroku)
+```
diff --git a/plugins/homestead/README.md b/plugins/homestead/README.md
new file mode 100644
index 000000000..476302371
--- /dev/null
+++ b/plugins/homestead/README.md
@@ -0,0 +1,9 @@
+# Homestead
+
+This plugin provides completion for [Homestead](https://laravel.com/docs/homestead).
+
+To use it add homestead to the plugins array in your zshrc file.
+
+```bash
+plugins=(... homestead)
+```
diff --git a/plugins/jake-node/README.md b/plugins/jake-node/README.md
new file mode 100644
index 000000000..78ca8d85f
--- /dev/null
+++ b/plugins/jake-node/README.md
@@ -0,0 +1,9 @@
+# Jake
+
+This plugin provides completion for [Jake](http://jakejs.com/).
+
+To use it add jake-node to the plugins array in your zshrc file.
+
+```bash
+plugins=(... jake-node)
+```
diff --git a/plugins/jenv/jenv.plugin.zsh b/plugins/jenv/jenv.plugin.zsh
index 14c586be9..2eda8037b 100644
--- a/plugins/jenv/jenv.plugin.zsh
+++ b/plugins/jenv/jenv.plugin.zsh
@@ -1,4 +1,4 @@
-jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv")
+jenvdirs=("$HOME/.jenv" "/usr/local" "/usr/local/jenv" "/opt/jenv")
FOUND_JENV=0
for jenvdir in $jenvdirs; do
diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
index a19a86022..d161a6da0 100644
--- a/plugins/jump/jump.plugin.zsh
+++ b/plugins/jump/jump.plugin.zsh
@@ -28,11 +28,18 @@ unmark() {
}
marks() {
+ local max=0
+ for link in $MARKPATH/*(@); do
+ if [[ ${#link:t} -gt $max ]]; then
+ max=${#link:t}
+ fi
+ done
+ local printf_markname_template="$(printf -- "%%%us " "$max")"
for link in $MARKPATH/*(@); do
local markname="$fg[cyan]${link:t}$reset_color"
local markpath="$fg[blue]$(readlink $link)$reset_color"
- printf "%s\t" $markname
- printf -- "-> %s \t\n" $markpath
+ printf -- "$printf_markname_template" "$markname"
+ printf -- "-> %s\n" "$markpath"
done
}
diff --git a/plugins/keychain/README.md b/plugins/keychain/README.md
new file mode 100644
index 000000000..c603f6790
--- /dev/null
+++ b/plugins/keychain/README.md
@@ -0,0 +1,45 @@
+# keychain plugin
+
+This plugin starts automatically [`keychain`](https://www.funtoo.org/Keychain)
+to set up and load whichever credentials you want for both gpg and ssh
+connections.
+
+To enable it, add `keychain` to your plugins:
+
+```zsh
+plugins=(... keychain)
+```
+
+**NOTE**: It is HIGHLY recommended to also enable the `gpg-agent` plugin.
+
+## Instructions
+
+**IMPORTANT: put these settings _before_ the line that sources oh-my-zsh**
+
+**To adjust the agents** that keychain manages, use the `agents` style as
+shown below. By default, only the `gpg` agent is managed.
+
+```zsh
+zstyle :omz:plugins:keychain agents gpg,ssh
+```
+
+To **load multiple identities** use the `identities` style, For example:
+
+```zsh
+zstyle :omz:plugins:keychain identities id_ed25519 id_github 2C5879C2
+```
+
+**To pass additional options** to the `keychain` program, use the
+`options` style; for example:
+
+```zsh
+zstyle :omz:plugins:keychain options --quiet
+```
+
+## Credits
+
+Based on code from the `ssh-agent` plugin.
+
+## References
+
+- [Keychain](https://www.funtoo.org/Keychain)
diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh
new file mode 100644
index 000000000..af34793e7
--- /dev/null
+++ b/plugins/keychain/keychain.plugin.zsh
@@ -0,0 +1,32 @@
+function _start_agent() {
+ local agents
+ local -a identities
+ local -a options
+ local _keychain_env_sh
+ local _keychain_env_sh_gpg
+
+ # load agents to start.
+ zstyle -s :omz:plugins:keychain agents agents
+
+ # load identities to manage.
+ zstyle -a :omz:plugins:keychain identities identities
+
+ # load additional options
+ zstyle -a :omz:plugins:keychain options options
+
+ # start keychain...
+ keychain ${^options:-} --agents ${agents:-gpg} ${^identities}
+
+ # Get the filenames to store/lookup the environment from
+ _keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh"
+ _keychain_env_sh_gpg="$HOME/.keychain/$SHORT_HOST-sh-gpg"
+
+ # Source environment settings.
+ [ -f "$_keychain_env_sh" ] && . "$_keychain_env_sh"
+ [ -f "$_keychain_env_sh_gpg" ] && . "$_keychain_env_sh_gpg"
+}
+
+_start_agent
+
+# tidy up after ourselves
+unfunction _start_agent
diff --git a/plugins/kops/README.md b/plugins/kops/README.md
new file mode 100644
index 000000000..5d9b5f8d6
--- /dev/null
+++ b/plugins/kops/README.md
@@ -0,0 +1,12 @@
+# kops
+
+This plugin provides completion for [kops](https://github.com/kubernetes/kops) (Kubernetes Operations),
+the command line interface to get a production grade Kubernetes cluster up and running.
+
+To use it, add `kops` to the plugins array in your zshrc file.
+
+```
+plugins=(... kops)
+```
+
+**Author:** [@nmrony](https://github.com/nmrony)
diff --git a/plugins/kops/kops.plugin.zsh b/plugins/kops/kops.plugin.zsh
index f707f3aff..0c38ce2df 100644
--- a/plugins/kops/kops.plugin.zsh
+++ b/plugins/kops/kops.plugin.zsh
@@ -1,9 +1,3 @@
-# Autocompletion for kops (Kubernetes Operations),
-# the command line interface to get a production grade
-# Kubernetes cluster up and running
-
-# Author: https://github.com/nmrony
-
if [ $commands[kops] ]; then
source <(kops completion zsh)
fi
diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md
index a93a9339e..3343f0195 100644
--- a/plugins/kubectl/README.md
+++ b/plugins/kubectl/README.md
@@ -14,6 +14,7 @@ plugins=(... kubectl)
| Alias | Command | Description |
|:--------|:------------------------------------|:-------------------------------------------------------------------------------------------------|
| k | `kubectl` | The kubectl command |
+| kca | `kubectl --all-namespaces` | The kubectl command targeting all namespaces |
| kaf | `kubectl apply -f` | Apply a YML file |
| keti | `kubectl exec -ti` | Drop into an interactive terminal on a container |
| | | **Manage configuration quickly to switch contexts between local, dev and staging** |
@@ -46,6 +47,7 @@ plugins=(... kubectl)
| kdeli | `kubectl delete ingress` | Delete ingress resources matching passed argument |
| | | **Namespace management** |
| kgns | `kubectl get namespaces` | List the current namespaces in a cluster |
+| kcn | `kubectl config set-context ...` | Change current namespace |
| kens | `kubectl edit namespace` | Edit namespace resource from the default editor |
| kdns | `kubectl describe namespace` | Describe namespace resource in detail |
| kdelns | `kubectl delete namespace` | Delete the namespace. WARNING! This deletes everything in the namespace |
@@ -67,6 +69,7 @@ plugins=(... kubectl)
| kdeld | `kubectl delete deployment` | Delete the deployment |
| ksd | `kubectl scale deployment` | Scale a deployment |
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
+| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
| | | **Rollout management** |
| kgrs | `kubectl get rs` | To see the ReplicaSet `rs` created by the deployment |
| krh | `kubectl rollout history` | Check the revisions of this deployment |
diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
index 4cfe3f45b..ab7a1a0a4 100644
--- a/plugins/kubectl/kubectl.plugin.zsh
+++ b/plugins/kubectl/kubectl.plugin.zsh
@@ -13,6 +13,9 @@ fi
# This command is used a LOT both below and in daily life
alias k=kubectl
+# Execute a kubectl command against all namespaces
+alias kca='f(){ kubectl "$@" --all-namespaces; unset -f f; }; f'
+
# Apply a YML file
alias kaf='kubectl apply -f'
@@ -59,6 +62,7 @@ alias kgns='kubectl get namespaces'
alias kens='kubectl edit namespace'
alias kdns='kubectl describe namespace'
alias kdelns='kubectl delete namespace'
+alias kcn='kubectl config set-context $(kubectl config current-context) --namespace'
# ConfigMap management
alias kgcm='kubectl get configmaps'
@@ -80,6 +84,9 @@ alias kdd='kubectl describe deployment'
alias kdeld='kubectl delete deployment'
alias ksd='kubectl scale deployment'
alias krsd='kubectl rollout status deployment'
+kres(){
+ kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
+}
# Rollout management.
alias kgrs='kubectl get rs'
diff --git a/plugins/laravel/README.md b/plugins/laravel/README.md
index 067c1e9fb..44798b68d 100644
--- a/plugins/laravel/README.md
+++ b/plugins/laravel/README.md
@@ -1,19 +1,40 @@
-# Laravel plugin
+# Laravel
This plugin adds aliases and autocompletion for Laravel [Artisan](https://laravel.com/docs/artisan) and [Bob](http://daylerees.github.io/laravel-bob/) command-line interfaces.
-**NOTE:** completion might not work for recent Laravel versions since it hasn't been updated since 2012.
-In that case, check out plugins `laravel4` and `laravel5`.
-
-To use it, add `laravel` to the plugins array in your zshrc file:
-
-```zsh
+```
plugins=(... laravel)
```
-## Aliases
+| Alias | Description |
+|:-:|:-:|
+| `artisan` | `php artisan` |
+| `pas` | `php artisan serve` |
+
+## Database
+
+| Alias | Description |
+|:-:|:-:|
+| `pam` | `php artisan migrate` |
+| `pamf` | `php artisan migrate:fresh` |
+| `pamfs` | `php artisan migrate:fresh --seed` |
+| `pamr` | `php artisan migrate:rollback` |
+| `pads` | `php artisan db:seed` |
+
+## Makers
+
+| Alias | Description |
+|:-:|:-:|
+| `pamm` | `php artisan make:model` |
+| `pamc` | `php artisan make:controller` |
+| `pams` | `php artisan make:seeder` |
+| `pamt` | `php artisan make:test` |
+
+## Clears
-| Alias | Command | Description |
-|-----------|--------------------------|----------------------|
-| artisan | `php artisan` | Main Artisan command |
-| bob | `php artisan bob::build` | Main Bob command |
+| Alias | Description |
+|:-:|:-:|
+| `pacac` | `php artisan cache:clear` |
+| `pacoc` | `php artisan config:clear` |
+| `pavic` | `php artisan view:clear` |
+| `paroc` | `php artisan route:clear` |
diff --git a/plugins/laravel/laravel.plugin.zsh b/plugins/laravel/laravel.plugin.zsh
index ed932ee89..7ddfd85ba 100644
--- a/plugins/laravel/laravel.plugin.zsh
+++ b/plugins/laravel/laravel.plugin.zsh
@@ -1,3 +1,26 @@
#!zsh
alias artisan='php artisan'
alias bob='php artisan bob::build'
+
+# Development
+alias pas='php artisan serve'
+
+# Database
+alias pam='php artisan migrate'
+alias pamf='php artisan migrate:fresh'
+alias pamfs='php artisan migrate:fresh --seed'
+alias pamr='php artisan migrate:rollback'
+alias pads='php artisan db:seed'
+
+# Makers
+alias pamm='php artisan make:model'
+alias pamc='php artisan make:controller'
+alias pams='php artisan make:seeder'
+alias pamt='php artisan make:test'
+
+
+# Clears
+alias pacac='php artisan cache:clear'
+alias pacoc='php artisan config:clear'
+alias pavic='php artisan view:clear'
+alias paroc='php artisan route:clear'
diff --git a/plugins/minikube/README.md b/plugins/minikube/README.md
new file mode 100644
index 000000000..eb2dd9b46
--- /dev/null
+++ b/plugins/minikube/README.md
@@ -0,0 +1,9 @@
+# minikube
+
+This plugin provides completion for [minikube](https://github.com/kubernetes/minikube).
+
+To use it, add `minikube` to the plugins array in your zshrc file.
+
+```
+plugins=(... minikube)
+```
diff --git a/plugins/mvn/README.md b/plugins/mvn/README.md
index 986ac84a4..88f5be8ba 100644
--- a/plugins/mvn/README.md
+++ b/plugins/mvn/README.md
@@ -1,7 +1,7 @@
-## Introduction
+# mvn plugin
-The [mvn plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/mvn) provides many
-[useful aliases](#aliases) as well as completion for the `mvn` command.
+The mvn plugin provides many [useful aliases](#aliases) as well as completion for
+the [Apache Maven](https://maven.apache.org/) command (`mvn`).
Enable it by adding `mvn` to the plugins array in your zshrc file:
```zsh
@@ -10,25 +10,49 @@ plugins=(... mvn)
## Aliases
+The plugin aliases mvn to a function that calls `mvnw` (the [Maven Wrapper](https://github.com/takari/maven-wrapper))
+if it's found, or the mvn command otherwise.
+
| Alias | Command |
|:---------------------|:------------------------------------------------|
-| `mvncie` | `mvn clean install eclipse:eclipse` |
+| `mvn!` | `mvn -f <root>/pom.xml` |
+| `mvnag` | `mvn archetype:generate` |
+| `mvnboot` | `mvn spring-boot:run` |
+| `mvnc` | `mvn clean` |
+| `mvncd` | `mvn clean deploy` |
+| `mvnce` | `mvn clean eclipse:clean eclipse:eclipse` |
| `mvnci` | `mvn clean install` |
+| `mvncie` | `mvn clean install eclipse:eclipse` |
+| `mvncini` | `mvn clean initialize` |
| `mvncist` | `mvn clean install -DskipTests` |
| `mvncisto` | `mvn clean install -DskipTests --offline` |
-| `mvne` | `mvn eclipse:eclipse` |
-| `mvncv` | `mvn clean verify` |
-| `mvnd` | `mvn deploy` |
-| `mvnp` | `mvn package` |
-| `mvnc` | `mvn clean` |
| `mvncom` | `mvn compile` |
+| `mvncp` | `mvn clean package` |
| `mvnct` | `mvn clean test` |
-| `mvnt` | `mvn test` |
-| `mvnag` | `mvn archetype:generate` |
-| `mvn-updates` | `mvn versions:display-dependency-updates` |
-| `mvntc7` | `mvn tomcat7:run` |
-| `mvnjetty` | `mvn jetty:run` |
+| `mvncv` | `mvn clean verify` |
+| `mvncvst` | `mvn clean verify -DskipTests` |
+| `mvnd` | `mvn deploy` |
+| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
| `mvndt` | `mvn dependency:tree` |
+| `mvne` | `mvn eclipse:eclipse` |
+| `mvnjetty` | `mvn jetty:run` |
+| `mvnp` | `mvn package` |
| `mvns` | `mvn site` |
| `mvnsrc` | `mvn dependency:sources` |
-| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
+| `mvnt` | `mvn test` |
+| `mvntc` | `mvn tomcat:run` |
+| `mvntc7` | `mvn tomcat7:run` |
+| `mvn-updates` | `mvn versions:display-dependency-updates` |
+
+## mvn-color
+
+It's a function that wraps the mvn command to colorize it's output. You can use it in place
+of the `mvn` command. For example: instead of `mvn test`, use `mvn-color test`.
+
+Since [Maven 3.5.0](https://maven.apache.org/docs/3.5.0/release-notes.html) the mvn command
+has colored output, so this function will be soon removed from the plugin.
+
+### Known bugs
+
+It has a bug where it will swallow mvn prompts for user input, _e.g._ when using
+`archetype:generate`. See [#5052](https://github.com/robbyrussell/oh-my-zsh/issues/5052).
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
index 74583c6dc..01aef814d 100644
--- a/plugins/mvn/mvn.plugin.zsh
+++ b/plugins/mvn/mvn.plugin.zsh
@@ -1,292 +1,325 @@
-# mvn-color based on https://gist.github.com/1027800
-BOLD=$(tput bold)
-UNDERLINE_ON=$(tput smul)
-UNDERLINE_OFF=$(tput rmul)
-TEXT_BLACK=$(tput setaf 0)
-TEXT_RED=$(tput setaf 1)
-TEXT_GREEN=$(tput setaf 2)
-TEXT_YELLOW=$(tput setaf 3)
-TEXT_BLUE=$(tput setaf 4)
-TEXT_MAGENTA=$(tput setaf 5)
-TEXT_CYAN=$(tput setaf 6)
-TEXT_WHITE=$(tput setaf 7)
-BACKGROUND_BLACK=$(tput setab 0)
-BACKGROUND_RED=$(tput setab 1)
-BACKGROUND_GREEN=$(tput setab 2)
-BACKGROUND_YELLOW=$(tput setab 3)
-BACKGROUND_BLUE=$(tput setab 4)
-BACKGROUND_MAGENTA=$(tput setab 5)
-BACKGROUND_CYAN=$(tput setab 6)
-BACKGROUND_WHITE=$(tput setab 7)
-RESET_FORMATTING=$(tput sgr0)
-
-# if found a ./mvnw file execute it otherwise execute orignal mvn
+# Calls ./mvnw if found, otherwise execute the original mvn
mvn-or-mvnw() {
- if [ -f ./mvnw ] ; then
- echo "executing mvnw instead of mvn"
- ./mvnw "$@";
+ if [ -x ./mvnw ]; then
+ echo "executing mvnw instead of mvn"
+ ./mvnw "$@"
else
- mvn "$@";
+ command mvn "$@"
fi
}
-# Wrapper function for Maven's mvn command.
+# Wrapper function for Maven's mvn command. Based on https://gist.github.com/1027800
mvn-color() {
- (
- # Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
- unset LANG
- LC_CTYPE=C mvn "$@" | sed -e "s/\(\[INFO\]\)\(.*\)/${TEXT_BLUE}${BOLD}\1${RESET_FORMATTING}\2/g" \
- -e "s/\(\[INFO\]\ BUILD SUCCESSFUL\)/${BOLD}${TEXT_GREEN}\1${RESET_FORMATTING}/g" \
- -e "s/\(\[WARNING\]\)\(.*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}\2/g" \
- -e "s/\(\[ERROR\]\)\(.*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}\2/g" \
- -e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${BOLD}${TEXT_GREEN}Tests run: \1${RESET_FORMATTING}, Failures: ${BOLD}${TEXT_RED}\2${RESET_FORMATTING}, Errors: ${BOLD}${TEXT_RED}\3${RESET_FORMATTING}, Skipped: ${BOLD}${TEXT_YELLOW}\4${RESET_FORMATTING}/g"
-
- # Make sure formatting is reset
- echo -ne "${RESET_FORMATTING}"
- )
-}
+ local BOLD=$(echoti bold)
+ local TEXT_RED=$(echoti setaf 1)
+ local TEXT_GREEN=$(echoti setaf 2)
+ local TEXT_YELLOW=$(echoti setaf 3)
+ local TEXT_BLUE=$(echoti setaf 4)
+ local TEXT_WHITE=$(echoti setaf 7)
+ local RESET_FORMATTING=$(echoti sgr0)
+ (
+ # Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
+ unset LANG
+ LC_CTYPE=C mvn "$@" | sed \
+ -e "s/\(\[INFO\]\)\(.*\)/${TEXT_BLUE}${BOLD}\1${RESET_FORMATTING}\2/g" \
+ -e "s/\(\[DEBUG\]\)\(.*\)/${TEXT_WHITE}${BOLD}\1${RESET_FORMATTING}\2/g" \
+ -e "s/\(\[INFO\]\ BUILD SUCCESSFUL\)/${BOLD}${TEXT_GREEN}\1${RESET_FORMATTING}/g" \
+ -e "s/\(\[WARNING\]\)\(.*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}\2/g" \
+ -e "s/\(\[ERROR\]\)\(.*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}\2/g" \
+ -e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${BOLD}${TEXT_GREEN}Tests run: \1${RESET_FORMATTING}, Failures: ${BOLD}${TEXT_RED}\2${RESET_FORMATTING}, Errors: ${BOLD}${TEXT_RED}\3${RESET_FORMATTING}, Skipped: ${BOLD}${TEXT_YELLOW}\4${RESET_FORMATTING}/g"
-# Override the mvn command with the colorized one.
-#alias mvn="mvn-color"
+ # Make sure formatting is reset
+ echo -ne "${RESET_FORMATTING}"
+ )
+}
-# either use orignal mvn oder the mvn wrapper
+# either use orignal mvn or the mvn wrapper
alias mvn="mvn-or-mvnw"
+# Run mvn against the pom found in a project's root directory (assumes a git repo)
+alias 'mvn!'='mvn -f $(git rev-parse --show-toplevel 2>/dev/null || echo ".")/pom.xml'
+
# aliases
-alias mvncie='mvn clean install eclipse:eclipse'
+alias mvnag='mvn archetype:generate'
+alias mvnboot='mvn spring-boot:run'
+alias mvnc='mvn clean'
+alias mvncd='mvn clean deploy'
+alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
alias mvnci='mvn clean install'
+alias mvncie='mvn clean install eclipse:eclipse'
+alias mvncini='mvn clean initialize'
alias mvncist='mvn clean install -DskipTests'
alias mvncisto='mvn clean install -DskipTests --offline'
-alias mvne='mvn eclipse:eclipse'
-alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
-alias mvncv='mvn clean verify'
-alias mvnd='mvn deploy'
-alias mvnp='mvn package'
-alias mvnc='mvn clean'
alias mvncom='mvn compile'
+alias mvncp='mvn clean package'
alias mvnct='mvn clean test'
-alias mvnt='mvn test'
-alias mvnag='mvn archetype:generate'
-alias mvn-updates='mvn versions:display-dependency-updates'
-alias mvntc7='mvn tomcat7:run'
-alias mvntc='mvn tomcat:run'
-alias mvnjetty='mvn jetty:run'
-alias mvnboot='mvn spring-boot:run'
+alias mvncv='mvn clean verify'
+alias mvncvst='mvn clean verify -DskipTests'
+alias mvnd='mvn deploy'
+alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
alias mvndt='mvn dependency:tree'
+alias mvne='mvn eclipse:eclipse'
+alias mvnjetty='mvn jetty:run'
+alias mvnp='mvn package'
alias mvns='mvn site'
alias mvnsrc='mvn dependency:sources'
-alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
+alias mvnt='mvn test'
+alias mvntc='mvn tomcat:run'
+alias mvntc7='mvn tomcat7:run'
+alias mvn-updates='mvn versions:display-dependency-updates'
+
+
+function listMavenCompletions {
+ local file new_file
+ local -a profiles POM_FILES
+ # Root POM
+ POM_FILES=(~/.m2/settings.xml)
-function listMavenCompletions {
- reply=(
- # common lifecycle
- clean process-resources compile process-test-resources test-compile test integration-test package verify install deploy site
+ # POM in the current directory
+ if [[ -f pom.xml ]]; then
+ local file=pom.xml
+ POM_FILES+=("${file:A}")
+ fi
+
+ # Look for POM files in parent directories
+ while [[ -n "$file" ]] && grep -q "<parent>" "$file"; do
+ # look for a new relativePath for parent pom.xml
+ new_file=$(grep -e "<relativePath>.*</relativePath>" "$file" | sed -e 's/.*<relativePath>\(.*\)<\/relativePath>.*/\1/')
+
+ # if <parent> is present but not defined, assume ../pom.xml
+ if [[ -z "$new_file" ]]; then
+ new_file="../pom.xml"
+ fi
+
+ # if file doesn't exist break
+ file="${file:h}/${new_file}"
+ if ! [[ -e "$file" ]]; then
+ break
+ fi
+
+ POM_FILES+=("${file:A}")
+ done
+
+ # Get profiles from found files
+ for file in $POM_FILES; do
+ [[ -e $file ]] || continue
+ profiles+=($(sed 's/<!--.*-->//' "$file" | sed '/<!--/,/-->/d' | grep -e "<profile>" -A 1 | grep -e "<id>.*</id>" | sed 's?.*<id>\(.*\)<\/id>.*?-P\1?'))
+ done
- # common plugins
- deploy failsafe install site surefire checkstyle javadoc jxr pmd ant antrun archetype assembly dependency enforcer gpg help release repository source eclipse idea jetty cargo jboss tomcat tomcat6 tomcat7 exec versions war ear ejb android scm buildnumber nexus repository sonar license hibernate3 liquibase flyway gwt
+ reply=(
+ # common lifecycle
+ clean initialize process-resources compile process-test-resources test-compile test package verify install deploy site
- # deploy
- deploy:deploy-file
- # failsafe
- failsafe:integration-test failsafe:verify
- # install
- install:install-file install:help
- # site
- site:site site:deploy site:run site:stage site:stage-deploy site:attach-descriptor site:jar site:effective-site
- # surefire
- surefire:test
+ # integration testing
+ pre-integration-test integration-test
- # checkstyle
- checkstyle:checkstyle checkstyle:check checkstyle:checkstyle-aggregate
- # javadoc
- javadoc:javadoc javadoc:test-javadoc javadoc:javadoc-no-fork javadoc:test-javadoc-no-fork javadoc:aggregate javadoc:test-aggregate javadoc:jar javadoc:test-jar javadoc:aggregate-jar javadoc:test-aggregate-jar javadoc:fix javadoc:test-fix javadoc:resource-bundle javadoc:test-resource-bundle
- # jxr
- jxr:jxr jxr:aggregate jxr:test-jxr jxr:test-aggregate
- # pmd
- pmd:pmd pmd:cpd pmd:check pmd:cpd-check
+ # common plugins
+ deploy failsafe install site surefire checkstyle javadoc jxr pmd ant antrun archetype assembly dependency enforcer gpg help release repository source eclipse idea jetty cargo jboss tomcat tomcat6 tomcat7 exec versions war ear ejb android scm buildnumber nexus repository sonar license hibernate3 liquibase flyway gwt
- # ant
- ant:ant ant:clean
- # antrun
- antrun:run
- # archetype
- archetype:generate archetype:create-from-project archetype:crawl
- # assembly
- assembly:single assembly:assembly
- # dependency
- dependency:analyze dependency:analyze-dep-mgt dependency:analyze-only dependency:analyze-report dependency:analyze-duplicate dependency:build-classpath dependency:copy dependency:copy-dependencies dependency:display-ancestors dependency:get dependency:go-offline dependency:list dependency:list-repositories dependency:properties dependency:purge-local-repository dependency:resolve dependency:resolve-plugins dependency:sources dependency:tree dependency:unpack dependency:unpack-dependencies
- # enforcer
- enforcer:enforce enforcer:display-info
- # gpg
- gpg:sign gpg:sign-and-deploy-file
- # help
- help:active-profiles help:all-profiles help:describe help:effective-pom help:effective-settings help:evaluate help:expressions help:system
- # release
- release:clean release:prepare release:prepare-with-pom release:rollback release:perform release:stage release:branch release:update-versions
- # jgitflow
- jgitflow:feature-start jgitflow:feature-finish jgitflow:release-start jgitflow:release-finish jgitflow:hotfix-start jgitflow:hotfix-finish jgitflow:build-number
- # repository
- repository:bundle-create repository:bundle-pack
- # source
- source:aggregate source:jar source:jar-no-fork source:test-jar source:test-jar-no-fork
+ # deploy
+ deploy:deploy-file
+ # failsafe
+ failsafe:integration-test failsafe:verify
+ # install
+ install:install-file install:help
+ # site
+ site:site site:deploy site:run site:stage site:stage-deploy site:attach-descriptor site:jar site:effective-site
+ # surefire
+ surefire:test
- # eclipse
- eclipse:clean eclipse:eclipse
- # idea
- idea:clean idea:idea
+ # checkstyle
+ checkstyle:checkstyle checkstyle:check checkstyle:checkstyle-aggregate
+ # javadoc
+ javadoc:javadoc javadoc:test-javadoc javadoc:javadoc-no-fork javadoc:test-javadoc-no-fork javadoc:aggregate javadoc:test-aggregate javadoc:jar javadoc:test-jar javadoc:aggregate-jar javadoc:test-aggregate-jar javadoc:fix javadoc:test-fix javadoc:resource-bundle javadoc:test-resource-bundle
+ # jxr
+ jxr:jxr jxr:aggregate jxr:test-jxr jxr:test-aggregate
+ # pmd
+ pmd:pmd pmd:cpd pmd:check pmd:cpd-check
- # jetty
- jetty:run jetty:run-exploded
- # cargo
- cargo:start cargo:run cargo:stop cargo:deploy cargo:undeploy cargo:help
- # jboss
- jboss:start jboss:stop jboss:deploy jboss:undeploy jboss:redeploy
- # tomcat
- tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:redeploy
- # tomcat6
- tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
- # tomcat7
- tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
- # tomee
- tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
- # spring-boot
- spring-boot:run spring-boot:repackage
- # exec
- exec:exec exec:java
- # versions
- versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates versions:update-parent versions:update-properties versions:update-child-modules versions:lock-snapshots versions:unlock-snapshots versions:resolve-ranges versions:set versions:use-releases versions:use-next-releases versions:use-latest-releases versions:use-next-snapshots versions:use-latest-snapshots versions:use-next-versions versions:use-latest-versions versions:commit versions:revert
- # scm
- scm:add scm:bootstrap scm:branch scm:changelog scm:check-local-modification scm:checkin scm:checkout scm:diff scm:edit scm:export scm:list scm:remove scm:status scm:tag scm:unedit scm:update scm:update-subprojects scm:validate
- # buildnumber
- buildnumber:create buildnumber:create-timestamp buildnumber:help buildnumber:hgchangeset
+ # ant
+ ant:ant ant:clean
+ # antrun
+ antrun:run
+ # archetype
+ archetype:generate archetype:create-from-project archetype:crawl
+ # assembly
+ assembly:single assembly:assembly
+ # dependency
+ dependency:analyze dependency:analyze-dep-mgt dependency:analyze-only dependency:analyze-report dependency:analyze-duplicate dependency:build-classpath dependency:copy dependency:copy-dependencies dependency:display-ancestors dependency:get dependency:go-offline dependency:list dependency:list-repositories dependency:properties dependency:purge-local-repository dependency:resolve dependency:resolve-plugins dependency:sources dependency:tree dependency:unpack dependency:unpack-dependencies
+ # enforcer
+ enforcer:enforce enforcer:display-info
+ # gpg
+ gpg:sign gpg:sign-and-deploy-file
+ # help
+ help:active-profiles help:all-profiles help:describe help:effective-pom help:effective-settings help:evaluate help:expressions help:system
+ # release
+ release:clean release:prepare release:prepare-with-pom release:rollback release:perform release:stage release:branch release:update-versions
+ # jgitflow
+ jgitflow:feature-start jgitflow:feature-finish jgitflow:release-start jgitflow:release-finish jgitflow:hotfix-start jgitflow:hotfix-finish jgitflow:build-number
+ # repository
+ repository:bundle-create repository:bundle-pack
+ # source
+ source:aggregate source:jar source:jar-no-fork source:test-jar source:test-jar-no-fork
- # war
- war:war war:exploded war:inplace war:manifest
- # ear
- ear:ear ear:generate-application-xml
- # ejb
- ejb:ejb
- # android
- android:apk android:apklib android:deploy android:deploy-dependencies android:dex android:emulator-start android:emulator-stop android:emulator-stop-all android:generate-sources android:help android:instrument android:manifest-update android:pull android:push android:redeploy android:run android:undeploy android:unpack android:version-update android:zipalign android:devices
- # nexus
- nexus:staging-list nexus:staging-close nexus:staging-drop nexus:staging-release nexus:staging-build-promotion nexus:staging-profiles-list nexus:settings-download
- # repository
- repository:bundle-create repository:bundle-pack repository:help
+ # eclipse
+ eclipse:clean eclipse:eclipse
+ # idea
+ idea:clean idea:idea
- # sonar
- sonar:sonar
- # license
- license:format license:check
- # hibernate3
- hibernate3:hbm2ddl hibernate3:help
- # liquibase
- liquibase:changelogSync liquibase:changelogSyncSQL liquibase:clearCheckSums liquibase:dbDoc liquibase:diff liquibase:dropAll liquibase:help liquibase:migrate liquibase:listLocks liquibase:migrateSQL liquibase:releaseLocks liquibase:rollback liquibase:rollbackSQL liquibase:status liquibase:tag liquibase:update liquibase:updateSQL liquibase:updateTestingRollback
- # flyway
- flyway:clean flyway:history flyway:init flyway:migrate flyway:status flyway:validate
- # gwt
- gwt:browser gwt:clean gwt:compile gwt:compile-report gwt:css gwt:debug gwt:eclipse gwt:eclipseTest gwt:generateAsync gwt:help gwt:i18n gwt:mergewebxml gwt:resources gwt:run gwt:sdkInstall gwt:source-jar gwt:soyc gwt:test
- # asciidoctor
- asciidoctor:process-asciidoc asciidoctor:auto-refresh asciidoctor:http asciidoctor:zip
- # compiler
- compiler:compile compiler:testCompile
- # resources
- resources:resources resources:testResources resources:copy-resources
- # verifier
- verifier:verify
- # jar
- jar:jar jar:test-jar
- # rar
- rar:rar
- # acr
- acr:acr
- # shade
- shade:shade
- # changelog
- changelog:changelog changelog:dev-activity changelog:file-activity
- # changes
- changes:announcement-mail changes:announcement-generate changes:changes-check changes:changes-validate changes:changes-report changes:jira-report changes:trac-report changes:github-report
- # doap
- doap:generate
- # docck
- docck:check
- # jdeps
- jdeps:jdkinternals jdeps:test-jdkinternals
- # linkcheck
- linkcheck:linkcheck
- # project-info-reports
- project-info-reports:cim project-info-reports:dependencies project-info-reports:dependency-convergence project-info-reports:dependency-info project-info-reports:dependency-management project-info-reports:distribution-management project-info-reports:help project-info-reports:index project-info-reports:issue-tracking project-info-reports:license project-info-reports:mailing-list project-info-reports:modules project-info-reports:plugin-management project-info-reports:plugins project-info-reports:project-team project-info-reports:scm project-info-reports:summary
- # surefire-report
- surefire-report:failsafe-report-only surefire-report:report surefire-report:report-only
- # invoker
- invoker:install invoker:integration-test invoker:verify invoker:run
- # jarsigner
- jarsigner:sign jarsigner:verify
- # patch
- patch:apply
- # pdf
- pdf:pdf
- # plugin
- plugin:descriptor plugin:report plugin:updateRegistry plugin:addPluginArtifactMetadata plugin:helpmojo
- # remote-resources
- remote-resources:bundle remote-resources:process
- # scm-publish
- scm-publish:help scm-publish:publish-scm scm-publish:scmpublish
- # stage
- stage:copy
- # toolchain
- toolchain:toolchain
-
- # options
- "-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile="
+ # jetty
+ jetty:run jetty:run-exploded
+ # cargo
+ cargo:start cargo:run cargo:stop cargo:deploy cargo:undeploy cargo:help
+ # jboss
+ jboss:start jboss:stop jboss:deploy jboss:undeploy jboss:redeploy
+ # tomcat
+ tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:redeploy
+ # tomcat6
+ tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
+ # tomcat7
+ tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
+ # tomee
+ tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
+ # spring-boot
+ spring-boot:run spring-boot:repackage
+ # exec
+ exec:exec exec:java
+ # versions
+ versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates versions:update-parent versions:update-properties versions:update-child-modules versions:lock-snapshots versions:unlock-snapshots versions:resolve-ranges versions:set versions:use-releases versions:use-next-releases versions:use-latest-releases versions:use-next-snapshots versions:use-latest-snapshots versions:use-next-versions versions:use-latest-versions versions:commit versions:revert
+ # scm
+ scm:add scm:bootstrap scm:branch scm:changelog scm:check-local-modification scm:checkin scm:checkout scm:diff scm:edit scm:export scm:list scm:remove scm:status scm:tag scm:unedit scm:update scm:update-subprojects scm:validate
+ # buildnumber
+ buildnumber:create buildnumber:create-timestamp buildnumber:help buildnumber:hgchangeset
- # arguments
- -am --also-make
- -amd --also-make-dependents-am
- -B --batch-mode
- -b --builder
- -C --strict-checksums
- -c --lax-checksums
- -cpu --check-plugin-updates
- -D --define
- -e --errors
- -emp --encrypt-master-password
- -ep --encrypt-password
- -f --file
- -fae --fail-at-end
- -ff --fail-fast
- -fn --fail-never
- -gs --global-settings
- -gt --global-toolchains
- -h --help
- -l --log-file
- -llr --legacy-local-repository
- -N --non-recursive
- -npr --no-plugin-registry
- -npu --no-plugin-updates
- -nsu --no-snapshot-updates
- -o --offline
- -P --activate-profiles
- -pl --projects
- -q --quiet
- -rf --resume-from
- -s --settings
- -t --toolchains
- -T --threads
- -U --update-snapshots
- -up --update-plugins
- -v --version
- -V --show-version
- -X --debug
+ # war
+ war:war war:exploded war:inplace war:manifest
+ # ear
+ ear:ear ear:generate-application-xml
+ # ejb
+ ejb:ejb
+ # android
+ android:apk android:apklib android:deploy android:deploy-dependencies android:dex android:emulator-start android:emulator-stop android:emulator-stop-all android:generate-sources android:help android:instrument android:manifest-update android:pull android:push android:redeploy android:run android:undeploy android:unpack android:version-update android:zipalign android:devices
+ # nexus
+ nexus:staging-list nexus:staging-close nexus:staging-drop nexus:staging-release nexus:staging-build-promotion nexus:staging-profiles-list nexus:settings-download
+ # repository
+ repository:bundle-create repository:bundle-pack repository:help
- cli:execute cli:execute-phase
- archetype:generate generate-sources
- cobertura:cobertura
- -Dtest=$(if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi)
- -Dit.test=$(if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dit.test=\1?' ; fi)
- );
+ # sonar
+ sonar:sonar
+ # license
+ license:format license:check
+ # hibernate3
+ hibernate3:hbm2ddl hibernate3:help
+ # liquibase
+ liquibase:changelogSync liquibase:changelogSyncSQL liquibase:clearCheckSums liquibase:dbDoc liquibase:diff liquibase:dropAll liquibase:help liquibase:migrate liquibase:listLocks liquibase:migrateSQL liquibase:releaseLocks liquibase:rollback liquibase:rollbackSQL liquibase:status liquibase:tag liquibase:update liquibase:updateSQL liquibase:updateTestingRollback
+ # flyway
+ flyway:clean flyway:history flyway:init flyway:migrate flyway:status flyway:validate
+ # gwt
+ gwt:browser gwt:clean gwt:compile gwt:compile-report gwt:css gwt:debug gwt:eclipse gwt:eclipseTest gwt:generateAsync gwt:help gwt:i18n gwt:mergewebxml gwt:resources gwt:run gwt:sdkInstall gwt:source-jar gwt:soyc gwt:test
+ # asciidoctor
+ asciidoctor:process-asciidoc asciidoctor:auto-refresh asciidoctor:http asciidoctor:zip
+ # compiler
+ compiler:compile compiler:testCompile
+ # resources
+ resources:resources resources:testResources resources:copy-resources
+ # verifier
+ verifier:verify
+ # jar
+ jar:jar jar:test-jar
+ # rar
+ rar:rar
+ # acr
+ acr:acr
+ # shade
+ shade:shade
+ # changelog
+ changelog:changelog changelog:dev-activity changelog:file-activity
+ # changes
+ changes:announcement-mail changes:announcement-generate changes:changes-check changes:changes-validate changes:changes-report changes:jira-report changes:trac-report changes:github-report
+ # doap
+ doap:generate
+ # docck
+ docck:check
+ # jdeps
+ jdeps:jdkinternals jdeps:test-jdkinternals
+ # linkcheck
+ linkcheck:linkcheck
+ # project-info-reports
+ project-info-reports:cim project-info-reports:dependencies project-info-reports:dependency-convergence project-info-reports:dependency-info project-info-reports:dependency-management project-info-reports:distribution-management project-info-reports:help project-info-reports:index project-info-reports:issue-tracking project-info-reports:license project-info-reports:mailing-list project-info-reports:modules project-info-reports:plugin-management project-info-reports:plugins project-info-reports:project-team project-info-reports:scm project-info-reports:summary
+ # surefire-report
+ surefire-report:failsafe-report-only surefire-report:report surefire-report:report-only
+ # invoker
+ invoker:install invoker:integration-test invoker:verify invoker:run
+ # jarsigner
+ jarsigner:sign jarsigner:verify
+ # patch
+ patch:apply
+ # pdf
+ pdf:pdf
+ # plugin
+ plugin:descriptor plugin:report plugin:updateRegistry plugin:addPluginArtifactMetadata plugin:helpmojo
+ # remote-resources
+ remote-resources:bundle remote-resources:process
+ # scm-publish
+ scm-publish:help scm-publish:publish-scm scm-publish:scmpublish
+ # stage
+ stage:copy
+ # toolchain
+ toolchain:toolchain
+
+ # options
+ "-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile="
+
+ # arguments
+ -am --also-make
+ -amd --also-make-dependents-am
+ -B --batch-mode
+ -b --builder
+ -C --strict-checksums
+ -c --lax-checksums
+ -cpu --check-plugin-updates
+ -D --define
+ -e --errors
+ -emp --encrypt-master-password
+ -ep --encrypt-password
+ -f --file
+ -fae --fail-at-end
+ -ff --fail-fast
+ -fn --fail-never
+ -gs --global-settings
+ -gt --global-toolchains
+ -h --help
+ -l --log-file
+ -llr --legacy-local-repository
+ -N --non-recursive
+ -npr --no-plugin-registry
+ -npu --no-plugin-updates
+ -nsu --no-snapshot-updates
+ -o --offline
+ -P --activate-profiles
+ -pl --projects
+ -q --quiet
+ -rf --resume-from
+ -s --settings
+ -t --toolchains
+ -T --threads
+ -U --update-snapshots
+ -up --update-plugins
+ -v --version
+ -V --show-version
+ -X --debug
+
+ cli:execute cli:execute-phase
+ archetype:generate generate-sources
+ cobertura:cobertura
+ -Dtest=$(if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi)
+ -Dit.test=$(if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dit.test=\1?' ; fi)
+
+ $profiles
+ )
}
-compctl -K listMavenCompletions mvn
+compctl -K listMavenCompletions mvn mvnw
+compctl -K listMavenCompletions mvn-color
compctl -K listMavenCompletions mvn-or-mvnw
-
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index 6a4b6eec4..a1c73a184 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -284,6 +284,6 @@ alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true &&
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
# Remove .DS_Store files recursively in a directory, default .
-rmdsstore() {
+function rmdsstore() {
find "${@:-.}" -type f -name .DS_Store -delete
}
diff --git a/plugins/osx/spotify b/plugins/osx/spotify
index 2ab98d3a0..b4215dbe7 100644
--- a/plugins/osx/spotify
+++ b/plugins/osx/spotify
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
function spotify() {
-# Copyright (c) 2012--2017 Harish Narayanan <mail@harishnarayanan.org>
+# Copyright (c) 2012--2018 Harish Narayanan <mail@harishnarayanan.org>
#
# Contains numerous helpful contributions from Jorge Colindres, Thomas
# Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin
@@ -134,8 +134,13 @@ showStatus () {
if [ $# = 0 ]; then
showHelp;
else
+ if [ ! -d /Applications/Spotify.app ] && [ ! -d $HOME/Applications/Spotify.app ]; then
+ echo "The Spotify application must be installed."
+ exit 1
+ fi
+
if [ $(osascript -e 'application "Spotify" is running') = "false" ]; then
- osascript -e 'tell application "Spotify" to activate'
+ osascript -e 'tell application "Spotify" to activate' || exit 1
sleep 2
fi
fi
@@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do
showAPIHelp;
exit 1;
fi
- SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n");
+ SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n"|tr -d '\r');
SPOTIFY_PLAY_URI="";
getAccessToken() {
diff --git a/plugins/otp/otp.plugin.zsh b/plugins/otp/otp.plugin.zsh
new file mode 100644
index 000000000..4bce34fd3
--- /dev/null
+++ b/plugins/otp/otp.plugin.zsh
@@ -0,0 +1,54 @@
+export OTP_HOME=~/.otp
+mkdir -p $OTP_HOME
+
+function ot () {
+ if ! command -v oathtool > /dev/null 2>&1; then
+ echo "Note: you need to install oathtool or oath-toolkit, depending on your OS or distribution."
+ return 1
+ fi
+
+ if ! command -v gpg > /dev/null 2>&1; then
+ echo "Note: you need to install gpg and create an ID using 'gpg --gen-key', unless you have one already."
+ return 1
+ fi
+
+ if [[ `uname` == 'Darwin' ]] then # MacOS X
+ export COPY_CMD='pbcopy'
+ elif command -v xsel > /dev/null 2>&1; then # Any Unix with xsel installed
+ export COPY_CMD='xsel --clipboard --input'
+ else
+ COPY_CMD='true'
+ fi
+
+ if [[ "x$1" == "x" ]]; then
+ echo "usage: otpw <profile.name>"
+ return 1
+ elif [ ! -f $OTP_HOME/$1.otp.asc ]; then
+ echo "missing profile $1, you might need to create it first using otp_add_device"
+ return 1
+ else
+ totpkey=$(gpg --decrypt $OTP_HOME/$1.otp.asc)
+ oathtool --totp --b $totpkey | tee /dev/stderr | `echo $COPY_CMD`
+ if [[ $COPY_CMD == 'true' ]] then
+ echo "Note: you might consider installing xsel for clipboard integration"
+ fi
+ fi
+}
+
+function otp_add_device () {
+ if [[ "x$1" == "x" ]] then
+ echo "usage: otp_add <profile.name>"
+ return 1
+ else
+ echo "Enter an email address attached to your GPG private key, then paste the secret configuration key followed by ^D"
+
+ rm -f $OTP_HOME/$1.otp.asc
+ gpg --armor --encrypt --output $OTP_HOME/$1.otp.asc /dev/stdin
+ fi
+}
+
+function otp_devices () {
+ reply=($(find $OTP_HOME -name \*.otp.asc | xargs basename -s .otp.asc))
+}
+
+compctl -K otp_devices ot
diff --git a/plugins/per-directory-history/per-directory-history.zsh b/plugins/per-directory-history/per-directory-history.zsh
index 53ad963e7..41de2f91d 100644
--- a/plugins/per-directory-history/per-directory-history.zsh
+++ b/plugins/per-directory-history/per-directory-history.zsh
@@ -26,7 +26,7 @@
#
# [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
# [2]: http://dieter.plaetinck.be/per_directory_bash
-# [3]: https://www.zsh.org/mla/users/1997/msg00226.html
+# [3]: http://www.zsh.org/mla/users/1997/msg00226.html
#
################################################################################
#
@@ -109,8 +109,13 @@ function _per-directory-history-change-directory() {
}
function _per-directory-history-addhistory() {
- print -Sr -- "${1%%$'\n'}"
- fc -p $_per_directory_history_directory
+ # respect hist_ignore_space
+ if [[ -o hist_ignore_space ]] && [[ "$1" == \ * ]]; then
+ true
+ else
+ print -Sr -- "${1%%$'\n'}"
+ fc -p $_per_directory_history_directory
+ fi
}
diff --git a/plugins/react-native/README.md b/plugins/react-native/README.md
index d1fce0fc2..0cfaa36b4 100644
--- a/plugins/react-native/README.md
+++ b/plugins/react-native/README.md
@@ -11,28 +11,45 @@ plugins=(... react-native)
## Aliases
-| Alias | React Native command |
-| :------------ | :------------------------------------------------- |
-| **rn** | `react-native` |
-| **rns** | `react-native start` |
-| **rnlink** | `react-native link` |
-| _App testing_ |
-| **rnand** | `react-native run-android` |
-| **rnios** | `react-native run-ios` |
-| **rnios4s** | `react-native run-ios --simulator "iPhone 4s"` |
-| **rnios5** | `react-native run-ios --simulator "iPhone 5"` |
-| **rnios5s** | `react-native run-ios --simulator "iPhone 5s"` |
-| **rnios6** | `react-native run-ios --simulator "iPhone 6"` |
-| **rnios6s** | `react-native run-ios --simulator "iPhone 6s"` |
-| **rnios7** | `react-native run-ios --simulator "iPhone7"` |
-| **rnios7p** | `react-native run-ios --simulator "iPhone 7 Plus"` |
-| **rnios8** | `react-native run-ios --simulator "iPhone 8"` |
-| **rnios8p** | `react-native run-ios --simulator "iPhone 8 Plus"` |
-| **rniosse** | `react-native run-ios --simulator "iPhone SE"` |
-| **rniosx** | `react-native run-ios --simulator "iPhone X"` |
-| **rniosxs** | `react-native run-ios --simulator "iPhone XS"` |
-| **rniosxsm** | `react-native run-ios --simulator "iPhone XS Max"` |
-| **rniosxr** | `react-native run-ios --simulator "iPhone XR"` |
-| _Logging_ |
-| **rnland** | `react-native log-android` |
-| **rnlios** | `react-native log-ios` |
+| Alias | React Native command |
+| :------------ | :------------------------------------------------- |
+| **rn** | `react-native` |
+| **rns** | `react-native start` |
+| **rnlink** | `react-native link` |
+| _App testing_ |
+| **rnand** | `react-native run-android` |
+| **rnios** | `react-native run-ios` |
+| **rnios4s** | `react-native run-ios --simulator "iPhone 4s"` |
+| **rnios5** | `react-native run-ios --simulator "iPhone 5"` |
+| **rnios5s** | `react-native run-ios --simulator "iPhone 5s"` |
+| **rnios6** | `react-native run-ios --simulator "iPhone 6"` |
+| **rnios6s** | `react-native run-ios --simulator "iPhone 6s"` |
+| **rnios7** | `react-native run-ios --simulator "iPhone7"` |
+| **rnios7p** | `react-native run-ios --simulator "iPhone 7 Plus"` |
+| **rnios8** | `react-native run-ios --simulator "iPhone 8"` |
+| **rnios8p** | `react-native run-ios --simulator "iPhone 8 Plus"` |
+| **rniosse** | `react-native run-ios --simulator "iPhone SE"` |
+| **rniosx** | `react-native run-ios --simulator "iPhone X"` |
+| **rniosxs** | `react-native run-ios --simulator "iPhone XS"` |
+| **rniosxsm** | `react-native run-ios --simulator "iPhone XS Max"` |
+| **rniosxr** | `react-native run-ios --simulator "iPhone XR"` |
+| _iPads_ | |
+| **rnipad2** | `react-native run-ios --simulator "iPad 2"` |
+| **rnipadr** | `react-native run-ios --simulator "iPad Retina"` |
+| **rnipada** | 'react-native run-ios --simulator "iPad Air"' |
+| **rnipada2** | 'react-native run-ios --simulator "iPad Air 2"' |
+| **rnipad5** | 'react-native run-ios --simulator "iPad (5th generation)"' |
+| **rnipad9** | 'react-native run-ios --simulator "iPad Pro (9.7-inch)"' |
+| **rnipad12** | 'react-native run-ios --simulator "iPad Pro (12.9-inch)"' |
+| **rnipad122** | 'react-native run-ios --simulator "iPad Pro (12.9-inch) (2nd generation)"' |
+| **rnipad10** | 'react-native run-ios --simulator "iPad Pro (10.5-inch)"' |
+| **rnipad6** | 'react-native run-ios --simulator "iPad Pro (6th generation)"' |
+| **rnipad11** | 'react-native run-ios --simulator "iPad Pro (11-inch)"' |
+| **rnipad123** | 'react-native run-ios --simulator "iPad Pro (12.9-inch) (3rd generation)"' |
+| _Apple TVs_ | |
+| **rnatv** | `react-native run-ios --simulator "Apple TV"` |
+| **rnatv4k** | `react-native run-ios --simulator "Apple TV 4K"` |
+| **rnatv4k1080**| `react-native run-ios --simulator "Apple TV 4K (at 1080p)"` |
+| _Logging_ |
+| **rnland** | `react-native log-android` |
+| **rnlios** | `react-native log-ios` |
diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh
index 220aa2dce..a4092a694 100644
--- a/plugins/react-native/react-native.plugin.zsh
+++ b/plugins/react-native/react-native.plugin.zsh
@@ -19,5 +19,22 @@ alias rniosxs='react-native run-ios --simulator "iPhone XS"'
alias rniosxsm='react-native run-ios --simulator "iPhone XS Max"'
alias rniosxr='react-native run-ios --simulator "iPhone XR"'
+alias rnipad2='react-native run-ios --simulator "iPad 2"'
+alias rnipadr='react-native run-ios --simulator "iPad Retina"'
+alias rnipada='react-native run-ios --simulator "iPad Air"'
+alias rnipada2='react-native run-ios --simulator "iPad Air 2"'
+alias rnipad5='react-native run-ios --simulator "iPad (5th generation)"'
+alias rnipad9='react-native run-ios --simulator "iPad Pro (9.7-inch)"'
+alias rnipad12='react-native run-ios --simulator "iPad Pro (12.9-inch)"'
+alias rnipad122='react-native run-ios --simulator "iPad Pro (12.9-inch) (2nd generation)"'
+alias rnipad10='react-native run-ios --simulator "iPad Pro (10.5-inch)"'
+alias rnipad6='react-native run-ios --simulator "iPad Pro (6th generation)"'
+alias rnipad11='react-native run-ios --simulator "iPad Pro (11-inch)"'
+alias rnipad123='react-native run-ios --simulator "iPad Pro (12.9-inch) (3rd generation)"'
+
+alias rnatv='react-native run-ios --simulator "Apple TV"'
+alias rnatv4k='react-native run-ios --simulator "Apple TV 4K"'
+alias rnatv4k1080='react-native run-ios --simulator "Apple TV 4K (at 1080p)"'
+
alias rnland='react-native log-android'
alias rnlios='react-native log-ios'
diff --git a/plugins/ros/README.mkd b/plugins/ros/README.mkd
new file mode 100644
index 000000000..83573e499
--- /dev/null
+++ b/plugins/ros/README.mkd
@@ -0,0 +1,10 @@
+# Roswell Plugin
+
+This plugin adds completions and aliases for [Roswell](https://github.com/roswell/roswell/).
+
+To use it, add `ros` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... ros)
+```
+
diff --git a/plugins/ros/_ros b/plugins/ros/_ros
new file mode 100644
index 000000000..6a04d3c8f
--- /dev/null
+++ b/plugins/ros/_ros
@@ -0,0 +1,64 @@
+#compdef ros
+#autoload
+
+# roswell zsh completion, based on gem completion
+
+local -a _1st_arguments
+_1st_arguments=(
+'run: Run repl'
+'install:Install a given implementation or a system for roswell environment'
+'update:Update installed systems.'
+'build:Make executable from script.'
+'use:Change default implementation.'
+'init:a new ros script, optionally based on a template.'
+'fmt:Indent lisp source.'
+'list:Information'
+'template:[WIP] Manage templates'
+'delete:Delete installed implementations'
+'config:Get and set options'
+'version:Show the roswell version information'
+"help:Use \"ros help [command]\" for more information about a command."$'\n\t\t'"Use \"ros help [topic]\" for more information about the topic."
+)
+
+#local expl
+
+_arguments \
+ '(--version)'--version'[Print version information and quit]' \
+ '(-w --wrap)'{-w,--wrap}'[\[CODE\] Run roswell with a shell wrapper CODE]' \
+ '(-m --image)'{-m,--image}'[\[IMAGE\] continue from Lisp image IMAGE]' \
+ '(-M --module)'{-M,--module}'[\[NAME\] Execute ros script found in ROSWELLPATH. (pythons -m)]' \
+ '(-L --lisp)'{-L,--lisp}'[\[NAME\] Run roswell with a lisp impl NAME\[/VERSION\].]' \
+ '(-l --load)'{-l,--load}'[\[FILE\] load lisp FILE while building]' \
+ '(-S --source-registry)'{-S,--source-registry}'[\[X\] override source registry of asdf systems]' \
+ '(-s --system --load-system)'{-s,--system,--load-system}'[\[SYSTEM\] load asdf SYSTEM while building]' \
+ '(-p --package)'{-p,--package}'[\[PACKAGE\] change current package to \[PACKAGE\]]' \
+ '(-sp --system-package)'{-sp,--system-package}'[\[SP\] combination of -s \[SP\] and -p \[SP\]]' \
+ '(-e --eval)'{-e,--eval}'[\[FORM\] evaluate \[FORM\] while building]' \
+ '--require'--require'[\[MODULE\] require \[MODULE\] while building]' \
+ '(-q --quit)'{-q,--quit}'[quit lisp here]' \
+ '(-r --restart)'{-r,--restart}'[\[FUNC\] restart from build by calling (\[FUNC\])]' \
+ '(-E --entry)'{-E,--entry}'[\[FUNC\] restart from build by calling (\[FUNC\] argv)]' \
+ '(-i --init)'{-i,--init}'[\[FORM\] evaluate \[FORM\] after restart]' \
+ '(-ip --print)'{-ip,--print}'[\[FORM\] evaluate and princ \[FORM\] after restart]' \
+ '(-iw --write)'{-iw,--write}'[\[FORM\] evaluate and write \[FORM\] after restart]' \
+ '(-F --final)'{-F,--final}'[\[FORM\] evaluate \[FORM\] before dumping IMAGE]' \
+ '(\+R --no-rc)'{\+R,--no-rc}'[skip /etc/rosrc, ~/.roswell/init.lisp]' \
+ '(-A --asdf)'{-A,--asdf}'[use new asdf]' \
+ '(\+Q --no-quicklisp)'{\+Q,--no-quicklisp}'[do not use quicklisp]' \
+ '(-v --verbose)'{-v,--verbose}'[be quite noisy while building]' \
+ '--quiet'--quiet'[be quite quiet while building default]' \
+ '--test'--test'[for test purpose]' \
+ '*:: :->subcmds' && return 0
+
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "ros subcommand" _1st_arguments
+ return
+fi
+
+# _files
+case "$words[1]" in
+ -l|--load)
+ _files
+ ;;
+esac
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
index fe4946c6d..a7a4ee33a 100644
--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
@@ -2,20 +2,51 @@ typeset _agent_forwarding _ssh_env_cache
function _start_agent() {
local lifetime
- local -a identities
-
- # start ssh-agent and setup environment
zstyle -s :omz:plugins:ssh-agent lifetime lifetime
+ # start ssh-agent and setup environment
+ echo starting ssh-agent...
ssh-agent -s ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' >! $_ssh_env_cache
chmod 600 $_ssh_env_cache
. $_ssh_env_cache > /dev/null
+}
- # load identies
+function _add_identities() {
+ local id line sig
+ local -a identities loaded_sigs loaded_ids not_loaded
zstyle -a :omz:plugins:ssh-agent identities identities
- echo starting ssh-agent...
- ssh-add $HOME/.ssh/${^identities}
+ # check for .ssh folder presence
+ if [[ ! -d $HOME/.ssh ]]; then
+ return
+ fi
+
+ # add default keys if no identities were set up via zstyle
+ # this is to mimic the call to ssh-add with no identities
+ if [[ ${#identities} -eq 0 ]]; then
+ # key list found on `ssh-add` man page's DESCRIPTION section
+ for id in id_rsa id_dsa id_ecdsa id_ed25519 identity; do
+ # check if file exists
+ [[ -f "$HOME/.ssh/$id" ]] && identities+=$id
+ done
+ fi
+
+ # get list of loaded identities' signatures and filenames
+ for line in ${(f)"$(ssh-add -l)"}; do
+ loaded_sigs+=${${(z)line}[2]}
+ loaded_ids+=${${(z)line}[3]}
+ done
+
+ # add identities if not already loaded
+ for id in $identities; do
+ # check for filename match, otherwise try for signature match
+ if [[ ${loaded_ids[(I)$HOME/.ssh/$id]} -le 0 ]]; then
+ sig="$(ssh-keygen -lf "$HOME/.ssh/$id" | awk '{print $2}')"
+ [[ ${loaded_sigs[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id"
+ fi
+ done
+
+ [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded}
}
# Get the filename to store/lookup the environment from
@@ -42,6 +73,8 @@ else
_start_agent
fi
+_add_identities
+
# tidy up after ourselves
unset _agent_forwarding _ssh_env_cache
-unfunction _start_agent
+unfunction _start_agent _add_identities
diff --git a/plugins/stack/README.md b/plugins/stack/README.md
new file mode 100644
index 000000000..da73444ad
--- /dev/null
+++ b/plugins/stack/README.md
@@ -0,0 +1,9 @@
+# Stack
+
+This plugin provides completion for [Stack](https://haskellstack.org).
+
+To use it add stack to the plugins array in your zshrc file.
+
+```bash
+plugins=(... stack)
+```
diff --git a/plugins/suse/README.md b/plugins/suse/README.md
index 0e8a7f7ba..b9b069574 100644
--- a/plugins/suse/README.md
+++ b/plugins/suse/README.md
@@ -15,14 +15,14 @@ plugins=(... suse)
| Alias | Commands | Description |
| ---------------- | ----------------------------- | -------------------------------------------------------------- |
| z | `sudo zypper` | call zypper |
-| zh | `sudo zypper -h` | print help |
-| zhse | `sudo zypper -h se` | print help for the search command |
-| zlicenses | `sudo zypper licenses` | prints a report about licenses and EULAs of installed packages |
+| zh | `zypper -h` | print help |
+| zhse | `zypper -h se` | print help for the search command |
+| zlicenses | `zypper licenses` | prints a report about licenses and EULAs of installed packages |
| zps | `sudo zypper ps` | list process using deleted files |
| zshell | `sudo zypper shell` | open a zypper shell session |
| zsource-download | `sudo zypper source-download` | download source rpms for all installed packages |
-| ztos | `sudo zypper tos` | shows the ID string of the target operating system |
-| zvcmp | `sudo zypper vcmp` | tell whether version1 is older or newer than version2 |
+| ztos | `zypper tos` | shows the ID string of the target operating system |
+| zvcmp | `zypper vcmp` | tell whether version1 is older or newer than version2 |
## Packages commands
@@ -39,8 +39,8 @@ plugins=(... suse)
| Alias | Commands | Description |
| ------ | ------------------- | ---------------------- |
| zdup | `sudo zypper dup` | upgrade packages |
-| zlp | `sudo zypper lp` | list necessary patches |
-| zlu | `sudo zypper lu` | list updates |
+| zlp | `zypper lp` | list necessary patches |
+| zlu | `zypper lu` | list updates |
| zpchk | `sudo zypper pchk` | check for patches |
| zup | `sudo zypper up` | update packages |
| zpatch | `sudo zypper patch` | install patches |
@@ -49,16 +49,16 @@ plugins=(... suse)
| Alias | Commands | Description |
| ------------- | -------------------------- | ---------------------------------------------------- |
-| zif | `sudo zypper if` | display info about packages |
-| zpa | `sudo zypper pa` | list packages |
-| zpatch-info | `sudo zypper patch-info` | display info about patches |
-| zpattern-info | `sudo zypper pattern-info` | display info about patterns |
-| zproduct-info | `sudo zypper product-info` | display info about products |
-| zpch | `sudo zypper pch` | list all patches |
-| zpd | `sudo zypper pd` | list products |
-| zpt | `sudo zypper pt` | list patterns |
-| zse | `sudo zypper se` | search for packages |
-| zwp | `sudo zypper wp` | list all packages providing the specified capability |
+| zif | `zypper if` | display info about packages |
+| zpa | `zypper pa` | list packages |
+| zpatch-info | `zypper patch-info` | display info about patches |
+| zpattern-info | `zypper pattern-info` | display info about patterns |
+| zproduct-info | `zypper product-info` | display info about products |
+| zpch | `zypper pch` | list all patches |
+| zpd | `zypper pd` | list products |
+| zpt | `zypper pt` | list patterns |
+| zse | `zypper se` | search for packages |
+| zwp | `zypper wp` | list all packages providing the specified capability |
## Repositories commands
@@ -66,7 +66,7 @@ plugins=(... suse)
| ----- | ------------------- | ---------------------------------------- |
| zar | `sudo zypper ar` | add a repository |
| zcl | `sudo zypper clean` | clean cache |
-| zlr | `sudo zypper lr` | list repositories |
+| zlr | `zypper lr` | list repositories |
| zmr | `sudo zypper mr` | modify repositories |
| znr | `sudo zypper nr` | rename repositories (for the alias only) |
| zref | `sudo zypper ref` | refresh repositories |
@@ -79,12 +79,12 @@ plugins=(... suse)
| zms | `sudo zypper ms` | modify properties of specified services |
| zrefs | `sudo zypper refs` | refreshing a service mean executing the service's special task |
| zrs | `sudo zypper rs` | remove specified repository index service from the system |
-| zls | `sudo zypper ls` | list services defined on the system |
+| zls | `zypper ls` | list services defined on the system |
## Package Locks Management commands
| Alias | Commands | Description |
| ----- | ---------------- | ----------------------------------- |
| zal | `sudo zypper al` | add a package lock |
| zcl | `sudo zypper cl` | remove unused locks |
-| zll | `sudo zypper ll` | list currently active package locks |
+| zll | `zypper ll` | list currently active package locks |
| zrl | `sudo zypper rl` | remove specified package lock |
diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh
index 60f7042eb..dcfeccb03 100644
--- a/plugins/suse/suse.plugin.zsh
+++ b/plugins/suse/suse.plugin.zsh
@@ -1,13 +1,13 @@
#Main commands
alias z='sudo zypper'
-alias zh='sudo zypper -h'
-alias zhse='sudo zypper -h se'
-alias zlicenses='sudo zypper licenses'
+alias zh='zypper -h'
+alias zhse='zypper -h se'
+alias zlicenses='zypper licenses'
alias zps='sudo zypper ps'
alias zshell='sudo zypper shell'
alias zsource-download='sudo zypper source-download'
-alias ztos='sudo zypper tos'
-alias zvcmp='sudo zypper vcmp'
+alias ztos='zypper tos'
+alias zvcmp='zypper vcmp'
#Packages commands
alias zin='sudo zypper in'
@@ -18,28 +18,28 @@ alias zve='sudo zypper ve'
#Updates commands
alias zdup='sudo zypper dup'
-alias zlp='sudo zypper lp'
-alias zlu='sudo zypper lu'
+alias zlp='zypper lp'
+alias zlu='zypper lu'
alias zpchk='sudo zypper pchk'
alias zup='sudo zypper up'
alias zpatch='sudo zypper patch'
#Request commands
-alias zif='sudo zypper if'
-alias zpa='sudo zypper pa'
-alias zpatch-info='sudo zypper patch-info'
-alias zpattern-info='sudo zypper pattern-info'
-alias zproduct-info='sudo zypper product-info'
-alias zpch='sudo zypper pch'
-alias zpd='sudo zypper pd'
-alias zpt='sudo zypper pt'
-alias zse='sudo zypper se'
-alias zwp='sudo zypper wp'
+alias zif='zypper if'
+alias zpa='zypper pa'
+alias zpatch-info='zypper patch-info'
+alias zpattern-info='zypper pattern-info'
+alias zproduct-info='zypper product-info'
+alias zpch='zypper pch'
+alias zpd='zypper pd'
+alias zpt='zypper pt'
+alias zse='zypper se'
+alias zwp='zypper wp'
#Repositories commands
alias zar='sudo zypper ar'
alias zcl='sudo zypper clean'
-alias zlr='sudo zypper lr'
+alias zlr='zypper lr'
alias zmr='sudo zypper mr'
alias znr='sudo zypper nr'
alias zref='sudo zypper ref'
@@ -50,10 +50,10 @@ alias zas='sudo zypper as'
alias zms='sudo zypper ms'
alias zrefs='sudo zypper refs'
alias zrs='sudo zypper rs'
-alias zls='sudo zypper ls'
+alias zls='zypper ls'
#Package Locks Management commands
alias zal='sudo zypper al'
alias zcl='sudo zypper cl'
-alias zll='sudo zypper ll'
+alias zll='zypper ll'
alias zrl='sudo zypper rl'
diff --git a/plugins/svcat/README.md b/plugins/svcat/README.md
new file mode 100644
index 000000000..0bc60b117
--- /dev/null
+++ b/plugins/svcat/README.md
@@ -0,0 +1,9 @@
+# svcat
+
+This plugin provides completion for the [Kubernetes service catalog cli](https://github.com/kubernetes-incubator/service-catalog).
+
+To use it, add `svcat` to the plugins array in your zshrc file.
+
+```
+plugins=(... svcat)
+```
diff --git a/plugins/svcat/svcat.plugin.zsh b/plugins/svcat/svcat.plugin.zsh
new file mode 100644
index 000000000..f90e7d8d6
--- /dev/null
+++ b/plugins/svcat/svcat.plugin.zsh
@@ -0,0 +1,6 @@
+# Autocompletion for svcat.
+#
+
+if [ $commands[svcat] ]; then
+ source <(svcat completion zsh)
+fi
diff --git a/plugins/symfony/README.md b/plugins/symfony/README.md
new file mode 100644
index 000000000..c58f64fdd
--- /dev/null
+++ b/plugins/symfony/README.md
@@ -0,0 +1,9 @@
+# Symfony
+
+This plugin provides completion for [Symfony](https://symfony.com/).
+
+To use it add symfony to the plugins array in your zshrc file.
+
+```bash
+plugins=(... symfony)
+```
diff --git a/plugins/symfony2/README.md b/plugins/symfony2/README.md
new file mode 100644
index 000000000..2946d0937
--- /dev/null
+++ b/plugins/symfony2/README.md
@@ -0,0 +1,28 @@
+# Symfony2
+
+This plugin provides completion for [Symfony 2](https://symfony.com/), as well as aliases for frequent Symfony commands.
+
+To use it add symfony2 to the plugins array in your zshrc file.
+
+```bash
+plugins=(... symfony2)
+```
+
+## Aliases
+
+| Alias | Command | Description |
+|---------------|------------------------------|-------------------------------|
+| `sf` | php app/console | Start the symfony console |
+| `sfcl` | sf cache:clear | Clear the cache |
+| `sfsr` | sf server:run | Run the dev server |
+| `sfcw` | sf cache:warmup | Use the Bundles warmer |
+| `sfroute` | sf debug:router | Show the different routes |
+| `sfcontainer` | sf debug:contaner | List the different services |
+| `sfgb` | sf generate:bundle | Generate a bundle |
+| `sfgc` | sf generate:controller | Generate a controller |
+| `sfgcom` | sf generate:command | Generate a command |
+| `sfge` | sf doctrine:generate:entity | Generate an entity |
+| `sfsu` | sf doctrine:schema:update | Update the schema in Database |
+| `sfdc` | sf doctrine:database:create | Create the Database |
+| `sfdev` | sf --env=dev | Update environment to `dev` |
+| `sfprod` | sf --env=prod | Update environment to `prod` |
diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
index 0b608fe2a..1498e8d02 100644
--- a/plugins/symfony2/symfony2.plugin.zsh
+++ b/plugins/symfony2/symfony2.plugin.zsh
@@ -25,7 +25,10 @@ alias sfcw='sf cache:warmup'
alias sfroute='sf debug:router'
alias sfcontainer='sf debug:container'
alias sfgb='sf generate:bundle'
+alias sfgc='sf generate:controller'
+alias sfgcom='sf generate:command'
alias sfge='sf doctrine:generate:entity'
alias sfsu='sf doctrine:schema:update'
+alias sfdc='sf doctrine:database:create'
alias sfdev='sf --env=dev'
alias sfprod='sf --env=prod'
diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
index 5cc7b7397..bdc2219fa 100644
--- a/plugins/systemadmin/systemadmin.plugin.zsh
+++ b/plugins/systemadmin/systemadmin.plugin.zsh
@@ -134,12 +134,12 @@ geteip() {
curl -s -S https://icanhazip.com
}
-# determine local IP address
+# determine local IP address(es)
getip() {
if (( ${+commands[ip]} )); then
- ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}'
+ ip addr | awk '/inet /{print $2}' | command grep -v 127.0.0.1
else
- ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
+ ifconfig | awk '/inet /{print $2}' | command grep -v 127.0.0.1
fi
}
diff --git a/plugins/timer/README.md b/plugins/timer/README.md
new file mode 100644
index 000000000..321307e59
--- /dev/null
+++ b/plugins/timer/README.md
@@ -0,0 +1,17 @@
+This plugin allows to display command's execution time in a very nonintrusive way.
+
+Timer can be tuned by these two variables:
+* `TIMER_PRECISION` allows to control number of decimal places (default `1`)
+* `TIMER_FORMAT` allows to adjust display format (default `'/%d'`)
+
+Sample session:
+
+ me@here:~$ sleep 1 /1.0s
+ me@here:~$ sleep 73 /1m13.0s
+ me@here:~$ TIMER_FORMAT='[%d]'; TIMER_PRECISION=2 [0.00s]
+ me@here:~$ head -c50 < /dev/urandom | hexdump
+ 0000000 b2 16 20 f0 29 1f 61 2d 8a 29 20 8c 8c 39 5a ab
+ 0000010 21 47 0e f9 ee a4 76 46 71 9e 4f 6b a4 c4 51 cb
+ 0000020 f9 1f 7e b9 6f 2c ae dd cf 40 6d 64 a8 fb d3 db
+ 0000030 09 37
+ 0000032 [0.02s]
diff --git a/plugins/timer/timer.plugin.zsh b/plugins/timer/timer.plugin.zsh
new file mode 100644
index 000000000..231134e7d
--- /dev/null
+++ b/plugins/timer/timer.plugin.zsh
@@ -0,0 +1,29 @@
+__timer_current_time() {
+ perl -MTime::HiRes=time -e'print time'
+}
+
+__timer_format_duration() {
+ local mins=$(printf '%.0f' $(($1 / 60)))
+ local secs=$(printf "%.${TIMER_PRECISION:-1}f" $(($1 - 60 * mins)))
+ local duration_str=$(echo "${mins}m${secs}s")
+ local format="${TIMER_FORMAT:-/%d}"
+ echo "${format//\%d/${duration_str#0m}}"
+}
+
+__timer_save_time_preexec() {
+ __timer_cmd_start_time=$(__timer_current_time)
+}
+
+__timer_display_timer_precmd() {
+ if [ -n "${__timer_cmd_start_time}" ]; then
+ local cmd_end_time=$(__timer_current_time)
+ local tdiff=$((cmd_end_time - __timer_cmd_start_time))
+ unset __timer_cmd_start_time
+ local tdiffstr=$(__timer_format_duration ${tdiff})
+ local cols=$((COLUMNS - ${#tdiffstr} - 1))
+ echo -e "\033[1A\033[${cols}C ${tdiffstr}"
+ fi
+}
+
+preexec_functions+=(__timer_save_time_preexec)
+precmd_functions+=(__timer_display_timer_precmd)
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index 7ddf42099..2f3c3e79d 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -36,7 +36,7 @@ alias tkss='tmux kill-session -t'
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
# Determine if the terminal supports 256 colors
-if [[ $(tput colors) == 256 ]]; then
+if [[ $terminfo[colors] == 256 ]]; then
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
diff --git a/plugins/transfer/transfer.plugin.zsh b/plugins/transfer/transfer.plugin.zsh
index 7a7cd85ec..db744b0cd 100644
--- a/plugins/transfer/transfer.plugin.zsh
+++ b/plugins/transfer/transfer.plugin.zsh
@@ -61,7 +61,9 @@ transfer() {
# cat output link
cat $tmpfile
+ # add newline
+ echo
# cleanup
rm -f $tmpfile
-} \ No newline at end of file
+}
diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant
index a99a8f0e7..2efb4473d 100644
--- a/plugins/vagrant/_vagrant
+++ b/plugins/vagrant/_vagrant
@@ -6,6 +6,7 @@
local -a _1st_arguments
_1st_arguments=(
'box:Box commands'
+ 'cloud:Manages everything related to Vagrant Cloud'
'connect:Connects to a remotely shared Vagrant environment'
'destroy:Destroys the vagrant environment'
'docker-logs:Outputs the logs from the Docker container'
@@ -18,6 +19,7 @@ _1st_arguments=(
'login:Authenticates against a Vagrant Cloud server to access protected boxes'
'package:Packages a vagrant environment for distribution'
'plugin:Plugin commands'
+ 'port:Displays information about guest port mappings'
'provision:Run the provisioner'
'push:Deploys code in this environment to a configured destination'
'rdp:Connects to machine via RDP'
@@ -33,6 +35,7 @@ _1st_arguments=(
'suspend:Suspends the currently running vagrant environment'
'snapshot:Used to manage snapshots with the guest machine'
'up:Creates the vagrant environment'
+ 'validate:Validates the Vagrantfile'
'version:Prints current and latest Vagrant version'
'--help:[TASK] Describe available tasks or one specific task'
'--version:Prints the Vagrant version information'
@@ -54,7 +57,7 @@ __task_list ()
local expl
declare -a tasks
- tasks=(box destroy halt init package provision reload resume ssh ssh_config status suspend up version)
+ tasks=(box destroy halt init package port provision reload resume ssh ssh_config status suspend up version)
_wanted tasks expl 'help' compadd $tasks
}
@@ -123,7 +126,7 @@ case $state in
(box)
__vagrant-box
;;
- (up|provision|package|destroy|reload|ssh|ssh-config|halt|resume|status)
+ (up|provision|port|package|destroy|reload|ssh|ssh-config|halt|resume|status)
_arguments ':feature:__vm_list'
esac
;;
diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
index d790d944d..d04042506 100644
--- a/plugins/web-search/README.md
+++ b/plugins/web-search/README.md
@@ -37,6 +37,8 @@ Available search contexts are:
| `ecosia` | `https://www.ecosia.org/search?q=` |
| `goodreads` | `https://www.goodreads.com/search?q=` |
| `qwant` | `https://www.qwant.com/?q=` |
+| `givero` | `https://www.givero.com/search?q=` |
+| `stackoverflow` | `https://stackoverflow.com/search?q=` |
Also there are aliases for bang-searching DuckDuckGo:
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index 863384223..5b76eeae2 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -17,6 +17,8 @@ function web_search() {
ecosia "https://www.ecosia.org/search?q="
goodreads "https://www.goodreads.com/search?q="
qwant "https://www.qwant.com/?q="
+ givero "https://www.givero.com/search?q="
+ stackoverflow "https://stackoverflow.com/search?q="
)
# check whether the search engine is supported
@@ -51,6 +53,8 @@ alias baidu='web_search baidu'
alias ecosia='web_search ecosia'
alias goodreads='web_search goodreads'
alias qwant='web_search qwant'
+alias givero='web_search givero'
+alias stackoverflow='web_search stackoverflow'
#add your own !bang searches here
alias wiki='web_search duckduckgo \!w'
diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh
index 45fac0761..97bed406e 100644
--- a/plugins/wp-cli/wp-cli.plugin.zsh
+++ b/plugins/wp-cli/wp-cli.plugin.zsh
@@ -109,7 +109,7 @@ alias wptm='wp theme mod'
alias wptp='wp theme path'
alias wpts='wp theme search'
alias wptst='wp theme status'
-alias wptu='wp theme updatet'
+alias wptu='wp theme update'
# Transient
diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md
index c4e6d6da5..671a272d9 100644
--- a/plugins/yarn/README.md
+++ b/plugins/yarn/README.md
@@ -19,13 +19,19 @@ plugins=(... yarn)
| yap | `yarn add --peer` | Install a package in peerDependencies (`package.json`) |
| yb | `yarn build` | Run the build script defined in `package.json` |
| ycc | `yarn cache clean` | Clean yarn's global cache of packages |
+| yga | `yarn global add` | Install packages globally on your operating system |
+| ygls | `yarn global list` | Lists global installed packages |
+| ygrm | `yarn global remove` | Remove global installed packages from your OS |
| ygu | `yarn global upgrade` | Upgrade packages installed globally to their latest version |
| yh | `yarn help` | Show help for a yarn command |
+| yi | `yarn init` | Interactively creates or updates a package.json file |
| yin | `yarn install` | Install dependencies defined in `package.json` |
| yls | `yarn list` | List installed packages |
| yout | `yarn outdated` | Check for outdated package dependencies |
+| yp | `yarn pack` | Create a compressed gzip archive of package dependencies |
| yrm | `yarn remove` | Remove installed packages |
| yrun | `yarn run` | Run a defined package script |
+| ys | `yarn serve` | Start the dev server |
| yst | `yarn start` | Run the start script defined in `package.json` |
| yt | `yarn test` | Run the test script defined in `package.json` |
| yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache |
diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh
index fe752357f..9ed8322cd 100644
--- a/plugins/yarn/yarn.plugin.zsh
+++ b/plugins/yarn/yarn.plugin.zsh
@@ -4,13 +4,19 @@ alias yad="yarn add --dev"
alias yap="yarn add --peer"
alias yb="yarn build"
alias ycc="yarn cache clean"
+alias yga="yarn global add"
+alias ygls="yarn global list"
+alias ygrm="yarn global remove"
alias ygu="yarn global upgrade"
alias yh="yarn help"
+alias yi="yarn init"
alias yin="yarn install"
alias yls="yarn list"
alias yout="yarn outdated"
+alias yp="yarn pack"
alias yrm="yarn remove"
alias yrun="yarn run"
+alias ys="yarn serve"
alias yst="yarn start"
alias yt="yarn test"
alias yuc="yarn global upgrade && yarn cache clean"
diff --git a/plugins/z/z.sh b/plugins/z/z.sh
index 4fc75dc6a..5fe6d5266 100644
--- a/plugins/z/z.sh
+++ b/plugins/z/z.sh
@@ -222,10 +222,16 @@ if type compctl >/dev/null 2>&1; then
if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then
_z_precmd() {
(_z --add "${PWD:a}" &)
+ # Reference $RANDOM to refresh its value inside the subshell
+ # Otherwise, multiple runs get the same value
+ : $RANDOM
}
else
_z_precmd() {
(_z --add "${PWD:A}" &)
+ # Reference $RANDOM to refresh its value inside the subshell
+ # Otherwise, multiple runs get the same value
+ : $RANDOM
}
fi
[[ -n "${precmd_functions[(r)_z_precmd]}" ]] || {