From 22e00b02efe63d3ee19a55dadbdea0bea1785942 Mon Sep 17 00:00:00 2001 From: Caleb Williams Date: Wed, 2 Jan 2019 14:12:13 -0600 Subject: Add Yarn Workspace command aliases --- plugins/yarn/yarn.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh index 9ed8322cd..7bdfdb48a 100644 --- a/plugins/yarn/yarn.plugin.zsh +++ b/plugins/yarn/yarn.plugin.zsh @@ -22,3 +22,5 @@ alias yt="yarn test" alias yuc="yarn global upgrade && yarn cache clean" alias yui="yarn upgrade-interactive" alias yup="yarn upgrade" +alias yw="yarn workspace" +alias yws="yarn workspaces" -- cgit v1.2.3-70-g09d2 From b90f76c1411b4a2182f4fd54b5739be5f78410e8 Mon Sep 17 00:00:00 2001 From: Ilya Gorski <52842983+gorsil@users.noreply.github.com> Date: Mon, 15 Jul 2019 00:40:28 +0300 Subject: fzf: Adding support for debian packages --- plugins/fzf/fzf.plugin.zsh | 150 ++++++++++++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 57 deletions(-) (limited to 'plugins') diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 27e2d9246..e191bebbd 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -1,57 +1,93 @@ -test -d "${FZF_BASE}" && fzf_base="${FZF_BASE}" - -if [[ -z "${fzf_base}" ]]; then - fzfdirs=( - "${HOME}/.fzf" - "/usr/local/opt/fzf" - "/usr/share/fzf" - ) - for dir in ${fzfdirs}; do - if [[ -d "${dir}" ]]; then - fzf_base="${dir}" - break - fi - done - - if [[ -z "${fzf_base}" ]]; then - if (( ${+commands[brew]} )) && dir="$(brew --prefix fzf 2>/dev/null)"; then - if [[ -d "${dir}" ]]; then - fzf_base="${dir}" - fi - fi - fi -fi - -if [[ -n "${fzf_base}" ]]; then - - # Fix fzf shell directory for Archlinux package - if [[ ! -d "${fzf_base}/shell" ]] && [[ -f /etc/arch-release ]]; then - fzf_shell="${fzf_base}" - else - fzf_shell="${fzf_base}/shell" - fi - - # Setup fzf - # --------- - if ! (( ${+commands[fzf]} )) && [[ ! "$PATH" == *$fzf_base/bin* ]]; then - export PATH="$PATH:$fzf_base/bin" - fi - - # Auto-completion - # --------------- - if [[ ! "$DISABLE_FZF_AUTO_COMPLETION" == "true" ]]; then - [[ $- == *i* ]] && source "${fzf_shell}/completion.zsh" 2> /dev/null - fi - - # Key bindings - # ------------ - if [[ ! "$DISABLE_FZF_KEY_BINDINGS" == "true" ]]; then - source "${fzf_shell}/key-bindings.zsh" - fi - -else - print "[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.\n"\ - "Please add \`export FZF_BASE=/path/to/fzf/install/dir\` to your .zshrc" >&2 -fi - -unset fzf_base fzf_shell dir fzfdirs +function setup_using_base_dir() { + # Declare all variables local not no mess with outside env in any way + local fzf_base + local fzf_shell + local fzfdirs + local dir + + test -d "${FZF_BASE}" && fzf_base="${FZF_BASE}" + + if [[ -z "${fzf_base}" ]]; then + fzfdirs=( + "${HOME}/.fzf" + "/usr/local/opt/fzf" + "/usr/share/fzf" + ) + for dir in ${fzfdirs}; do + if [[ -d "${dir}" ]]; then + fzf_base="${dir}" + break + fi + done + + if [[ -z "${fzf_base}" ]]; then + if (( ${+commands[brew]} )) && dir="$(brew --prefix fzf 2>/dev/null)"; then + if [[ -d "${dir}" ]]; then + fzf_base="${dir}" + fi + fi + fi + fi + + if [[ -d "${fzf_base}" ]]; then + # Fix fzf shell directory for Archlinux package + if [[ ! -d "${fzf_base}/shell" ]] && [[ -f /etc/arch-release ]]; then + fzf_shell="${fzf_base}" + else + fzf_shell="${fzf_base}/shell" + fi + + # Setup fzf binary path + if ! (( ${+commands[fzf]} )) && [[ ! "$PATH" == *$fzf_base/bin* ]]; then + export PATH="$PATH:$fzf_base/bin" + fi + + # Auto-completion + if [[ ! "$DISABLE_FZF_AUTO_COMPLETION" == "true" ]]; then + [[ $- == *i* ]] && source "${fzf_shell}/completion.zsh" 2> /dev/null + fi + + # Key bindings + if [[ ! "$DISABLE_FZF_KEY_BINDINGS" == "true" ]]; then + source "${fzf_shell}/key-bindings.zsh" + fi + else + return 1 + fi +} + + +function setup_using_debian_package() { + dpkg -s fzf &> /dev/null + if (( $? )); then + # Either not a debian based distro, or no fzf installed. In any case skip ahead + return 1 + fi + + # NOTE: There is no need to configure PATH for debian package, all binaries + # are installed to /usr/bin by default + + local completions="/usr/share/zsh/vendor-completions/_fzf" + local key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh" + + # Auto-completion + if [[ $- == *i* ]] && [[ ! "$DISABLE_FZF_AUTO_COMPLETION" == "true" ]]; then + source $completions 2> /dev/null + fi + + # Key bindings + if [[ ! "$DISABLE_FZF_KEY_BINDINGS" == "true" ]]; then + source $key_bindings + fi + + return 0 +} + +function indicate_error() { + print "[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.\n"\ + "Please add \`export FZF_BASE=/path/to/fzf/install/dir\` to your .zshrc" >&2 +} + +# Check for debian package first, because it easy to short cut +# Indicate to user that fzf installation not found if nothing worked +setup_using_debian_package || setup_using_base_dir || indicate_error -- cgit v1.2.3-70-g09d2 From 0565251c3bd91994073a265cdb8abb7eac9439e5 Mon Sep 17 00:00:00 2001 From: Ilya Gorski <52842983+gorsil@users.noreply.github.com> Date: Wed, 17 Jul 2019 02:43:00 +0300 Subject: Unset all local functions after running them --- plugins/fzf/fzf.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index e191bebbd..646148297 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -91,3 +91,5 @@ function indicate_error() { # Check for debian package first, because it easy to short cut # Indicate to user that fzf installation not found if nothing worked setup_using_debian_package || setup_using_base_dir || indicate_error + +unset -f setup_using_debian_package setup_using_base_dir indicate_error -- cgit v1.2.3-70-g09d2 From ccee223aed6c280f207d02dd7e23f3a0d3cfcda1 Mon Sep 17 00:00:00 2001 From: KevinHu2014 Date: Wed, 25 Sep 2019 00:58:35 +0800 Subject: react-native: add aliases for newer iPhones Added aliases for iPhone 11, 11 Pro, 11 Pro Max --- plugins/react-native/react-native.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh index f7695d15f..b33dedfed 100644 --- a/plugins/react-native/react-native.plugin.zsh +++ b/plugins/react-native/react-native.plugin.zsh @@ -24,6 +24,10 @@ alias rniosx='react-native run-ios --simulator "iPhone X"' 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 Xʀ"' +alias rnios11='react-native run-ios --simulator "iPhone 11"' +alias rnios11p='react-native run-ios --simulator "iPhone 11 Pro"' +alias rnios11pm='react-native run-ios --simulator "iPhone 11 Pro Max"' + # iPad alias rnipad2='react-native run-ios --simulator "iPad 2"' -- cgit v1.2.3-70-g09d2 From 2004550a5890850505b29bda801dafdf3a94d0d7 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 25 Sep 2019 01:03:08 +0800 Subject: react-native: add aliases for newer iPhones to Doc Added aliases for iPhone 11, 11 Pro, 11 Pro Max to the Document. --- plugins/react-native/README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/react-native/README.md b/plugins/react-native/README.md index dc0207184..a472ddb1c 100644 --- a/plugins/react-native/README.md +++ b/plugins/react-native/README.md @@ -39,6 +39,9 @@ plugins=(... react-native) | **rniosxs** | `react-native run-ios --simulator "iPhone Xs"` | | **rniosxsm** | `react-native run-ios --simulator "iPhone Xs Max"` | | **rniosxr** | `react-native run-ios --simulator "iPhone Xʀ"` | +| **rnios11** | `react-native run-ios --simulator "iPhone 11"` | +| **rnios11p** | `react-native run-ios --simulator "iPhone 11 Pro"` | +| **rnios11pm** | `react-native run-ios --simulator "iPhone 11 Pro Max"` | | _iPad_ | | | **rnipad2** | `react-native run-ios --simulator "iPad 2"` | | **rnipad5** | `react-native run-ios --simulator "iPad (5th generation)"` | -- cgit v1.2.3-70-g09d2 From 487f0af412e9ef968175d290a606bd6c0717fc9b Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 30 Sep 2019 19:49:09 +0200 Subject: Fix table alignment --- plugins/react-native/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/react-native/README.md b/plugins/react-native/README.md index a472ddb1c..d0a53b8d7 100644 --- a/plugins/react-native/README.md +++ b/plugins/react-native/README.md @@ -40,8 +40,8 @@ plugins=(... react-native) | **rniosxsm** | `react-native run-ios --simulator "iPhone Xs Max"` | | **rniosxr** | `react-native run-ios --simulator "iPhone Xʀ"` | | **rnios11** | `react-native run-ios --simulator "iPhone 11"` | -| **rnios11p** | `react-native run-ios --simulator "iPhone 11 Pro"` | -| **rnios11pm** | `react-native run-ios --simulator "iPhone 11 Pro Max"` | +| **rnios11p** | `react-native run-ios --simulator "iPhone 11 Pro"` | +| **rnios11pm** | `react-native run-ios --simulator "iPhone 11 Pro Max"` | | _iPad_ | | | **rnipad2** | `react-native run-ios --simulator "iPad 2"` | | **rnipad5** | `react-native run-ios --simulator "iPad (5th generation)"` | -- cgit v1.2.3-70-g09d2 From f763244e3b7f66bf2259c6e1bd16af08dd4b465e Mon Sep 17 00:00:00 2001 From: Rhuan Oliveira <43691332+lif3code@users.noreply.github.com> Date: Tue, 1 Oct 2019 07:56:41 -0300 Subject: autoenv: add README (#8184) --- plugins/autoenv/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/autoenv/README.md (limited to 'plugins') diff --git a/plugins/autoenv/README.md b/plugins/autoenv/README.md new file mode 100644 index 000000000..de3881774 --- /dev/null +++ b/plugins/autoenv/README.md @@ -0,0 +1,14 @@ +# Autoenv plugin + +This plugin loads the [Autoenv](https://github.com/inishchith/autoenv). + +To use it, add `autoenv` to the plugins array in your zshrc file: + +```zsh +plugins=(... autoenv) +``` +## Requirements + +In order to make this work, you will need to have the autoenv installed. + +More info on the usage and install: https://github.com/inishchith/autoenv -- cgit v1.2.3-70-g09d2 From 8bfeb3759c34a8e2e6a5795c3f40630a220e709b Mon Sep 17 00:00:00 2001 From: David Woodward Date: Tue, 1 Oct 2019 19:02:28 +0800 Subject: oc: add README (#8188) --- plugins/oc/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/oc/README.md (limited to 'plugins') diff --git a/plugins/oc/README.md b/plugins/oc/README.md new file mode 100644 index 000000000..deae9b2d0 --- /dev/null +++ b/plugins/oc/README.md @@ -0,0 +1,13 @@ +# OC - OpenShift CLI + +This plugin provides autocompletion for [OC](https://docs.openshift.com/container-platform/3.7/cli_reference/index.html) commands, building, managing and updating operations. + +To use it, add `oc` to the plugins array of your zshrc file: + +```bash +plugins=(... oc) +``` + +## Contributors + ++ [kevinkirkup](https://github.com/kevinkirkup) - Plugin Author -- cgit v1.2.3-70-g09d2 From 51f0eaad61d5870d990386ad8479bcd6a86108b6 Mon Sep 17 00:00:00 2001 From: Sukin Kumar K Date: Tue, 1 Oct 2019 16:43:18 +0530 Subject: Add README for thor and pip plugins (#8185) --- plugins/pip/README.md | 19 +++++++++++++++++++ plugins/thor/README.md | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 plugins/pip/README.md create mode 100644 plugins/thor/README.md (limited to 'plugins') diff --git a/plugins/pip/README.md b/plugins/pip/README.md new file mode 100644 index 000000000..f07b5c058 --- /dev/null +++ b/plugins/pip/README.md @@ -0,0 +1,19 @@ +# pip plugin + +This plugin adds completion for [pip](https://pip.pypa.io/en/latest/), +the Python package manager. + +To use it, add `pip` to the plugins array in your zshrc file: + +```zsh +plugins=(... pip) +``` + +## pip cache + +The pip plugin caches the names of available pip packages from the PyPI index. +To trigger the caching process, try to complete `pip install`, +or you can run `zsh-pip-cache-packages` directly. + +To reset the cache, run `zsh-pip-clear-cache` and it will be rebuilt next +the next time you autocomplete `pip install`. diff --git a/plugins/thor/README.md b/plugins/thor/README.md new file mode 100644 index 000000000..09c705d9a --- /dev/null +++ b/plugins/thor/README.md @@ -0,0 +1,10 @@ +# Thor plugin + +This plugin adds completion for [Thor](http://whatisthor.com/), +a ruby toolkit for building powerful command-line interfaces. + +To use it, add `thor` to the plugins array in your zshrc file: + +```zsh +plugins=(... thor) +``` -- cgit v1.2.3-70-g09d2 From ec7ef7eed15ceca8dabb2dc9269d9fe2a48f9cee Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Tue, 1 Oct 2019 14:10:11 -0400 Subject: lein: add README (#8189) --- plugins/lein/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/lein/README.md (limited to 'plugins') diff --git a/plugins/lein/README.md b/plugins/lein/README.md new file mode 100644 index 000000000..0c4119663 --- /dev/null +++ b/plugins/lein/README.md @@ -0,0 +1,9 @@ +# Leiningen plugin + +This plugin adds completions for the [Leiningen](https://leiningen.org/) Clojure build tool. + +To use it, add `lein` to the plugins array in your zshrc file: + +```zsh +plugins=(... lein) +``` -- cgit v1.2.3-70-g09d2 From b8cfa0c77a68cb64c113b1f4a05b0d67d1bd7448 Mon Sep 17 00:00:00 2001 From: Caleb Williams Date: Tue, 1 Oct 2019 14:11:59 -0500 Subject: Update README: include Yarn workspace shortcuts --- plugins/yarn/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md index 671a272d9..e426053de 100644 --- a/plugins/yarn/README.md +++ b/plugins/yarn/README.md @@ -37,3 +37,5 @@ plugins=(... yarn) | yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache | | yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade | | yup | `yarn upgrade` | Upgrade packages to their latest version | +| yw | `yarn workspace` | Run a command within a single workspace. | +| yws | `yarn workspaces` | Run a command within all defined workspaces. | -- cgit v1.2.3-70-g09d2 From 77ad69e0805d722e673ae3f3c655788188ec1751 Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Tue, 1 Oct 2019 15:21:05 -0400 Subject: jruby: add README (#8190) --- plugins/jruby/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/jruby/README.md (limited to 'plugins') diff --git a/plugins/jruby/README.md b/plugins/jruby/README.md new file mode 100644 index 000000000..821a46d5e --- /dev/null +++ b/plugins/jruby/README.md @@ -0,0 +1,21 @@ +# JRuby plugin + +This plugin adds aliases for [JRuby](https://www.jruby.org/). + +To use it, add `jruby` to the plugins array in your zshrc file: + +```zsh +plugins=(... jruby) +``` + +## Requirements + +This plugin assumes you already have jruby installed and available in your [path](https://www.jruby.org/getting-started). + +## Aliases + +| Alias | Command | +| ------------ | ---------------------------------------------------------------- | +| `jrspec` | `jruby --debug -S rspec --debug` | +| `jprofile` | `jruby --profile.api -S rspec` | +| `jexec` | `jruby -S` | -- cgit v1.2.3-70-g09d2 From f32b30277d2cc0e47d9426ab8610d9a8a32979d3 Mon Sep 17 00:00:00 2001 From: 14nrv <34603467+14nrv@users.noreply.github.com> Date: Tue, 1 Oct 2019 22:24:00 +0200 Subject: yarn: add yd as yarn dev alias (#7663) --- plugins/yarn/README.md | 1 + plugins/yarn/yarn.plugin.zsh | 1 + 2 files changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md index 671a272d9..5a3da0723 100644 --- a/plugins/yarn/README.md +++ b/plugins/yarn/README.md @@ -19,6 +19,7 @@ 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 | +| yd | `yarn dev` | Run the dev script defined in `package.json` | | 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 | diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh index 9ed8322cd..d00e1c897 100644 --- a/plugins/yarn/yarn.plugin.zsh +++ b/plugins/yarn/yarn.plugin.zsh @@ -4,6 +4,7 @@ alias yad="yarn add --dev" alias yap="yarn add --peer" alias yb="yarn build" alias ycc="yarn cache clean" +alias yd="yarn dev" alias yga="yarn global add" alias ygls="yarn global list" alias ygrm="yarn global remove" -- cgit v1.2.3-70-g09d2 From e38099de96e8b62976354b468da1b21ec2d57f68 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 2 Oct 2019 13:10:17 +0200 Subject: sublime: ignore wslpath errors if C drive is missing --- plugins/sublime/sublime.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 69604ab4f..dd5063360 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -17,8 +17,8 @@ alias stn=create_project if [[ "$OSTYPE" == linux* ]]; then if [[ "$(uname -r)" = *icrosoft* ]]; then _sublime_paths=( - "$(wslpath -u 'C:\Program Files\Sublime Text 3\subl.exe')" - "$(wslpath -u 'C:\Program Files\Sublime Text 2\subl.exe')" + "$(wslpath -u 'C:\Program Files\Sublime Text 3\subl.exe' 2>/dev/null)" + "$(wslpath -u 'C:\Program Files\Sublime Text 2\subl.exe' 2>/dev/null)" ) else _sublime_paths=( -- cgit v1.2.3-70-g09d2 From fc9093b745096a970c8b87b2275a69ad13d665db Mon Sep 17 00:00:00 2001 From: David Shaffer Date: Thu, 26 Sep 2019 10:12:30 -0400 Subject: Add rubocop to bundled_commands --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 668e15d2f..c4a4fd40a 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -27,6 +27,7 @@ bundled_commands=( rainbows rake rspec + rubocop shotgun sidekiq spec -- cgit v1.2.3-70-g09d2 From 372bb48cee7e1d2d20ebef660a86742a7e57756b Mon Sep 17 00:00:00 2001 From: David Shaffer Date: Wed, 2 Oct 2019 07:45:19 -0400 Subject: Add rubocop to bundler readme --- plugins/bundler/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md index dc2f17008..a7d40cd0a 100644 --- a/plugins/bundler/README.md +++ b/plugins/bundler/README.md @@ -2,7 +2,7 @@ - adds completion for basic bundler commands - adds short aliases for common bundler commands - - `be` aliased to `bundle exec`. + - `be` aliased to `bundle exec`. It also supports aliases (if `rs` is `rails server`, `be rs` will bundle-exec `rails server`). - `bl` aliased to `bundle list` - `bp` aliased to `bundle package` @@ -15,7 +15,7 @@ - calls `bundle exec ` otherwise Common gems wrapped by default (by name of the executable): -`annotate`, `cap`, `capify`, `cucumber`, `foodcritic`, `guard`, `hanami`, `irb`, `jekyll`, `kitchen`, `knife`, `middleman`, `nanoc`, `pry`, `puma`, `rackup`, `rainbows`, `rake`, `rspec`, `shotgun`, `sidekiq`, `spec`, `spork`, `spring`, `strainer`, `tailor`, `taps`, `thin`, `thor`, `unicorn` and `unicorn_rails`. +`annotate`, `cap`, `capify`, `cucumber`, `foodcritic`, `guard`, `hanami`, `irb`, `jekyll`, `kitchen`, `knife`, `middleman`, `nanoc`, `pry`, `puma`, `rackup`, `rainbows`, `rake`, `rspec`, `rubocop`, `shotgun`, `sidekiq`, `spec`, `spork`, `spring`, `strainer`, `tailor`, `taps`, `thin`, `thor`, `unicorn` and `unicorn_rails`. ## Configuration -- cgit v1.2.3-70-g09d2 From 4b8f4d529ef1965a9f6a233579ea432374f817dd Mon Sep 17 00:00:00 2001 From: Ekunola Ezekiel Date: Wed, 2 Oct 2019 17:58:15 +0100 Subject: yii: add README (#8194) --- plugins/yii/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/yii/README.md (limited to 'plugins') diff --git a/plugins/yii/README.md b/plugins/yii/README.md new file mode 100644 index 000000000..f1b72e916 --- /dev/null +++ b/plugins/yii/README.md @@ -0,0 +1,14 @@ +# Yii plugin + +The plugin adds autocomplete commands and subcommands for [yii](https://www.yiiframework.com/). + +To use it, add `yii` to the plugins array of your zshrc file: +``` +plugins=(... yii) +``` + +## Aliases + +| Alias | Command | +|--------|----------------------| +| yiic | `protected/yiic` | -- cgit v1.2.3-70-g09d2 From ae0de1135dc96cfabe31d70f65112cbeadbfa3bf Mon Sep 17 00:00:00 2001 From: Rexben Date: Wed, 2 Oct 2019 21:31:28 +0100 Subject: cakephp3: add README (#8196) --- plugins/cakephp3/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/cakephp3/README.md (limited to 'plugins') diff --git a/plugins/cakephp3/README.md b/plugins/cakephp3/README.md new file mode 100644 index 000000000..7e8f6640d --- /dev/null +++ b/plugins/cakephp3/README.md @@ -0,0 +1,16 @@ +# cakephp3 plugin + +The plugin adds aliases and autocompletion for [cakephp3](https://book.cakephp.org/3.0/en/index.html). + +To use it, add `cakephp3` to the plugins array of your zshrc file: +``` +plugins=(... cakephp3) +``` + +## Aliases + +| Alias | Command | +|-----------|-------------------------------| +| c3 | `bin/cake` | +| c3cache | `bin/cake orm_cache clear` | +| c3migrate | `bin/cake migrations migrate` | -- cgit v1.2.3-70-g09d2 From 188eff0653a078ecf67e0a1c6b72de8d61384986 Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Wed, 2 Oct 2019 20:30:22 -0400 Subject: Adding README for rvm --- plugins/rvm/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/rvm/README.md (limited to 'plugins') diff --git a/plugins/rvm/README.md b/plugins/rvm/README.md new file mode 100644 index 000000000..9d6fd8f85 --- /dev/null +++ b/plugins/rvm/README.md @@ -0,0 +1,19 @@ +# Ruby Version Manager plugin + +This plugin adds some utility functions and completions for [Ruby Version Manager](https://rvm.io/). + +To use it, add `rvm` to the plugins array in your zshrc file: + +```zsh +plugins=(... rvm) +``` + +## Functions +| Alias | Command | +|----------------|----------------------| +| `rb18` | `rvm use ruby-1.8.7` | +| `rb19` | `rvm use ruby-1.9.3` | +| `rb20` | `rvm use ruby-2.0.0` | +| `rb21` | `rvm use ruby-2.1.2` | +| `rvm-update` | `rvm get head` | +| `gems` | `gem list` | -- cgit v1.2.3-70-g09d2 From ff23aa0bf9851c477b956c89882fdd04e143042e Mon Sep 17 00:00:00 2001 From: Nicholas Meriano Date: Thu, 3 Oct 2019 04:51:17 -0700 Subject: n98-magerun: add README (#8200) --- plugins/n98-magerun/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/n98-magerun/README.md (limited to 'plugins') diff --git a/plugins/n98-magerun/README.md b/plugins/n98-magerun/README.md new file mode 100644 index 000000000..b0abe4747 --- /dev/null +++ b/plugins/n98-magerun/README.md @@ -0,0 +1,21 @@ +# n98-magerun plugin + +The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. + +The [n98-magerun plugin](https://github.com/netz98/n98-magerun) provides many +[useful aliases](#aliases) as well as completion for the `n98-magerun` command. + +Enable it by adding `n98-magerun` to the plugins array in your zshrc file: + +```zsh +plugins=(... n98-magerun) +``` + +## Aliases + +| Alias | Command | Description | +| --------- | -------------------------------------------------- | --------------------------------------------------------------------------------- | +| n98 | `n98-magerun.phar` | The N98-Magerun phar-file (Version 1) | +| n98-2 | `n98-magerun2.phar` | The N98-Magerun phar-file (Version 2) | +| mage-get | `wget https://files.magerun.net/n98-magerun.phar` | Download the latest stable N98-Magerun phar-file from the file-server (Version 1) | +| mage2-get | `wget https://files.magerun.net/n98-magerun2.phar` | Download the latest stable N98-Magerun phar-file from the file-server (Version 2) | -- cgit v1.2.3-70-g09d2 From c60371a829901cde3322c18c6d35e88ddd9bc1f3 Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Thu, 3 Oct 2019 07:52:50 -0400 Subject: rebar: add README (#8198) --- plugins/rebar/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/rebar/README.md (limited to 'plugins') diff --git a/plugins/rebar/README.md b/plugins/rebar/README.md new file mode 100644 index 000000000..456ba45c7 --- /dev/null +++ b/plugins/rebar/README.md @@ -0,0 +1,9 @@ +# rebar plugin + +This plugin adds completions for the [rebar](https://www.rebar3.org/) Erlang build tool. + +To use it, add `rebar` to the plugins array in your zshrc file: + +```zsh +plugins=(... rebar) +``` -- cgit v1.2.3-70-g09d2 From 3848102a5ec8534cef935d594c6abcbfc0f419c8 Mon Sep 17 00:00:00 2001 From: Shubham Kamath <44347043+shubhaemk@users.noreply.github.com> Date: Thu, 3 Oct 2019 17:25:08 +0530 Subject: terminitor: add README (#8197) --- plugins/terminitor/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/terminitor/README.md (limited to 'plugins') diff --git a/plugins/terminitor/README.md b/plugins/terminitor/README.md new file mode 100644 index 000000000..8c0e02113 --- /dev/null +++ b/plugins/terminitor/README.md @@ -0,0 +1,9 @@ +# Terminitor plugin + +This plugin adds completions for the [Terminitor](https://github.com/achiurizo/terminitor) development workflow setup tool. + +To use it, add `terminitor` to the plugins array in your zshrc file: + +```zsh +plugins=(... terminitor) +``` -- cgit v1.2.3-70-g09d2 From 1be840b8319b40c5608d18816031f6b2d6dc6849 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Sat, 5 Oct 2019 11:05:46 +0200 Subject: Create README.md --- plugins/redis-cli/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/redis-cli/README.md (limited to 'plugins') diff --git a/plugins/redis-cli/README.md b/plugins/redis-cli/README.md new file mode 100644 index 000000000..f6e947f4c --- /dev/null +++ b/plugins/redis-cli/README.md @@ -0,0 +1,14 @@ +# Redis-CLI + +This plugin adds [redis-cli](https://redis.io/topics/rediscli) completion, based off homebrew completion + +To use it, add `redis-cli` to the plugins array in your zshrc file: + +```zsh +plugins=(... redis-cli) +``` +## Requirements + +In order to make this work, you will need to have the redis installed. + +More info on the usage and install: https://redis.io/topics/quickstart -- cgit v1.2.3-70-g09d2 From e1cb349ffe411b6de2fef696885ec687853d152f Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Sat, 5 Oct 2019 11:14:12 +0200 Subject: Update README.md --- plugins/redis-cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/redis-cli/README.md b/plugins/redis-cli/README.md index f6e947f4c..64956df13 100644 --- a/plugins/redis-cli/README.md +++ b/plugins/redis-cli/README.md @@ -9,6 +9,6 @@ plugins=(... redis-cli) ``` ## Requirements -In order to make this work, you will need to have the redis installed. +In order to make this work, you will need to have redis installed. More info on the usage and install: https://redis.io/topics/quickstart -- cgit v1.2.3-70-g09d2 From 53d987346f4d465c100f3dab234953db48eed7a1 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Sat, 5 Oct 2019 11:30:21 +0200 Subject: Create README.md --- plugins/perl/README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 plugins/perl/README.md (limited to 'plugins') diff --git a/plugins/perl/README.md b/plugins/perl/README.md new file mode 100644 index 000000000..f2f4b79ec --- /dev/null +++ b/plugins/perl/README.md @@ -0,0 +1,36 @@ +# Perl + +This plugin adds [perl](https://www.perl.org/) useful aliases/functions. + +To use it, add `perl` to the plugins array in your zshrc file: + +```zsh +plugins=(... perl) +``` + +## Aliases + +| Aliases | Command | Description | +| :------------ | :-------------- | :----------------------------------- | +| pbi | perlbrew install|Install specific perl version | +| pbl | perlbrew list |List all perl version installed | +| pbo | perlbrew off |Go back to the system perl | +| pbs | perlbrew switch |Turn it back on | +| pbu | perlbrew use |Use specific version of perl | +| pd | perldoc |Show the perl documentation | +| ple | perl -wlne |Use perl like awk/sed | +| latest-perl | curl `...` |Show the latest stable release of Perl| + +## Functions + +`newpl` - creates a basic Perl script file and opens it with $EDITOR + +`pgs` - Perl Global Substitution (find pattern = 1st arg ; replace pattern = 2nd arg ; filename = 3rd arg) + +`prep` - Perl grep, because 'grep -P' is terrible. Lets you work with pipes or files. (pattern = 1st arg ; filename = 2nd arg) + +## Requirements + +In order to make this work, you will need to have perl installed. + +More info on the usage and install: https://www.perl.org/get.html -- cgit v1.2.3-70-g09d2 From dd0ade161c0fc47ea4a9e43ce3787170db2f8f60 Mon Sep 17 00:00:00 2001 From: Alex Morozoff Date: Sun, 6 Oct 2019 15:24:25 -0400 Subject: Create README.md Added README for UFW plugin issue: [Good first PR] Add READMEs to undocumented plugins #7175 --- plugins/ufw/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/ufw/README.md (limited to 'plugins') diff --git a/plugins/ufw/README.md b/plugins/ufw/README.md new file mode 100644 index 000000000..a27487a46 --- /dev/null +++ b/plugins/ufw/README.md @@ -0,0 +1,17 @@ +# UFW +This plugin adds support for managing everybody's favorite Uncomplicated Firewall (UFW). Learn more about [`UFW`](https://wiki.ubuntu.com/UncomplicatedFirewall). + +To use it, add ufw to the plugins array of your zshrc file: +``` +plugins=(... ufw) +``` +UFW is a simple Ubuntu interface for managing iptables. + +Some of the commands include: + +* `allow /` add an allow rule +* `default` set default policy +* `delete /` delete RULE +* `deny /` add deny rule +* `disable` disables the firewall +* `enable` enables the firewall -- cgit v1.2.3-70-g09d2 From 4b65f439e2c92b7c839dd355f8701d72f3a8ea2b Mon Sep 17 00:00:00 2001 From: Michael C Date: Sun, 6 Oct 2019 15:33:06 +0200 Subject: docs: add README.md for Dash plugin --- plugins/dash/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugins/dash/README.md (limited to 'plugins') diff --git a/plugins/dash/README.md b/plugins/dash/README.md new file mode 100644 index 000000000..f69f834f3 --- /dev/null +++ b/plugins/dash/README.md @@ -0,0 +1,29 @@ +# Dash plugin + +This plugin adds command line functionality for [Dash](https://kapeli.com/dash), +an API Documentation Browser. + +This plugin requires Dash to be installed to work. + +To use it, add `dash` to the plugins array in your zshrc file: + +```zsh +plugins=(... dash) +``` + +Make sure to source your rc file: +``` +source ~/.zshrc +``` + +## Usage + +Open and switch to the dash application. +``` +dash +``` + +Query for something in dash app. +``` +dash golang +``` -- cgit v1.2.3-70-g09d2 From 357336bfb399ac95db21ceed40dc7b18eea6779c Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 7 Oct 2019 17:04:31 +0200 Subject: Remove redundant section and document keyword args --- plugins/dash/README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/dash/README.md b/plugins/dash/README.md index f69f834f3..0ca3e4e44 100644 --- a/plugins/dash/README.md +++ b/plugins/dash/README.md @@ -1,9 +1,8 @@ # Dash plugin This plugin adds command line functionality for [Dash](https://kapeli.com/dash), -an API Documentation Browser. - -This plugin requires Dash to be installed to work. +an API Documentation Browser for macOS. This plugin requires Dash to be installed +to work. To use it, add `dash` to the plugins array in your zshrc file: @@ -11,19 +10,19 @@ To use it, add `dash` to the plugins array in your zshrc file: plugins=(... dash) ``` -Make sure to source your rc file: -``` -source ~/.zshrc -``` - ## Usage -Open and switch to the dash application. +- Open and switch to the dash application. ``` dash ``` -Query for something in dash app. +- Query for something in dash app: `dash query` +``` +dash golang +``` + +- You can optionally provide a keyword: `dash [keyword:]query` ``` -dash golang +dash python:tuple ``` -- cgit v1.2.3-70-g09d2 From b45e0f4836d7b2a3b5fe2266d669d878ccd737e7 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 7 Oct 2019 17:08:38 +0200 Subject: dash: simplify completion logic --- plugins/dash/dash.plugin.zsh | 52 ++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 29 deletions(-) (limited to 'plugins') diff --git a/plugins/dash/dash.plugin.zsh b/plugins/dash/dash.plugin.zsh index b00d4877e..ace2e33c1 100644 --- a/plugins/dash/dash.plugin.zsh +++ b/plugins/dash/dash.plugin.zsh @@ -35,36 +35,30 @@ _dash() { if [[ "$locator" == "platform" ]]; then # Since these are the only special cases right now, let's not do the # expensive processing unless we have to - if [[ "$keyword" == "python" || "$keyword" == "java" || \ - "$keyword" == "qt" || "$keyword" == "cocs2d" ]]; then + if [[ "$keyword" = (python|java|qt|cocos2d) ]]; then docsetName=`echo $doc | grep -Eo "docsetName = .*?;" | sed -e "s/docsetName = \(.*\);/\1/" -e "s/[\":]//g"` - if [[ "$keyword" == "python" ]]; then - if [[ "$docsetName" == "Python 2" ]]; then - keyword="python2" - elif [[ "$docsetName" == "Python 3" ]]; then - keyword="python3" - fi - elif [[ "$keyword" == "java" ]]; then - if [[ "$docsetName" == "Java SE7" ]]; then - keyword="java7" - elif [[ "$docsetName" == "Java SE6" ]]; then - keyword="java6" - elif [[ "$docsetName" == "Java SE8" ]]; then - keyword="java8" - fi - elif [[ "$keyword" == "qt" ]]; then - if [[ "$docsetName" == "Qt 5" ]]; then - keyword="qt5" - elif [[ "$docsetName" == "Qt 4" ]]; then - keyword="qt4" - elif [[ "$docsetName" == "Qt" ]]; then - keyword="qt4" - fi - elif [[ "$keyword" == "cocos2d" ]]; then - if [[ "$docsetName" == "Cocos3D" ]]; then - keyword="cocos3d" - fi - fi + case "$keyword" in + python) + case "$docsetName" in + "Python 2") keyword="python2" ;; + "Python 3") keyword="python3" ;; + esac ;; + java) + case "$docsetName" in + "Java SE7") keyword="java7" ;; + "Java SE6") keyword="java6" ;; + "Java SE8") keyword="java8" ;; + esac ;; + qt) + case "$docsetName" in + "Qt 5") keyword="qt5" ;; + "Qt 4"|Qt) keyword="qt4" ;; + esac ;; + cocos2d) + case "$docsetName" in + Cocos3D) keyword="cocos3d" ;; + esac ;; + esac fi fi -- cgit v1.2.3-70-g09d2 From 456814d8a61c644e59fdea8914e8dc7d2ba3dbf4 Mon Sep 17 00:00:00 2001 From: Aditya J Karia Date: Mon, 7 Oct 2019 20:53:00 +0530 Subject: mysql-macports: add README (#8210) --- plugins/mysql-macports/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/mysql-macports/README.md (limited to 'plugins') diff --git a/plugins/mysql-macports/README.md b/plugins/mysql-macports/README.md new file mode 100644 index 000000000..a4224d9c0 --- /dev/null +++ b/plugins/mysql-macports/README.md @@ -0,0 +1,20 @@ +# MySQL-Macports plugin + +This plugin adds aliases for some of the commonly used [MySQL](https://www.mysql.com/) commands when installed using [MacPorts](https://www.macports.org/) on macOS. + +To use it, add `mysql-macports` to the plugins array in your zshrc file: + +```zsh +plugins=(... mysql-macports) +``` + +For instructions on how to install MySQL using MacPorts, read the [MacPorts wiki](https://trac.macports.org/wiki/howto/MySQL/). + +## Aliases + +| Alias | Command | Description | +| ------------ | --------------------------------------------------------- | ------------------------------------------ | +| mysqlstart | `sudo /opt/local/share/mysql5/mysql/mysql.server start` | Start the MySQL server. | +| mysqlstop | `sudo /opt/local/share/mysql5/mysql/mysql.server stop` | Stop the MySQL server. | +| mysqlrestart | `sudo /opt/local/share/mysql5/mysql/mysql.server restart` | Restart the MySQL server. | +| mysqlstatus | `mysqladmin5 -u root -p ping` | Check whether the MySQL server is running. | -- cgit v1.2.3-70-g09d2 From a9d382a297560647be79070349ac34a66101b9c8 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 7 Oct 2019 17:25:44 +0200 Subject: Small changes --- plugins/redis-cli/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/redis-cli/README.md b/plugins/redis-cli/README.md index 64956df13..bb6e94a0f 100644 --- a/plugins/redis-cli/README.md +++ b/plugins/redis-cli/README.md @@ -1,12 +1,13 @@ # Redis-CLI -This plugin adds [redis-cli](https://redis.io/topics/rediscli) completion, based off homebrew completion +This plugin adds [redis-cli](https://redis.io/topics/rediscli) completion, based off of Homebrew completion. To use it, add `redis-cli` to the plugins array in your zshrc file: ```zsh plugins=(... redis-cli) ``` + ## Requirements In order to make this work, you will need to have redis installed. -- cgit v1.2.3-70-g09d2 From 896dd271c8cadce8b8a618225cb4e79b9bca50f7 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 7 Oct 2019 17:40:51 +0200 Subject: Some syntax changes and more function docs --- plugins/perl/README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'plugins') diff --git a/plugins/perl/README.md b/plugins/perl/README.md index f2f4b79ec..dd9b7dc75 100644 --- a/plugins/perl/README.md +++ b/plugins/perl/README.md @@ -10,27 +10,28 @@ plugins=(... perl) ## Aliases -| Aliases | Command | Description | -| :------------ | :-------------- | :----------------------------------- | -| pbi | perlbrew install|Install specific perl version | -| pbl | perlbrew list |List all perl version installed | -| pbo | perlbrew off |Go back to the system perl | -| pbs | perlbrew switch |Turn it back on | -| pbu | perlbrew use |Use specific version of perl | -| pd | perldoc |Show the perl documentation | -| ple | perl -wlne |Use perl like awk/sed | -| latest-perl | curl `...` |Show the latest stable release of Perl| +| Aliases | Command | Description | +| :------------ | :----------------- | :------------------------------------- | +| pbi | `perlbrew install` | Install specific perl version | +| pbl | `perlbrew list` | List all perl version installed | +| pbo | `perlbrew off` | Go back to the system perl | +| pbs | `perlbrew switch` | Turn it back on | +| pbu | `perlbrew use` | Use specific version of perl | +| pd | `perldoc` | Show the perl documentation | +| ple | `perl -wlne` | Use perl like awk/sed | +| latest-perl | `curl ...` | Show the latest stable release of Perl | ## Functions -`newpl` - creates a basic Perl script file and opens it with $EDITOR +* `newpl`: creates a basic Perl script file and opens it with $EDITOR. -`pgs` - Perl Global Substitution (find pattern = 1st arg ; replace pattern = 2nd arg ; filename = 3rd arg) +* `pgs`: Perl Global Substitution: `pgs ` + Looks for `` and replaces it with `` in ``. -`prep` - Perl grep, because 'grep -P' is terrible. Lets you work with pipes or files. (pattern = 1st arg ; filename = 2nd arg) +* `prep`: Perl grep, because 'grep -P' is terrible: `prep []` + Lets you work with pipes or files (if no `` provided, use stdin). ## Requirements In order to make this work, you will need to have perl installed. - More info on the usage and install: https://www.perl.org/get.html -- cgit v1.2.3-70-g09d2 From d5e7040ebdfc9d9525b964c35ef1e704da632be2 Mon Sep 17 00:00:00 2001 From: Joe Rattazzi Date: Mon, 7 Oct 2019 10:53:18 -0500 Subject: pyenv: add README (#8224) --- plugins/pyenv/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/pyenv/README.md (limited to 'plugins') diff --git a/plugins/pyenv/README.md b/plugins/pyenv/README.md new file mode 100644 index 000000000..d063b55b9 --- /dev/null +++ b/plugins/pyenv/README.md @@ -0,0 +1,16 @@ +# pyenv + +This plugin looks for [pyenv](https://github.com/pyenv/pyenv), a Simple Python version +management system, and loads it if it's found. It also loads pyenv-virtualenv, a pyenv +plugin to manage virtualenv, if it's found. + +To use it, add `pyenv` to the plugins array in your zshrc file: + +```zsh +plugins=(... pyenv) +``` + +## Functions + +- `pyenv_prompt_info`: displays the Python version in use by pyenv; or the global Python + version, if pyenv wasn't found. -- cgit v1.2.3-70-g09d2 From 5f066dabc89b66479b36b5837ed11dc3c36a1d55 Mon Sep 17 00:00:00 2001 From: Denis Titusov Date: Mon, 7 Oct 2019 19:01:08 +0300 Subject: Add README for pow and powify plugins (#8225) --- plugins/pow/README.md | 21 +++++++++++++++++++++ plugins/powify/README.md | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 plugins/pow/README.md create mode 100644 plugins/powify/README.md (limited to 'plugins') diff --git a/plugins/pow/README.md b/plugins/pow/README.md new file mode 100644 index 000000000..1f8a9d136 --- /dev/null +++ b/plugins/pow/README.md @@ -0,0 +1,21 @@ +# pow plugin + +This plugin adds completion and commands for [pow](http://pow.cx/), a +zero-configuration Rack server for macOS. + +To use it, add pow to the plugins array of your zshrc file: + +```sh +plugins=(... pow) +``` + +## Commands + +- `kapow` will restart an app. + + ```bash + kapow myapp + ``` + +- `kaput` will show the standard output from any pow app. +- `repow` will restart the pow process. diff --git a/plugins/powify/README.md b/plugins/powify/README.md new file mode 100644 index 000000000..fd58b860e --- /dev/null +++ b/plugins/powify/README.md @@ -0,0 +1,10 @@ +# powify plugin + +This plugin adds autocompletion for [powify](https://github.com/sethvargo/powify), +an easy-to-use wrapper for Basecamp's [pow](https://github.com/basecamp/pow). + +To use it, add powify to the plugins array of your zshrc file: + +```sh +plugins=(... powify) +``` -- cgit v1.2.3-70-g09d2 From 5efe52d991ab1f2596c3aa7766c981412c621fd7 Mon Sep 17 00:00:00 2001 From: Michael C Date: Mon, 7 Oct 2019 18:04:49 +0200 Subject: virtualenvwrapper: add README (#8226) --- plugins/virtualenvwrapper/README.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 plugins/virtualenvwrapper/README.md (limited to 'plugins') diff --git a/plugins/virtualenvwrapper/README.md b/plugins/virtualenvwrapper/README.md new file mode 100644 index 000000000..63eb58541 --- /dev/null +++ b/plugins/virtualenvwrapper/README.md @@ -0,0 +1,38 @@ +# Virtualenvwrapper plugin + +This plugin loads Python's [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) shell tools. + +To use it, add `virtualenvwrapper` to the plugins array in your zshrc file: + +```zsh +plugins=(... virtualenvwrapper) +``` + +## Usage + +The plugin allows to automatically activate virtualenvs on cd into git repositories with a matching name: + +``` +➜ github $ cd ansible +(ansible) ➜ ansible git:(devel) $ cd docs +(ansible) ➜ docs git:(devel) $ cd .. +(ansible) ➜ ansible git:(devel) $ cd .. +➜ github $ +``` + +We can override this by having a `.venv` file in the directory containing a differently named virtualenv: + +``` +➜ github $ cat ansible/.venv +myvirtualenv +➜ github $ cd ansible +(myvirtualenv) ➜ ansible git:(devel) $ cd .. +➜ github $ +``` + +We can disable this behaviour by setting `DISABLE_VENV_CD=1` before Oh My Zsh is sourced: +```zsh +DISABLE_VENV_CD=1 +plugins=(... virtualenvwrapper) +source $ZSH/oh-my-zsh.sh +``` -- cgit v1.2.3-70-g09d2 From a3b63aa6ab948c1be278fbea6046cf09f69d3c42 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 7 Oct 2019 18:08:14 +0200 Subject: Reword --- plugins/ufw/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/ufw/README.md b/plugins/ufw/README.md index a27487a46..ac377cd17 100644 --- a/plugins/ufw/README.md +++ b/plugins/ufw/README.md @@ -1,11 +1,12 @@ -# UFW -This plugin adds support for managing everybody's favorite Uncomplicated Firewall (UFW). Learn more about [`UFW`](https://wiki.ubuntu.com/UncomplicatedFirewall). +# UFW plugin + +This plugin adds completion for managing everybody's favorite Uncomplicated Firewall (UFW), +a simple interface for managing iptables. Learn more about [`UFW`](https://wiki.ubuntu.com/UncomplicatedFirewall). To use it, add ufw to the plugins array of your zshrc file: ``` plugins=(... ufw) ``` -UFW is a simple Ubuntu interface for managing iptables. Some of the commands include: -- cgit v1.2.3-70-g09d2 From fdebc2272e8789e9120ab9b195754e423990b317 Mon Sep 17 00:00:00 2001 From: Griffin J Rademacher Date: Mon, 7 Oct 2019 12:37:42 -0400 Subject: Add READMEs for tugboat and colemak plugins (#8207) --- plugins/colemak/README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ plugins/tugboat/README.md | 12 ++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 plugins/colemak/README.md create mode 100644 plugins/tugboat/README.md (limited to 'plugins') diff --git a/plugins/colemak/README.md b/plugins/colemak/README.md new file mode 100644 index 000000000..4da4bc126 --- /dev/null +++ b/plugins/colemak/README.md @@ -0,0 +1,48 @@ +# Colemak plugin + +This plugin remaps keys in `zsh`'s [`vi`-style navigation mode](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Keymaps) +for a [Colemak](https://colemak.com/) keyboard layout, to match the QWERTY position: + +![Colemak layout on a US keyboard](https://colemak.com/wiki/images/6/6c/Colemak2.png) + +To use it, add it to the plugins array in your `~/.zshrc` file: + +``` +plugins=(... colemak) +``` + +You will also need to enable `vi` mode, so add another line to `~/.zshrc`: +``` +bindkey -v +``` + +Restart your shell and hit the `` key to activate `vicmd` (navigation) mode, +and start navigating `zsh` with your new keybindings! + +## Key bindings for vicmd + +| Old | New | Binding | Description | +|------------|------------|---------------------------|----------------------------------------------------| +| `CTRL`+`j` | `CTRL`+`n` | accept-line | Insert new line | +| `j` | `n` | down-line-or-history | Move one line down or command history forwards | +| `k` | `e` | up-line-or-history | Move one line up or command history backwards | +| `l` | `i` | vi-forward-char | Move one character to the right | +| `n` | `k` | vi-repeat-search | Repeat command search forwards | +| `N` | `K` | vi-rev-repeat-search | Repeat command search backwards | +| `i` | `u` | vi-insert | Enter insert mode | +| `I` | `U` | vi-insert-bol | Move to first non-blank char and enter insert mode | +| `` | `l` | vi-undo-change | Undo change | +| `J` | `N` | vi-join | Join the current line with the next one | +| `e` | `j` | vi-forward-word-end | Move to the end of the next word | +| `E` | `J` | vi-forward-blank-word-end | Move to end of the current or next word | + +## Key bindings for less + +| Keyboard shortcut | `less` key binding | +|-------------------|--------------------| +| `n` | forw-line | +| `e` | back-line | +| `k` | repeat-search | +| `ESC`+`k` | repeat-search-all | +| `K` | reverse-search | +| `ESC`+`K` | reverse-search-all | diff --git a/plugins/tugboat/README.md b/plugins/tugboat/README.md new file mode 100644 index 000000000..14f828f85 --- /dev/null +++ b/plugins/tugboat/README.md @@ -0,0 +1,12 @@ +# Tugboat plugin + +This plugin adds autocompletion for Tugboat, a command line tool for interacting with your +[DigitalOcean droplets](https://www.digitalocean.com/products/droplets/). + +To use it, add it to the plugins array in your `~/.zshrc` file: + +```zsh +plugins=(... tugboat) +``` + +Further documentation for Tugboat can be found in the [Tugboat repository](https://github.com/petems/tugboat). -- cgit v1.2.3-70-g09d2 From 7e842cddc45b8bdebe1b198e83eb96fd07b37787 Mon Sep 17 00:00:00 2001 From: Austin Ratcliff Date: Mon, 7 Oct 2019 11:50:01 -0500 Subject: cloudapp: add README (#8229) --- plugins/cloudapp/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 plugins/cloudapp/README.md (limited to 'plugins') diff --git a/plugins/cloudapp/README.md b/plugins/cloudapp/README.md new file mode 100644 index 000000000..62975a631 --- /dev/null +++ b/plugins/cloudapp/README.md @@ -0,0 +1,24 @@ +# CloudApp plugin + +[CloudApp](https://www.getcloudapp.com) brings screen recording, screenshots, and GIF creation to the cloud, in an easy-to-use enterprise-level app. The CloudApp plugin allows you to upload a file to your CloadApp account from the command line. + +To use it, add `cloudapp` to the plugins array of your `~/.zshrc` file: + +``` +plugins=(... dash) +``` + +## Requirements + +1. [Aaron Russell's `cloudapp_api` gem](https://github.com/aaronrussell/cloudapp_api#installation) + +2. That you set your CloudApp credentials in `~/.cloudapp` as a simple text file like below: + ``` + email + password + ``` + +## Usage + +- `cloudapp `: uploads `` to your CloudApp account, and if you're using + macOS, copies the URL to your clipboard. -- cgit v1.2.3-70-g09d2 From 82bd8828eb243199fccea87f5489a21a5be9c89c Mon Sep 17 00:00:00 2001 From: Chaitanya Raj Date: Tue, 8 Oct 2019 14:01:57 +0530 Subject: Create README.md for compleat plugin --- plugins/compleat/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/compleat/README.md (limited to 'plugins') diff --git a/plugins/compleat/README.md b/plugins/compleat/README.md new file mode 100644 index 000000000..1d7f0492d --- /dev/null +++ b/plugins/compleat/README.md @@ -0,0 +1,9 @@ +# compleat + +This plugin runs [bashcompinit](https://github.com/zsh-users/zsh/blob/master/Completion/bashcompinit) which will allow zsh to read bash completion specifications and functions. + +To use it add compleat to the plugins array in your zshrc file. + + ``` +plugins=(... compleat) +``` \ No newline at end of file -- cgit v1.2.3-70-g09d2 From c714d3fcedd2e729350b5f69f4a9312b9fc68a43 Mon Sep 17 00:00:00 2001 From: Qinfeng Chen Date: Tue, 8 Oct 2019 09:48:08 -0400 Subject: gradle: support gdub completion (#6135) --- plugins/gradle/gradle.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index 8d578e27b..6be583179 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -181,3 +181,4 @@ _gradlew_tasks () { ############################################################################ compdef _gradle_tasks gradle compdef _gradlew_tasks gradlew +compdef _gradlew_tasks gw -- cgit v1.2.3-70-g09d2 From b09aed9cc7e2099f3e7f2aa2632660bc510f3e35 Mon Sep 17 00:00:00 2001 From: 14nrv <34603467+14nrv@users.noreply.github.com> Date: Tue, 8 Oct 2019 20:38:25 +0200 Subject: yarn: add ytc alias for test with coverage (#7664) --- plugins/yarn/README.md | 1 + plugins/yarn/yarn.plugin.zsh | 1 + 2 files changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md index 439a9355f..a94f183e4 100644 --- a/plugins/yarn/README.md +++ b/plugins/yarn/README.md @@ -35,6 +35,7 @@ plugins=(... yarn) | 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` | +| ytc | `yarn test --coverage` | Run the test script defined in `package.json` with coverage | | yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache | | yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade | | yup | `yarn upgrade` | Upgrade packages to their latest version | diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh index 6dc4786de..e7b6ce0d1 100644 --- a/plugins/yarn/yarn.plugin.zsh +++ b/plugins/yarn/yarn.plugin.zsh @@ -20,6 +20,7 @@ alias yrun="yarn run" alias ys="yarn serve" alias yst="yarn start" alias yt="yarn test" +alias ytc="yarn test --coverage" alias yuc="yarn global upgrade && yarn cache clean" alias yui="yarn upgrade-interactive" alias yup="yarn upgrade" -- cgit v1.2.3-70-g09d2 From 7d410549cdeb838c45db4225a3b7d63e7098866d Mon Sep 17 00:00:00 2001 From: Karolis Mazukna Date: Tue, 8 Oct 2019 22:42:18 +0100 Subject: Adds chruby plugib README.md --- plugins/chruby/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/chruby/README.md (limited to 'plugins') diff --git a/plugins/chruby/README.md b/plugins/chruby/README.md new file mode 100644 index 000000000..c5e4b9332 --- /dev/null +++ b/plugins/chruby/README.md @@ -0,0 +1,19 @@ +# chruby plugin + +This plugin loads the [chruby](https://github.com/postmodern/chruby). Supports brew and manual installation of chruby. + +To use it, add `chruby` to the plugins array in your zshrc file: + +```zsh +plugins=(... chruby) +``` + +## Usage + +If you'd prefer to specify an explicit path to load chruby from +you can set variables like so: + +``` +zstyle :omz:plugins:chruby path /local/path/to/chruby.sh +zstyle :omz:plugins:chruby auto /local/path/to/auto.sh +``` -- cgit v1.2.3-70-g09d2 From c9841f43b1a95c6cc5fcca8422b47f8df511ecf6 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 9 Oct 2019 15:11:34 +0200 Subject: yarn: use zsh-completions latest version (87e1313) Closes #7300 Closes #8115 Closes #8118 --- plugins/yarn/_yarn | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/yarn/_yarn b/plugins/yarn/_yarn index 382f58a0a..3689ae960 100644 --- a/plugins/yarn/_yarn +++ b/plugins/yarn/_yarn @@ -71,7 +71,7 @@ _global_commands=( 'bin:Displays the location of the yarn bin folder' 'remove:Remove installed package from dependencies updating package.json' 'upgrade:Upgrades packages to their latest version based on the specified range' - 'upgrade-interactive' + 'upgrade-interactive:Interactively upgrade packages' ) _yarn_commands_scripts() { @@ -81,9 +81,21 @@ _yarn_commands_scripts() { } _yarn_scripts() { - local -a scripts - scripts=($(yarn run --json 2>/dev/null | sed -E '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g' | tr , '\n' | sed -e 's/:/\\:/g')) - _describe 'script' scripts + local -a commands binaries scripts + local -a scriptNames scriptCommands + local i runJSON + + runJSON=$(yarn run --json 2>/dev/null) + binaries=($(sed -E '/Commands available/!d;s/.*Commands available from binary scripts: ([^"]+)".*/\1/;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/:/\\:/g;s/,/\n/g' <<< "$runJSON")) + scriptNames=($(sed -E '/possibleCommands/!d;s/.*"items":\[([^]]+).*/\1/;s/[" ]//g;s/:/\\:/g;s/,/\n/g' <<< "$runJSON")) + scriptCommands=("${(@f)$(sed -E '/possibleCommands/!d;s/.*"hints":\{([^}]+)\}.*/\1/;s/"[^"]+"://g;s/:/\\:/g;s/","/\n/g;s/(^"|"$)//g' <<< "$runJSON")}") + + for (( i=1; i <= $#scriptNames; i++ )); do + scripts+=("${scriptNames[$i]}:${scriptCommands[$i]}") + done + + commands=($scripts $binaries) + _describe 'command' commands } _yarn_global_commands() { @@ -240,7 +252,8 @@ _yarn() { run) _arguments \ - '1: :_yarn_scripts' + '1: :_yarn_scripts' \ + '*:: :_default' ;; tag) @@ -255,6 +268,11 @@ _yarn() { '*:: :->team_args' ;; + upgrade-interactive) + _arguments \ + '--latest:use the version tagged latest in the registry:' + ;; + version) _arguments \ '--new-version:version:' \ @@ -266,6 +284,10 @@ _yarn() { _arguments \ '1:query:_files' ;; + + *) + _default + ;; esac ;; esac -- cgit v1.2.3-70-g09d2 From 79b2944a8ae19fc9d065d3b92c916345feb65fa4 Mon Sep 17 00:00:00 2001 From: Frani Date: Wed, 9 Oct 2019 10:17:05 -0300 Subject: yarn: add yarn version alias (#8138) --- plugins/yarn/README.md | 1 + plugins/yarn/yarn.plugin.zsh | 1 + 2 files changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md index a94f183e4..e6daae44f 100644 --- a/plugins/yarn/README.md +++ b/plugins/yarn/README.md @@ -39,5 +39,6 @@ plugins=(... yarn) | yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache | | yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade | | yup | `yarn upgrade` | Upgrade packages to their latest version | +| yv | `yarn version` | Update the version of your package | | yw | `yarn workspace` | Run a command within a single workspace. | | yws | `yarn workspaces` | Run a command within all defined workspaces. | diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh index e7b6ce0d1..18c5dcc89 100644 --- a/plugins/yarn/yarn.plugin.zsh +++ b/plugins/yarn/yarn.plugin.zsh @@ -24,5 +24,6 @@ alias ytc="yarn test --coverage" alias yuc="yarn global upgrade && yarn cache clean" alias yui="yarn upgrade-interactive" alias yup="yarn upgrade" +alias yv="yarn version" alias yw="yarn workspace" alias yws="yarn workspaces" -- cgit v1.2.3-70-g09d2 From f5614d2b3a844305b363b50e6857ca064fdbbc84 Mon Sep 17 00:00:00 2001 From: otherpaco <27810032+otherpaco@users.noreply.github.com> Date: Wed, 9 Oct 2019 15:55:35 +0200 Subject: terminalapp: delete plugin deprecated since 2015 (#8230) --- plugins/terminalapp/terminalapp.plugin.zsh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 plugins/terminalapp/terminalapp.plugin.zsh (limited to 'plugins') diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh deleted file mode 100644 index 7c0c278b9..000000000 --- a/plugins/terminalapp/terminalapp.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -# This file is intentionally empty. -# -# The terminalapp plugin is deprecated and may be removed in a future release. -# Its functionality has been folded in to the core lib/termsupport.zsh, which -# is loaded for all users. You can remove terminalapp from your $plugins list -# once all your systems are updated to the current version of Oh My Zsh. -- cgit v1.2.3-70-g09d2 From 8bb9b044699f5c96830c7fe2bb78de19854d4973 Mon Sep 17 00:00:00 2001 From: otherpaco <27810032+otherpaco@users.noreply.github.com> Date: Wed, 9 Oct 2019 16:58:58 +0200 Subject: singlechar: add README (#8232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/singlechar/README.md | 118 +++++++++++++++++++++++++++++++ plugins/singlechar/singlechar.plugin.zsh | 12 +--- 2 files changed, 119 insertions(+), 11 deletions(-) create mode 100644 plugins/singlechar/README.md (limited to 'plugins') diff --git a/plugins/singlechar/README.md b/plugins/singlechar/README.md new file mode 100644 index 000000000..d89029900 --- /dev/null +++ b/plugins/singlechar/README.md @@ -0,0 +1,118 @@ +# Singlechar plugin + +This plugin adds single char shortcuts (and combinations) for some commands. + +To use it, add `singlechar` to the plugins array of your zshrc file: +``` +plugins=(... singlechar) +``` + +## Aliases + +### CAT, GREP, CURL, WGET + +| Alias | Command | Description | +|-------|------------------|-------------| +| y | `grep -Ri` | Find case-insensitive string in all files and directories, recursively. Follows symlinks. | +| n | `grep -Rvi` | Same as above but only show lines that don't match the string. | +| f | `grep -Rli` | Same as 'y' but only print the filenames where the string is found. | +| fn | `grep -Rlvi` | Same as above but only show files that don't contain the string. | +| f. | `find . \| grep` | Grep list of files in current directory | +| f: | `find` | 'find' command | +| p | `less` | 'less' command | +| m | `man` | 'man' command | +| d | `wget` | 'wget' command | +| u | `curl` | 'curl' command | +| c | `cat` | 'cat' command | +| w | `echo >` | Write arguments to file, overwriting it if it exists. | +| a | `echo >>` | Write arguments to file, appending them if the file exists. | +| w: | `cat >` | Write stdin to file, overwriting if it exists. | +| a: | `cat >>` | Write stdin to file, appending it if the file exists. | + +### XARGS + +These aliases are versions of the aliases above but using xargs. This can be used +by piping the arguments to the xargs aliases. + +| Alias | Command | Description | +|-------|----------------------|---------------------------------| +| x | `xargs` | 'xargs' command | +| xy | `xargs grep -Ri` | Same as 'y' alias using xargs. | +| xn | `xargs grep -Rvi` | Same as 'n' alias using xargs. | +| xf | `xargs grep -Rli` | Same as 'f' alias using xargs. | +| xfn | `xargs grep -Rlvi` | Same as 'fn' alias using xargs. | +| xf. | `xargs find \| grep` | Same as 'f.' alias using xargs. | +| xf: | `xargs find` | Same as 'f:' alias using xargs. | +| xc | `xargs cat` | Same as 'c' alias using xargs. | +| xp | `xargs less` | Same as 'p' alias using xargs. | +| xm | `xargs man` | Same as 'm' alias using xargs. | +| xd | `xargs wget` | Same as 'd' alias using xargs. | +| xu | `xargs curl` | Same as 'u' alias using xargs. | +| xw | `xargs echo >` | Same as 'w' alias using xargs. | +| xa | `xargs echo >>` | Same as 'a' alias using xargs. | +| xw: | `xargs cat >` | Same as 'w:' alias using xargs. | +| xa: | `xargs >>` | Same as 'a:' alias using xargs. | + +### SUDO + +These aliases are versions of the aliases above in [CAT, GREP, CURL, WGET](#cat-grep-curl-wget) +but using sudo to run them with root permission. + +| Alias | Command | Description | +|-------|-----------------------|--------------------------------| +| s | `sudo` | 'sudo' command | +| sy | `sudo grep -Ri` | Same as 'y' alias using sudo. | +| sn | `sudo grep -Riv` | Same as 'n' alias using sudo. | +| sf | `sudo grep -Rli` | Same as 'f' alias using sudo. | +| sfn | `sudo grep -Rlvi` | Same as 'fn' alias using sudo. | +| sf. | `sudo find . \| grep` | Same as 'f.' alias using sudo. | +| sf: | `sudo find` | Same as 'f:' alias using sudo. | +| sp | `sudo less` | Same as 'p' alias using sudo. | +| sm | `sudo man` | Same as 'm' alias using sudo. | +| sd | `sudo wget` | Same as 'd' alias using sudo. | +| sc | `sudo cat` | Same as 'c' alias using sudo. | +| sw | `sudo echo >` | Same as 'w' alias using sudo. | +| sa | `sudo echo >>` | Same as 'a' alias using sudo. | +| sw: | `sudo cat >` | Same as 'w:' alias using sudo. | +| sa: | `sudo cat >>` | Same as 'a:' alias using sudo. | + +### SUDO-XARGS + +Same as above but using both sudo and xargs. + +| Alias | Command | Description | +|-------|---------------------------|---------------------------------| +| sx | `sudo xargs` | 'sudo xargs' command | +| sxy | `sudo xargs grep -Ri` | Same as 'xy' alias using sudo. | +| sxn | `sudo xargs grep -Riv` | Same as 'xn' alias using sudo. | +| sxf | `sudo xargs grep -li` | Same as 'xf' alias using sudo. | +| sxfn | `sudo xargs grep -lvi` | Same as 'xfn' alias using sudo. | +| sxf. | `sudo xargs find \| grep` | Same as 'xf.' alias using sudo. | +| sxf: | `sudo xargs find` | Same as 'xf:' alias using sudo. | +| sxp | `sudo xargs less` | Same as 'xp' alias using sudo. | +| sxm | `sudo xargs man` | Same as 'xm' alias using sudo. | +| sxd | `sudo xargs wget` | Same as 'xd' alias using sudo. | +| sxu | `sudo xargs curl` | Same as 'xu' alias using sudo. | +| sxc | `sudo xargs cat` | Same as 'xc' alias using sudo. | +| sxw | `sudo xargs echo >` | Same as 'xw' alias using sudo. | +| sxa | `sudo xargs echo >>` | Same as 'xa' alias using sudo. | +| sxw: | `sudo xargs cat >` | Same as 'xw:' alias using sudo. | +| sxa: | `sudo xargs cat >>` | Same as 'xa:' alias using sudo. | + +## Options + +The commands `grep`, `sudo`, `wget`, `curl`, and `less` can be configured to use other commands +via the setup variables below, before Oh My Zsh is sourced. If they are not set yet, they will +use their default values: + +| Setup variable | Default value | +|----------------|---------------| +| GREP | `grep` | +| ROOT | `sudo` | +| WGET | `wget` | +| CURL | `curl` | +| PAGER | `less` | + +## Author + +- [Karolin Varner](https://github.com/koraa) diff --git a/plugins/singlechar/singlechar.plugin.zsh b/plugins/singlechar/singlechar.plugin.zsh index 44bd998aa..d4b0b6735 100644 --- a/plugins/singlechar/singlechar.plugin.zsh +++ b/plugins/singlechar/singlechar.plugin.zsh @@ -1,13 +1,3 @@ -################################################################################ -# FILE: singlechar.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Michael Varner (musikmichael@web.de) -# VERSION: 1.0.0 -# -# This plugin adds single char shortcuts (and combinations) for some commands. -# -################################################################################ - ########################### # Settings @@ -130,4 +120,4 @@ alias sxd='"$ROOT" xargs "$WGET"' alias sxu='"$ROOT" xargs "$CURL"' alias sxw:='"$ROOT" xargs cat >' -alias sxa:='"$ROOT" xargs cat >>' \ No newline at end of file +alias sxa:='"$ROOT" xargs cat >>' -- cgit v1.2.3-70-g09d2 From abc05fa422a183e974df9faefc61a8512abe1db9 Mon Sep 17 00:00:00 2001 From: Noah Nichols Date: Wed, 9 Oct 2019 11:51:47 -0400 Subject: sprunge: add README and refactor (#8239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/sprunge/README.md | 31 ++++++++++++++ plugins/sprunge/sprunge.plugin.zsh | 86 ++++++++++++++++++-------------------- 2 files changed, 71 insertions(+), 46 deletions(-) create mode 100644 plugins/sprunge/README.md (limited to 'plugins') diff --git a/plugins/sprunge/README.md b/plugins/sprunge/README.md new file mode 100644 index 000000000..2a363d3bd --- /dev/null +++ b/plugins/sprunge/README.md @@ -0,0 +1,31 @@ +# Sprunge plugin + +This plugin uploads data and fetch URL from the pastebin http://sprunge.us + +To enable it, add 'sprunge' to your plugins: +``` +plugins=(... sprunge) +``` + +## Usage + +| Command | Description | +|------------------------------|-------------------------------------------| +| `sprunge filename.txt` | Uploads filename.txt | +| `sprunge "this is a string"` | Uploads plain text | +| `sprunge < filename.txt` | Redirects filename.txt content to sprunge | +| `echo data \| sprunge` | Any piped data will be uploaded | + +Once sprunge has processed the input it will give you a unique HTTP address: +``` +$ sprunge "hello" +http://sprunge.us/XxjnKz +``` + +## Notes + +- Sprunge accepts piped data, stdin redirection, text strings as input or filenames. + Only one of these can be used at a time. +- Argument precedence goes as follows: stdin > piped input > text strings. +- If a filename is mispelled or doesn't have the necessary path description, it will NOT + generate an error, but instead treat it as a text string. diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index e1c89b729..5d5687a82 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -2,12 +2,9 @@ # Created by the blogger at the URL below...I don't know where to find his/her name # Original found at https://www.shellperson.net/sprunge-pastebin-script/ -usage() { -description | fmt -s >&2 -} - -description() { -cat << HERE +sprunge() { + if [[ "$1" = --help ]]; then + fmt -s >&2 << EOF DESCRIPTION Upload data and fetch URL from the pastebin http://sprunge.us @@ -19,44 +16,41 @@ USAGE piped_data | $0 NOTES --------------------------------------------------------------------------- -* INPUT METHODS * -$0 can accept piped data, STDIN redirection [&2 - if [ "$*" ]; then - echo Arguments present... >&2 - if [ -f "$*" ]; then - echo Uploading the contents of "$*"... >&2 - cat "$*" - else - echo Uploading the text: \""$*"\"... >&2 - echo "$*" - fi | curl -F 'sprunge=<-' http://sprunge.us - else - echo No arguments found, printing USAGE and exiting. >&2 - usage - fi - else - echo Using input from a pipe or STDIN redirection... >&2 - curl -F 'sprunge=<-' http://sprunge.us - fi + Input Methods: + $0 can accept piped data, STDIN redirection [< filename.txt], text strings following the command as arguments, or filenames as arguments. Only one of these methods can be used at a time, so please see the note on precedence. Also, note that using a pipe or STDIN redirection will treat tabs as spaces, or disregard them entirely (if they appear at the beginning of a line). So I suggest using a filename as an argument if tabs are important either to the function or readability of the code. + + Precedence: + STDIN redirection has precedence, then piped input, then a filename as an argument, and finally text strings as arguments. For example: + + echo piped | $0 arguments.txt < stdin_redirection.txt + + In this example, the contents of file_as_stdin_redirection.txt would be uploaded. Both the piped_text and the file_as_argument.txt are ignored. If there is piped input and arguments, the arguments will be ignored, and the piped input uploaded. + + Filenames: + If a filename is misspelled or doesn't have the necessary path description, it will NOT generate an error, but will instead treat it as a text string and upload it. + +EOF + return + fi + + if [ -t 0 ]; then + echo Running interactively, checking for arguments... >&2 + if [ "$*" ]; then + echo Arguments present... >&2 + if [ -f "$*" ]; then + echo Uploading the contents of "$*"... >&2 + cat "$*" + else + echo Uploading the text: \""$*"\"... >&2 + echo "$*" + fi | curl -F 'sprunge=<-' http://sprunge.us + else + echo No arguments found, printing USAGE and exiting. >&2 + sprunge --help + return 1 + fi + else + echo Using input from a pipe or STDIN redirection... >&2 + curl -F 'sprunge=<-' http://sprunge.us + fi } -- cgit v1.2.3-70-g09d2 From 7ea05bd5003a1b7bd69b69fbcf3bfe3de4fcfe7e Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 9 Oct 2019 18:07:02 +0200 Subject: Change description --- plugins/compleat/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/compleat/README.md b/plugins/compleat/README.md index 1d7f0492d..630c91503 100644 --- a/plugins/compleat/README.md +++ b/plugins/compleat/README.md @@ -1,9 +1,8 @@ -# compleat +# compleat plugin -This plugin runs [bashcompinit](https://github.com/zsh-users/zsh/blob/master/Completion/bashcompinit) which will allow zsh to read bash completion specifications and functions. +This plugin looks for [compleat](https://github.com/mbrubeck/compleat) and loads its completion. -To use it add compleat to the plugins array in your zshrc file. - - ``` +To use it, add compleat to the plugins array in your zshrc file: +``` plugins=(... compleat) -``` \ No newline at end of file +``` -- cgit v1.2.3-70-g09d2 From 11e23477527a0314ffbed74a3d061ae76034da15 Mon Sep 17 00:00:00 2001 From: Martin Mladenov <30376060+martinmladenov@users.noreply.github.com> Date: Wed, 9 Oct 2019 19:09:29 +0300 Subject: git-escape-magic: fix typos in README (#8234) --- plugins/git-escape-magic/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/git-escape-magic/README.md b/plugins/git-escape-magic/README.md index c3e3898f5..7fefed39d 100644 --- a/plugins/git-escape-magic/README.md +++ b/plugins/git-escape-magic/README.md @@ -4,13 +4,13 @@ This plugin is copied from the original at https://github.com/knu/zsh-git-escape-magic. All credit for the functionality enabled by this plugin should go to @knu. -An excerpt from that project's readme explains it's purpose. +An excerpt from that project's readme explains its purpose. > It eliminates the need for manually escaping those meta-characters. The zle function it provides is context aware and recognizes the characteristics of each subcommand of git. Every time you type one of these meta-characters on a git command line, it automatically escapes the meta-character with a backslash as necessary and as appropriate. ## Usage -To use this plugin add it to your list of plugins in your `.zshrc` file. +To use this plugin, add it to your list of plugins in your `.zshrc` file. -**NOTE**: If you use url-quote-magic it must be included before this +**NOTE**: If you use url-quote-magic, it must be included before this plugin runs to prevent any conflicts. -- cgit v1.2.3-70-g09d2 From 98cd133c4d15c1a147679cc00c0bd924fd91f11c Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 9 Oct 2019 18:12:58 +0200 Subject: Reword and add extra information --- plugins/chruby/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/chruby/README.md b/plugins/chruby/README.md index c5e4b9332..d373006a5 100644 --- a/plugins/chruby/README.md +++ b/plugins/chruby/README.md @@ -1,9 +1,10 @@ # chruby plugin -This plugin loads the [chruby](https://github.com/postmodern/chruby). Supports brew and manual installation of chruby. +This plugin loads [chruby](https://github.com/postmodern/chruby), a tool that changes the +current Ruby version, and completion and a prompt function to display the Ruby version. +Supports brew and manual installation of chruby. To use it, add `chruby` to the plugins array in your zshrc file: - ```zsh plugins=(... chruby) ``` -- cgit v1.2.3-70-g09d2 From c5b4613bf6e1256e56b5451bccce5972a255a58b Mon Sep 17 00:00:00 2001 From: Maciej Motyka <39633561+maciejmotyka@users.noreply.github.com> Date: Wed, 9 Oct 2019 19:13:25 +0200 Subject: python: add recurse flag to pygrep (#8217) As described in #7053 --- plugins/python/python.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh index f754ea261..950b0e01a 100644 --- a/plugins/python/python.plugin.zsh +++ b/plugins/python/python.plugin.zsh @@ -11,5 +11,5 @@ function pyclean() { } # Grep among .py files -alias pygrep='grep --include="*.py"' +alias pygrep='grep -r --include="*.py"' -- cgit v1.2.3-70-g09d2 From 49c423c7e0a6d5193b77e60107e7c329da28d987 Mon Sep 17 00:00:00 2001 From: 927589452 <927589452@users.noreply.github.com> Date: Wed, 9 Oct 2019 19:24:44 +0200 Subject: battery: add support for sysctl in FreeBSD (#8155) --- plugins/battery/battery.plugin.zsh | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'plugins') diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 8f398cfb3..6b6684716 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -7,6 +7,9 @@ # Email: neuralsandwich@gmail.com # # Modified to add support for Apple Mac # ########################################### +# Author: J (927589452) # +# Modified to add support for FreeBSD # +########################################### if [[ "$OSTYPE" = darwin* ]] ; then @@ -64,6 +67,52 @@ if [[ "$OSTYPE" = darwin* ]] ; then [[ $(ioreg -rc "AppleSmartBattery"| grep '^.*"IsCharging"\ =\ ' | sed -e 's/^.*"IsCharging"\ =\ //') == "Yes" ]] } +elif [[ "$OSTYPE" = freebsd* ]] ; then + + function battery_is_charging() { + [[ $(sysctl -n hw.acpi.battery.state) -eq 2 ]] + } + + function battery_pct() { + if (( $+commands[sysctl] )) ; then + echo "$(sysctl -n hw.acpi.battery.life)" + fi + } + + function battery_pct_remaining() { + if [ ! $(battery_is_charging) ] ; then + battery_pct + else + echo "External Power" + fi + } + + function battery_time_remaining() { + remaining_time=$(sysctl -n hw.acpi.battery.time) + if [[ $remaining_time -ge 0 ]] ; then + # calculation from https://www.unix.com/shell-programming-and-scripting/23695-convert-minutes-hours-minutes-seconds.html + ((hour=$remaining_time/60)) + ((minute=$remaining_time-$hour*60)) + echo $hour:$minute + fi + } + + function battery_pct_prompt() { + b=$(battery_pct_remaining) + if [ ! $(battery_is_charging) ] ; then + if [ $b -gt 50 ] ; then + color='green' + elif [ $b -gt 20 ] ; then + color='yellow' + else + color='red' + fi + echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}" + else + echo "∞" + fi + } + elif [[ "$OSTYPE" = linux* ]] ; then function battery_is_charging() { -- cgit v1.2.3-70-g09d2 From a2cc84dd20d13f60bab51438ebbf4ea220a255ee Mon Sep 17 00:00:00 2001 From: Kirill <30822663+KirillDemtchenko@users.noreply.github.com> Date: Wed, 9 Oct 2019 21:55:16 +0300 Subject: fbterm: add README (#8241) --- plugins/fbterm/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/fbterm/README.md (limited to 'plugins') diff --git a/plugins/fbterm/README.md b/plugins/fbterm/README.md new file mode 100644 index 000000000..eec33d7ee --- /dev/null +++ b/plugins/fbterm/README.md @@ -0,0 +1,9 @@ +# fbterm + +This plugin automatically starts [fbterm](https://github.com/zhangyuanwei/fbterm) +if on a real TTY (`/dev/tty*`). + +To use it, add fbterm to the plugins array of your zshrc file: +``` +plugins=(... fbterm) +``` -- cgit v1.2.3-70-g09d2 From 710a3d5a1e2888a4dfb1769f8f1edd8a590eee22 Mon Sep 17 00:00:00 2001 From: Kirill <30822663+KirillDemtchenko@users.noreply.github.com> Date: Wed, 9 Oct 2019 22:04:49 +0300 Subject: emotty: add README (#8240) --- plugins/emotty/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 plugins/emotty/README.md (limited to 'plugins') diff --git a/plugins/emotty/README.md b/plugins/emotty/README.md new file mode 100644 index 000000000..2cfbe120c --- /dev/null +++ b/plugins/emotty/README.md @@ -0,0 +1,39 @@ +# emotty plugin + +This plugin returns an emoji for the current $TTY number so it can be used +in a prompt. + +To use it, add emotty to the plugins array in your zshrc file: +``` +plugins=(... emotty) +``` + +**NOTE:** it requires the [emoji plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/emoji). + +## Usage + +The function `emotty` displays an emoji from the current character set (default: `emoji`), based +on the number associated to the `$TTY`. + +There are different sets of emoji characters available, to choose a different +set, set `$emotty_set` to the name of the set you would like to use, e.g.: +``` +emotty_set=nature +``` + +### Character Sets + +- emoji +- loral +- love +- nature +- stellar +- zodiac + +Use the `display_emotty` function to list the emojis in the current character set, or +the character set passed as the first argument. For example: + +``` +$ display_emotty zodiac + +``` -- cgit v1.2.3-70-g09d2