From 6fecbf6ad5fc6e78dcfd89227cf8b12305b1f8bc Mon Sep 17 00:00:00 2001 From: Ben Wilcock Date: Tue, 9 Oct 2018 20:20:55 +0100 Subject: Add cloudfoundry plugin (#7047) --- plugins/cloudfoundry/README.md | 58 ++++++++++++++++++++++++++++ plugins/cloudfoundry/cloudfoundry.plugin.zsh | 34 ++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 plugins/cloudfoundry/README.md create mode 100644 plugins/cloudfoundry/cloudfoundry.plugin.zsh (limited to 'plugins') diff --git a/plugins/cloudfoundry/README.md b/plugins/cloudfoundry/README.md new file mode 100644 index 000000000..89dd9d1ce --- /dev/null +++ b/plugins/cloudfoundry/README.md @@ -0,0 +1,58 @@ +# Cloudfoundry Plugin + +This plugin is intended to offer a few simple aliases for regular users of the [Cloud Foundry Cli][1]. Most are just simple aliases that will save a bit of typing. Others include mini functions and or accept parameters. Take a look at the table below for details. + +| Alias | Command | Description | +|----------|-----------------------------|--------------------------------------------------------------------------| +| cfl | `cf login` | Login to Cloud Foundry | +| cft | `cf target` | Target the cli at a specific Org/Space in Cloud Foundry | +| cfa | `cf apps` | List all applications in the current Org/Space | +| cfs | `cf services` | List all services in the current Org/Space | +| cfm | `cf marketplace` | List the services available in the Marketplace | +| cfp | `cf push` | Push your application code to Cloud Foundry | +| cfcs | `cf create-service` | Create a service based on a Marketplace offering | +| cfbs | `cf bind-service` | Bind an application to a service you created | +| cfus | `cf unbind-service` | Unbind a service from an application | +| cfds | `cf delete-service` | Delete a service you no longer have bound | +| cfup | `cf cups` | Create a "user-provided-service" | +| cflg | `cf logs` | Tail the logs of an application (requires ) | +| cfr | `cf routes` | List all the routes in the current Space | +| cfe | `cf env` | Show the environment variables for an application (requires ) | +| cfsh | `cf ssh` | Attach to a running container (requires an etc.) | +| cfsc | `cf scale` | Scale an application (requires an etc.) | +| cfev | `cf events` | Show the application events (requires ) | +| cfdor | `cf delete-orphaned-routes` | Delete routes that are no longer bound to applications | +| cfbpk | `cf buildpacks` | List the available buildpacks | +| cfdm | `cf domains` | List the domains associates with this Cloud Foundry foundation | +| cfsp | `cf spaces` | List all the Spaces in the current Org | +| cfap | `cf app` | Show the details of a deployed application (requires ) | +| cfh. | `export CF_HOME=$PWD/.cf` | Set the current directory as CF_HOME | +| cfh~ | `export CF_HOME=~/.cf` | Set the user's root directory as CF_HOME | +| cfhu | `unset CF_HOME` | Unsets CF_HOME | +| cfpm | `cf push -f` | Push an application using a manifest (requires location) | +| cflr | `cf logs --recent` | Show the recent logs (requires ) | +| cfsrt | `cf start` | Start an application (requires ) | +| cfstp | `cf stop` | Stop an application (requires ) | +| cfstg | `cf restage` | Restage an application (requires ) | +| cfdel | `cf delete` | Delete an application (requires ) | +| cfsrtall | - | Start all apps that are currently in the "Stopped" state | +| cfstpall | - | Stop all apps that are currently in the "Started" state | + +For help and advice on what any of the commands does, consult the built in `cf` help functions as follows:- + +```bash +cf help # List the most popular and commonly used commands +cf help -a # Complete list of all possible commands +cf --help # Help on a specific command including arguments and examples +``` + +Alternatively, seek out the [online documentation][3]. And don't forget, there are loads of great [community plugins for the cf-cli][4] command line tool that can greatly extend its power and usefulness. + +## Contributors + +Contributed to `oh_my_zsh` by [benwilcock][2]. + +[1]: https://docs.cloudfoundry.org/cf-cli/install-go-cli.html +[2]: https://github.com/benwilcock +[3]: https://docs.cloudfoundry.org/cf-cli/getting-started.html +[4]: https://plugins.cloudfoundry.org/ diff --git a/plugins/cloudfoundry/cloudfoundry.plugin.zsh b/plugins/cloudfoundry/cloudfoundry.plugin.zsh new file mode 100644 index 000000000..b6715787e --- /dev/null +++ b/plugins/cloudfoundry/cloudfoundry.plugin.zsh @@ -0,0 +1,34 @@ +# Some Useful CloudFoundry Aliases & Functions +alias cfl="cf login" +alias cft="cf target" +alias cfa="cf apps" +alias cfs="cf services" +alias cfm="cf marketplace" +alias cfp="cf push" +alias cfcs="cf create-service" +alias cfbs="cf bind-service" +alias cfus="cf unbind-service" +alias cfds="cf delete-service" +alias cfup="cf cups" +alias cflg="cf logs" +alias cfr="cf routes" +alias cfe="cf env" +alias cfsh="cf ssh" +alias cfsc="cf scale" +alias cfev="cf events" +alias cfdor="cf delete-orphaned-routes" +alias cfbpk="cf buildpacks" +alias cfdm="cf domains" +alias cfsp="cf spaces" +function cfap() { cf app $1 } +function cfh.() { export CF_HOME=$PWD/.cf } +function cfh~() { export CF_HOME=~/.cf } +function cfhu() { unset CF_HOME } +function cfpm() { cf push -f $1 } +function cflr() { cf logs $1 --recent } +function cfsrt() { cf start $1 } +function cfstp() { cf stop $1 } +function cfstg() { cf restage $1 } +function cfdel() { cf delete $1 } +function cfsrtall() {cf apps | awk '/stopped/ { system("cf start " $1)}'} +function cfstpall() {cf apps | awk '/started/ { system("cf stop " $1)}'} -- cgit v1.2.3-70-g09d2 From dd3c95c61595ba28e88971ec6480145877e979ca Mon Sep 17 00:00:00 2001 From: Brian Mitchell Date: Wed, 10 Oct 2018 23:04:01 -0500 Subject: Add README for textmate plugin --- plugins/textmate/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/textmate/README.md (limited to 'plugins') diff --git a/plugins/textmate/README.md b/plugins/textmate/README.md new file mode 100644 index 000000000..8f86d35af --- /dev/null +++ b/plugins/textmate/README.md @@ -0,0 +1,16 @@ +# TextMate plugin + +The plugin adds aliases for the [TextMate](https://macromates.com) editor. + +To use it, add `textmate` to the plugins array of your zshrc file: +``` +plugins=(... textmate) +``` + +## Aliases + +| Alias | Command | Description | +|-----------------|-------------|---------------| +| tm | `mate .` | Open TextMate in the current directory. | +| tm \ | `mate ` `cd ` | Open TextMate in the given directory and cd to it. | +| tm <*> | `mate "$@"` | Pass all arguments to `mate`. This allows for easy opening of multiple files. | -- cgit v1.2.3-70-g09d2 From 530759d5a07a73b627aa30d2322b4a2701855bf3 Mon Sep 17 00:00:00 2001 From: Jeffrey Chandler <36927673+jeff-chandler@users.noreply.github.com> Date: Fri, 12 Oct 2018 15:43:55 -0400 Subject: Added a README file for the man plugin --- plugins/man/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/man/README.md (limited to 'plugins') diff --git a/plugins/man/README.md b/plugins/man/README.md new file mode 100644 index 000000000..0fd3fead2 --- /dev/null +++ b/plugins/man/README.md @@ -0,0 +1,13 @@ +# Man plugin + +This plugin adds a shortcut to insert man before the previous command. + +To use it, add `man` to the plugins array in your zshrc file: + +```zsh +plugins=(... man) +``` +# Keyboard Shortcuts +| Shortcut | Description | +|-----------------------------------|------------------------------------------------------------------------| +| esc + man | add man before the previous command to see the manual for this command | -- cgit v1.2.3-70-g09d2 From b2f51a1a0a6dd2cb2baeb3e1131b5d41ee03a66d Mon Sep 17 00:00:00 2001 From: Jeffrey Chandler <36927673+jeff-chandler@users.noreply.github.com> Date: Fri, 12 Oct 2018 15:48:08 -0400 Subject: command-not-found: add README (#7272) --- plugins/command-not-found/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/command-not-found/README.md (limited to 'plugins') diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md new file mode 100644 index 000000000..df62d1f07 --- /dev/null +++ b/plugins/command-not-found/README.md @@ -0,0 +1,31 @@ +# command-not-found plugin + +This plugin uses the command-not-found package for zsh to provide suggested packages to be installed if a command cannot be found. + +To use it, add `command-not-found` to the plugins array of your zshrc file: + +```zsh +plugins=(... command-not-found) +``` + +An example of how this plugin works in Ubuntu: +``` +$ mutt +The program 'mutt' can be found in the following packages: + * mutt + * mutt-kz + * mutt-patched +Try: sudo apt install +``` + +### Supported platforms + +It works out of the box with the command-not-found packages for: + +- [Ubuntu](https://www.porcheron.info/command-not-found-for-zsh/) +- [Debian](https://packages.debian.org/search?keywords=command-not-found) +- [Arch Linux](https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found) +- [macOS (Homebrew)](https://github.com/Homebrew/homebrew-command-not-found) +- [Fedora](https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound) + +You can add support for other platforms by submitting a Pull Request. -- cgit v1.2.3-70-g09d2 From 96f4a938383e558e8f800ccc052a80c6f743555d Mon Sep 17 00:00:00 2001 From: Sagar Patil Date: Sat, 13 Oct 2018 01:24:26 +0530 Subject: virtualenv: add README (#7273) --- plugins/virtualenv/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/virtualenv/README.md (limited to 'plugins') diff --git a/plugins/virtualenv/README.md b/plugins/virtualenv/README.md new file mode 100644 index 000000000..e0b8c2c82 --- /dev/null +++ b/plugins/virtualenv/README.md @@ -0,0 +1,15 @@ +# virtualenv + +The plugin displays information of the created virtual container and allows background theming. + +To use it, add `virtualenv` to the plugins array of your zshrc file: +``` +plugins=(... virtualenv) +``` + +The plugin creates a `virtualenv_prompt_info` function that you can use in your theme, which displays +the basename of the current `$VIRTUAL_ENV`. It uses two variables to control how that is shown: + +- `ZSH_THEME_VIRTUALENV_PREFIX`: sets the prefix of the VIRTUAL_ENV. Defaults to `[`. + +- `ZSH_THEME_VIRTUALENV_SUFFIX`: sets the suffix of the VIRTUAL_ENV. Defaults to `]`. -- cgit v1.2.3-70-g09d2 From 4a5fa087b89c5f26d93c610147db478b78efae4d Mon Sep 17 00:00:00 2001 From: Jeffrey Chandler <36927673+jeff-chandler@users.noreply.github.com> Date: Fri, 12 Oct 2018 15:54:31 -0400 Subject: Updated keybinding syntax --- plugins/man/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/man/README.md b/plugins/man/README.md index 0fd3fead2..4601252c0 100644 --- a/plugins/man/README.md +++ b/plugins/man/README.md @@ -10,4 +10,4 @@ plugins=(... man) # Keyboard Shortcuts | Shortcut | Description | |-----------------------------------|------------------------------------------------------------------------| -| esc + man | add man before the previous command to see the manual for this command | +| Esc + man | add man before the previous command to see the manual for this command | -- cgit v1.2.3-70-g09d2 From 5df484d5054d282ba2aedff1785ad92eb7106bac Mon Sep 17 00:00:00 2001 From: Brian Mitchell Date: Fri, 12 Oct 2018 19:08:18 -0500 Subject: Format as a list vs a table --- plugins/textmate/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/textmate/README.md b/plugins/textmate/README.md index 8f86d35af..9fd342135 100644 --- a/plugins/textmate/README.md +++ b/plugins/textmate/README.md @@ -1,16 +1,16 @@ # TextMate plugin -The plugin adds aliases for the [TextMate](https://macromates.com) editor. +The plugin adds a function for the [TextMate](https://macromates.com) editor. To use it, add `textmate` to the plugins array of your zshrc file: ``` plugins=(... textmate) ``` -## Aliases +## Function -| Alias | Command | Description | -|-----------------|-------------|---------------| -| tm | `mate .` | Open TextMate in the current directory. | -| tm \ | `mate ` `cd ` | Open TextMate in the given directory and cd to it. | -| tm <*> | `mate "$@"` | Pass all arguments to `mate`. This allows for easy opening of multiple files. | +The `tm` function provides the following options: + +- No arguments: Run `mate` in the current directory. +- Argument that is a directory: Run `mate` in the given directory and cd to it. +- Other arguments: Pass all arguments to `mate`. This allows for easy opening of multiple files. -- cgit v1.2.3-70-g09d2 From 8db85db3cf5741fed1f03be8e7a0d5e044c175e8 Mon Sep 17 00:00:00 2001 From: Atcha Prachayapron <40570367+atchapcyp@users.noreply.github.com> Date: Sat, 13 Oct 2018 23:51:19 +0700 Subject: kitchen: add README (#7275) --- plugins/kitchen/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/kitchen/README.md (limited to 'plugins') diff --git a/plugins/kitchen/README.md b/plugins/kitchen/README.md new file mode 100644 index 000000000..89a6d7002 --- /dev/null +++ b/plugins/kitchen/README.md @@ -0,0 +1,9 @@ +# kitchen plugin + +This plugin adds completion support for the [Test Kitchen](https://kitchen.ci). + +To use it, add `kitchen` to the plugins array in your zshrc file: + +```zsh +plugins=(... kitchen) +``` -- cgit v1.2.3-70-g09d2 From 010ecf4f931b9c8c7b3ea5b27d1b51bf7f00f30a Mon Sep 17 00:00:00 2001 From: Jeffrey Chandler <36927673+jeff-chandler@users.noreply.github.com> Date: Sun, 14 Oct 2018 12:39:14 -0400 Subject: Added README file to the dirpersist plugin (#7274) * Added README file to the dirpersist plugin added additional details on how the plugin works. --- plugins/dirpersist/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/dirpersist/README.md (limited to 'plugins') diff --git a/plugins/dirpersist/README.md b/plugins/dirpersist/README.md new file mode 100644 index 000000000..9880bc563 --- /dev/null +++ b/plugins/dirpersist/README.md @@ -0,0 +1,9 @@ +# Dirpersist plugin + +This plugin keeps a running tally of the previous 20 unique directories in the $HOME/.zdirs file. When you cd to a new directory, it is prepended to the beginning of the file. + +To use it, add `dirpersist` to the plugins array in your zshrc file: + +```zsh +plugins=(... dirpersist) +``` -- cgit v1.2.3-70-g09d2 From bbe4d89c258bab32977acd19c2c55de952184649 Mon Sep 17 00:00:00 2001 From: Jeffrey Chandler <36927673+jeff-chandler@users.noreply.github.com> Date: Sun, 14 Oct 2018 12:40:29 -0400 Subject: Added a README file for the systemadmin plugin (#7279) * Added a README file for the systemadmin plugin * Updated formatting of Functions table and split it into "named" and "unnamed" functions for clarity * Fixed issue with '|' characters in table by adding them in stateuents * Added \ escape characters in front of | characters --- plugins/systemadmin/README.md | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 plugins/systemadmin/README.md (limited to 'plugins') diff --git a/plugins/systemadmin/README.md b/plugins/systemadmin/README.md new file mode 100644 index 000000000..5b32470a0 --- /dev/null +++ b/plugins/systemadmin/README.md @@ -0,0 +1,61 @@ +# Systemadmin plugin + +This plugin adds a series of aliases and functions which make a System Administrator's life easier. + +To use it, add `systemadmin` to the plugins array in your zshrc file: + +```zsh +plugins=(... systemadmin) +``` + +## Aliases + +| Alias | Command | Description | +|--------|-----------------------------------------------------------------------------------|--------------------------------------------------------------------| +| ping | `ping -c 5` | Sends only 5 ICMP Messages | +| clr | `clear;echo "Currently logged in on $(tty), as $USER in directory $PWD."` | Clears the screen and prings the current user, TTY, and directory | +| path | `echo -e ${PATH//:/\\n}` | Displays PATH with each entry on a separate line | +| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output | +| psmem | ps -e -orss=,args= \| sort -b -k1,1n | Display the processes using the most memory | +| psmem10| ps -e -orss=,args= \| sort -b -k1,1n\| head -10 | Display the top 10 processes using the most memory | +| pscpu | ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr | Display the top processes using the most CPU | +| pscpu10| ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr \| head -10 | Display the top 10 processes using the most CPU | +| hist10 | print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10 | Display the top 10 most used commands in the history | + + +## Named Functions +These are used by some of the other functions to provide flexibility + +| Function | Description | +|-------------|---------------------------------------------------------------------------------------------------------------------------------------| +| retval | Returns the first argument or a '.' if no arguments are specified | +| retlog | Returns the first argument or /var/log/nginx/access.log if no arguments are specified | + +## Unamed Functions +These functions are closer to aliases with complex arguments simplified (in most cases) into one line + +| Function | Description | +|-------------|---------------------------------------------------------------------------------------------------------------------------------------| +| dls | List only directories in the current directory | +| psgrep | List all processes that match the pattern input after the command | +| killit | xargs sudo kill | Kills any process that matches a regulr expression passed to it | +| tree | List contents of directories in a tree-like format (if tree is installed) | +| sortcons | Sort connections by state | +| con80 | View all 80 Port Connections | +| sortconip | On the connected IP sorted by the number of connections | +| req20 | List the top 20 requests on port 80 | +| http20 | List the top 20 connections to port 80 based on tcpdump data | +| timewait20 | List the top 20 time_wait connections | +| syn20 | List the top 20 SYN connections | +| port_pro | Output all processes according to the port number | +| accessip10 | List the top 10 accesses to the ip address in the nginx/access.log file or another log file if specified as an argument | +| visitpage20 | List the top 20 most visited files or pages in the nginx/access.log file or another log file if specified as an argument | +| consume100 | List the top 100 of Page lists the most time-consuming (more than 60 seconds) as well as the corresponding page number of occurrences | +| webtraffic | List website traffic statistics in GB from tne nginx/access.log file or another log file if specified as an argument | +| c404 | List statistics on 404 connections in the nginx/access.log file or another log file if specified as an argument | +| httpstatus | List statistics based on http status in the nginx/access.log file or another log file if specified as an argument | +| d0 | Delete 0 byte files recursively in the directory specified (or current directory if none is specificied) | +| geteip | Gather information regarding an external IP address | +| getip | Determine the local IP Address with `ip addr` or `ifconfig` | +| clrz | Clear zombie processes | +| conssec | Display the number of concurrent connections per second in the nginix/access.log file or another log file if specified as an argument | -- cgit v1.2.3-70-g09d2 From f2d4b9768d75499c772cc656f574228c61f28b66 Mon Sep 17 00:00:00 2001 From: adri242 Date: Sun, 14 Oct 2018 18:42:56 +0200 Subject: Readme for Scala plugin added (#7286) --- plugins/scala/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/scala/README.md (limited to 'plugins') diff --git a/plugins/scala/README.md b/plugins/scala/README.md new file mode 100644 index 000000000..957261d9e --- /dev/null +++ b/plugins/scala/README.md @@ -0,0 +1,15 @@ +## Scala plugin + +Completion script for [scala and scalac](https://www.scala-lang.org/) commands. + +To use it, add `scala` to the plugins array of your zshrc file: +``` +plugins=(... scala) +``` + +## Aliases + +| Command | Description | +|------------------|---------------------------------------------------------------------------------| +| `scala` | Run code in the Scala language | +| `scalac` | Compiler for the Scala language | -- cgit v1.2.3-70-g09d2 From 9275d1fc98f61d353a900c698d7b53592036803d Mon Sep 17 00:00:00 2001 From: Sagar Patil Date: Sun, 14 Oct 2018 22:13:16 +0530 Subject: added README for pylint plugin (#7277) --- plugins/pylint/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/pylint/README.md (limited to 'plugins') diff --git a/plugins/pylint/README.md b/plugins/pylint/README.md new file mode 100644 index 000000000..8c1de88ba --- /dev/null +++ b/plugins/pylint/README.md @@ -0,0 +1,15 @@ +# pylint + +This plugin adds code analysis for python through [Pylint](https://www.pylint.org/). + +To use it, add `pylint` to the plugins array in your zshrc file: + +```zsh +plugins=(... pylint) +``` + +## Aliases + +| Alias | Command | Description | +| -------------| -------------------- | -------------------------------------------------------------------------------------------------------------------------| +| pylint-quick | `pylint --reports=n` | Displays a set of reports each one focusing on a particular aspect of the project, default set `no` for multiple reports | | -- cgit v1.2.3-70-g09d2 From d56cec1e8df19f67f665ff790b2fe2fb9ed59b50 Mon Sep 17 00:00:00 2001 From: Sagar Patil Date: Mon, 15 Oct 2018 00:29:23 +0530 Subject: Composer Readme added --- plugins/composer/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/composer/README.md (limited to 'plugins') diff --git a/plugins/composer/README.md b/plugins/composer/README.md new file mode 100644 index 000000000..b0c38cf39 --- /dev/null +++ b/plugins/composer/README.md @@ -0,0 +1,31 @@ +# composer + +This plugin provides completion for [composer](https://getcomposer.org/), +as well as aliases for frequent composer commands. + +To use it add `composer` to the plugins array in your zshrc file. + +```zsh +plugins=(... composer) +``` + +## Aliases + +| Alias | Command | Description | +| ------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `c` | composer | Start composer, get help with composer commands | +| `csu` | composer self-update | Update composer to the latest version | +| `cu` | composer update | Update composer dependencies and `composer.lock` file | +| `cr` | composer require | Adds new packages to the `composer.json` file from current directory | +| `crm` | composer remove | Removes packages from the `composer.json` file from the current directory | +| `ci` | composer install | Reads the `composer.json` file from the current directory, resolves the dependencies, and installs them into `vendor` | +| `ccp` | composer create-project | Create new project from an existing package | +| `cdu` | composer dump-autoload | Update the autoloader due to new classes in a classmap package without having to go through an install or update | +| `cdo` | composer dump-autoload --optimize-autoloader | Convert PSR-0/4 autoloading to classmap to get a faster autoloader. Recommended especially for production, set `no` by default | +| `cgu` | composer global update | Allows update command to run on COMPOSER_HOME directory | +| `cgr` | composer global require | Allows require command to run on COMPOSER_HOME directory | +| `cgrm` | composer global remove | Allows remove command to run on COMPOSER_HOME directory | +| `cget` | `curl -s https://getcomposer.org/installer` | Installs composer in the current directory | + + +The plugin adds Composer's global binaries to PATH, using Composer if available. -- cgit v1.2.3-70-g09d2 From ecb46c3ec743a0c081a88b1de187d62d954fd5be Mon Sep 17 00:00:00 2001 From: Josh Parnham Date: Thu, 18 Oct 2018 03:53:51 +1100 Subject: osx: fix typo in README (#7283) --- plugins/osx/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/osx/README.md b/plugins/osx/README.md index 7c75c65f5..3559dee02 100644 --- a/plugins/osx/README.md +++ b/plugins/osx/README.md @@ -56,6 +56,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | `man-preview` | Open a specified man page in Preview app | | `showfiles` | Show hidden files | | `hidefiles` | Hide the hidden files | -| `itunes` | Control iTunes. User `itunes -h` for usage details | +| `itunes` | Control iTunes. Use `itunes -h` for usage details | | `spotify` | Control Spotify and search by artist, album, track… | | `rmdsstore` | Remove .DS\_Store files recursively in a directory | -- cgit v1.2.3-70-g09d2 From 0871594f58301df6dc08a365b2582c850638af2f Mon Sep 17 00:00:00 2001 From: DBX12 Date: Wed, 17 Oct 2018 19:40:20 +0200 Subject: systemadmin: refactor plugin and fix README (#7295) --- plugins/systemadmin/README.md | 88 +++++++++++++----------------- plugins/systemadmin/systemadmin.plugin.zsh | 28 ++++------ 2 files changed, 49 insertions(+), 67 deletions(-) (limited to 'plugins') diff --git a/plugins/systemadmin/README.md b/plugins/systemadmin/README.md index 5b32470a0..edca4d87d 100644 --- a/plugins/systemadmin/README.md +++ b/plugins/systemadmin/README.md @@ -10,52 +10,42 @@ plugins=(... systemadmin) ## Aliases -| Alias | Command | Description | -|--------|-----------------------------------------------------------------------------------|--------------------------------------------------------------------| -| ping | `ping -c 5` | Sends only 5 ICMP Messages | -| clr | `clear;echo "Currently logged in on $(tty), as $USER in directory $PWD."` | Clears the screen and prings the current user, TTY, and directory | -| path | `echo -e ${PATH//:/\\n}` | Displays PATH with each entry on a separate line | -| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output | -| psmem | ps -e -orss=,args= \| sort -b -k1,1n | Display the processes using the most memory | -| psmem10| ps -e -orss=,args= \| sort -b -k1,1n\| head -10 | Display the top 10 processes using the most memory | -| pscpu | ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr | Display the top processes using the most CPU | -| pscpu10| ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr \| head -10 | Display the top 10 processes using the most CPU | -| hist10 | print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10 | Display the top 10 most used commands in the history | - - -## Named Functions -These are used by some of the other functions to provide flexibility - -| Function | Description | -|-------------|---------------------------------------------------------------------------------------------------------------------------------------| -| retval | Returns the first argument or a '.' if no arguments are specified | -| retlog | Returns the first argument or /var/log/nginx/access.log if no arguments are specified | - -## Unamed Functions -These functions are closer to aliases with complex arguments simplified (in most cases) into one line - -| Function | Description | -|-------------|---------------------------------------------------------------------------------------------------------------------------------------| -| dls | List only directories in the current directory | -| psgrep | List all processes that match the pattern input after the command | -| killit | xargs sudo kill | Kills any process that matches a regulr expression passed to it | -| tree | List contents of directories in a tree-like format (if tree is installed) | -| sortcons | Sort connections by state | -| con80 | View all 80 Port Connections | -| sortconip | On the connected IP sorted by the number of connections | -| req20 | List the top 20 requests on port 80 | -| http20 | List the top 20 connections to port 80 based on tcpdump data | -| timewait20 | List the top 20 time_wait connections | -| syn20 | List the top 20 SYN connections | -| port_pro | Output all processes according to the port number | -| accessip10 | List the top 10 accesses to the ip address in the nginx/access.log file or another log file if specified as an argument | -| visitpage20 | List the top 20 most visited files or pages in the nginx/access.log file or another log file if specified as an argument | -| consume100 | List the top 100 of Page lists the most time-consuming (more than 60 seconds) as well as the corresponding page number of occurrences | -| webtraffic | List website traffic statistics in GB from tne nginx/access.log file or another log file if specified as an argument | -| c404 | List statistics on 404 connections in the nginx/access.log file or another log file if specified as an argument | -| httpstatus | List statistics based on http status in the nginx/access.log file or another log file if specified as an argument | -| d0 | Delete 0 byte files recursively in the directory specified (or current directory if none is specificied) | -| geteip | Gather information regarding an external IP address | -| getip | Determine the local IP Address with `ip addr` or `ifconfig` | -| clrz | Clear zombie processes | -| conssec | Display the number of concurrent connections per second in the nginix/access.log file or another log file if specified as an argument | +| Alias | Command | Description | +|---------|------------------------------------------------------------------------|--------------------------------------------------------------------| +| ping | `ping -c 5` | Sends only 5 ICMP Messages | +| clr | `clear; echo Currently logged in on $TTY, as $USER in directory $PWD.` | Clears the screen and prints the current user, TTY, and directory | +| path | `print -l $path` | Displays PATH with each entry on a separate line | +| mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output | +| psmem | `ps -e -orss=,args= \| sort -b -k1,1n` | Display the processes using the most memory | +| psmem10 | `ps -e -orss=,args= \| sort -b -k1,1n \| head -10` | Display the top 10 processes using the most memory | +| pscpu | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr` | Display the top processes using the most CPU | +| pscpu10 | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr \| head -10` | Display the top 10 processes using the most CPU | +| hist10 | `print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10` | Display the top 10 most used commands in the history | + +## Functions + +| Function | Description | +|-------------|-----------------------------------------------------------------------------------------------------------------------| +| dls | List only directories in the current directory | +| psgrep | List all processes that match the pattern input after the command | +| killit | Kills any process that matches a regular expression passed to it | +| tree | List contents of directories in a tree-like format (if tree isn't installed) | +| sortcons | Sort connections by state | +| con80 | View all 80 Port Connections | +| sortconip | On the connected IP sorted by the number of connections | +| req20 | List the top 20 requests on port 80 | +| http20 | List the top 20 connections to port 80 based on tcpdump data | +| timewait20 | List the top 20 time_wait connections | +| syn20 | List the top 20 SYN connections | +| port_pro | Output all processes according to the port number | +| accessip10 | List the top 10 accesses to the ip address in the nginx/access.log file or another log file if specified | +| visitpage20 | List the top 20 most visited files or pages in the nginx/access.log file or another log file if specified | +| consume100 | List the 100 most time-consuming Page lists (more than 60 seconds) as well as the corresponding number of occurrences | +| webtraffic | List website traffic statistics in GB from tne nginx/access.log file or another log file if specified | +| c404 | List statistics on 404 connections in the nginx/access.log file or another log file if specified | +| httpstatus | List statistics based on http status in the nginx/access.log file or another log file if specified | +| d0 | Delete 0 byte files recursively in the current directory or another if specified | +| geteip | Gather information regarding an external IP address using [icanhazip.com](https://icanhazip.com) | +| getip | Determine the local IP Address with `ip addr` or `ifconfig` | +| clrz | Clear zombie processes | +| conssec | Show number of concurrent connections per second based on ngnix/access.log file or another log file if specified | diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index a74f818dd..5cc7b7397 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -12,14 +12,6 @@ # # ------------------------------------------------------------------------------ -function retval() { - if [[ -z $1 ]];then - echo '.' - else - echo $1 - fi -} - function retlog() { if [[ -z $1 ]];then echo '/var/log/nginx/access.log' @@ -29,8 +21,8 @@ function retlog() { } alias ping='ping -c 5' -alias clr='clear;echo "Currently logged in on $(tty), as $USER in directory $PWD."' -alias path='echo -e ${PATH//:/\\n}' +alias clr='clear; echo Currently logged in on $TTY, as $USER in directory $PWD.' +alias path='print -l $path' alias mkdir='mkdir -pv' # get top process eating memory alias psmem='ps -e -orss=,args= | sort -b -k1,1n' @@ -43,10 +35,10 @@ alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10' # directory LS dls () { - ls -l | grep "^d" | awk '{ print $9 }' | tr -d "/" + print -l *(/) } psgrep() { - ps aux | grep "$(retval $1)" | grep -v grep + ps aux | grep "${1:-.}" | grep -v grep } # Kills any process that matches a regexp passed to it killit() { @@ -54,10 +46,10 @@ killit() { } # list contents of directories in a tree-like format -if [ -z "\${which tree}" ]; then - tree () { - find $@ -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' - } +if ! (( $+commands[tree] )); then + tree () { + find $@ -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' + } fi # Sort connection state @@ -97,7 +89,7 @@ syn20() { # Printing process according to the port number port_pro() { - netstat -ntlp | grep "$(retval $1)" | awk '{print $7}' | cut -d/ -f1 + netstat -ntlp | grep "${1:-.}" | awk '{print $7}' | cut -d/ -f1 } # top10 of gain access to the ip address @@ -134,7 +126,7 @@ httpstatus() { # Delete 0 byte file d0() { - find "$(retval $1)" -type f -size 0 -exec rm -rf {} \; + find "${1:-.}" -type f -size 0 -exec rm -rf {} \; } # gather external ip address -- cgit v1.2.3-70-g09d2 From b834af66bd0650300740144b1dc277746c7ca6e0 Mon Sep 17 00:00:00 2001 From: Marco Zühlke Date: Wed, 17 Oct 2018 19:42:57 +0200 Subject: sbt: add README (#7294) --- plugins/sbt/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/sbt/README.md (limited to 'plugins') diff --git a/plugins/sbt/README.md b/plugins/sbt/README.md new file mode 100644 index 000000000..f1a5753b9 --- /dev/null +++ b/plugins/sbt/README.md @@ -0,0 +1,32 @@ +# sbt plugin + +This plugin adds completion for the [sbt, the interactive build tool](https://scala-sbt.org/), +as well as some aliases for common sbt commands. + +To use it, add `sbt` to the plugins array in your zshrc file: + +```zsh +plugins=(... sbt) +``` + +## Aliases + +| Alias | Command | Description | +|-------|-----------------------|--------------------------------------------------------------| +| sbc | `sbt compile` | Compiles the main sources | +| sbcln | `sbt clean` | Deletes all generated files | +| sbcc | `sbt clean compile` | Deletes generated files, compiles the main sources | +| sbco | `sbt console` | Starts Scala with the compiled sources and all dependencies | +| sbcq | `sbt console-quick` | Starts Scala with all dependencies | +| sbcp | `sbt console-project` | Starts Scala with sbt and the build definitions | +| sbd | `sbt doc` | Generates API documentation for Scala source files | +| sbdc | `sbt dist:clean` | Deletes the distribution packages | +| sbdi | `sbt dist` | Creates the distribution packages | +| sbgi | `sbt gen-idea` | Create Idea project files | +| sbp | `sbt publish` | Publishes artifacts to the repository | +| sbpl | `sbt publish-local` | Publishes artifacts to the local Ivy repository | +| sbr | `sbt run` | Runs the main class for the project | +| sbrm | `sbt run-main` | Runs the specified main class for the project | +| sbu | `sbt update` | Resolves and retrieves external dependencies | +| sbx | `sbt test` | Compiles and runs all tests | +| sba | `sbt assembly` | Create a fat JAR with all dependencies | -- cgit v1.2.3-70-g09d2 From 1abf04cb01e8c5a987632a5bddaa3e10fb5fe035 Mon Sep 17 00:00:00 2001 From: Sagar Patil Date: Wed, 17 Oct 2018 23:27:34 +0530 Subject: tmux: add README (#7293) --- plugins/tmux/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 plugins/tmux/README.md (limited to 'plugins') diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md new file mode 100644 index 000000000..427119d3d --- /dev/null +++ b/plugins/tmux/README.md @@ -0,0 +1,39 @@ +# tmux + +This plugin provides aliases for [tmux](http://tmux.github.io/), the terminal multiplexer. +To use it add `tmux` to the plugins array in your zshrc file. + +```zsh +plugins=(... tmux) +``` + +The plugin also supports the following - +- determines if tmux is installed or not, if not, prompts user to install tmux +- determines if the terminal supports the 256 colors or not, sets the appropriate configuration variable +- sets the correct local config file to use + +## Aliases + +| Alias | Command | Description | +| ------ | -----------------------|---------------------------------------------------------- | +| `ta` | tmux attach -t | Attach new tmux session to already running named session | +| `tad` | tmux attach -d -t | Detach named tmux session | +| `ts` | tmux new-session -s | Create a new named tmux session | +| `tl` | tmux list-sessions | Displays a list of running tmux sessions | +| `tksv` | tmux kill-server | Terminate all running tmux sessions | +| `tkss` | tmux kill-session -t | Terminate named running tmux session | +| `tmux` | `_zsh_tmux_plugin_run` | Start a new tmux session | + + +## Configuration Variables + +| Variable | Description | +|-------------------------------------|-------------------------------------------------------------------------------| +| `ZSH_TMUX_AUTOSTART` | Automatically starts tmux (default: `false`) | +| `ZSH_TMUX_AUTOSTART_ONCE` | Autostart only if tmux hasn't been started previously (default: `true`) | +| `ZSH_TMUX_AUTOCONNECT` | Automatically connect to a previous session if it exits (default: `true`) | +| `ZSH_TMUX_AUTOQUIT` | Automatically closes terminal once tmux exits (default: `ZSH_TMUX_AUTOSTART`) | +| `ZSH_TMUX_FIXTERM` | Sets `$TERM` to 256-color term or not based on current terminal support | +| `ZSH_TMUX_ITERM2` | Sets the `-CC` option for iTerm2 tmux integration (default: `false`) | +| `ZSH_TMUX_FIXTERM_WITHOUT_256COLOR` | `$TERM` to use for non 256-color terminals (default: `screen`) | +| `ZSH_TMUX_FIXTERM_WITH_256COLOR` | `$TERM` to use for 256-color terminals (default: `screen-256color` | -- cgit v1.2.3-70-g09d2 From f8ca1464b9d1792b2a6bc227c152197538b5ae9d Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 17 Oct 2018 20:34:58 +0200 Subject: reword --- plugins/composer/README.md | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'plugins') diff --git a/plugins/composer/README.md b/plugins/composer/README.md index b0c38cf39..2b4bae579 100644 --- a/plugins/composer/README.md +++ b/plugins/composer/README.md @@ -1,7 +1,8 @@ # composer -This plugin provides completion for [composer](https://getcomposer.org/), -as well as aliases for frequent composer commands. +This plugin provides completion for [composer](https://getcomposer.org/), as well as aliases +for frequent composer commands. It also adds Composer's global binaries to the PATH, using +Composer if available. To use it add `composer` to the plugins array in your zshrc file. @@ -11,21 +12,18 @@ plugins=(... composer) ## Aliases -| Alias | Command | Description | -| ------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `c` | composer | Start composer, get help with composer commands | -| `csu` | composer self-update | Update composer to the latest version | -| `cu` | composer update | Update composer dependencies and `composer.lock` file | -| `cr` | composer require | Adds new packages to the `composer.json` file from current directory | -| `crm` | composer remove | Removes packages from the `composer.json` file from the current directory | -| `ci` | composer install | Reads the `composer.json` file from the current directory, resolves the dependencies, and installs them into `vendor` | -| `ccp` | composer create-project | Create new project from an existing package | -| `cdu` | composer dump-autoload | Update the autoloader due to new classes in a classmap package without having to go through an install or update | -| `cdo` | composer dump-autoload --optimize-autoloader | Convert PSR-0/4 autoloading to classmap to get a faster autoloader. Recommended especially for production, set `no` by default | -| `cgu` | composer global update | Allows update command to run on COMPOSER_HOME directory | -| `cgr` | composer global require | Allows require command to run on COMPOSER_HOME directory | -| `cgrm` | composer global remove | Allows remove command to run on COMPOSER_HOME directory | -| `cget` | `curl -s https://getcomposer.org/installer` | Installs composer in the current directory | - - -The plugin adds Composer's global binaries to PATH, using Composer if available. +| Alias | Command | Description | +| ------ | -------------------------------------------- | -------------------------------------------------------------------------------------- | +| `c` | composer | Starts composer | +| `csu` | composer self-update | Updates composer to the latest version | +| `cu` | composer update | Updates composer dependencies and `composer.lock` file | +| `cr` | composer require | Adds new packages to `composer.json` | +| `crm` | composer remove | Removes packages from `composer.json` | +| `ci` | composer install | Resolves and installs dependencies from `composer.json` | +| `ccp` | composer create-project | Create new project from an existing package | +| `cdu` | composer dump-autoload | Updates the autoloader | +| `cdo` | composer dump-autoload --optimize-autoloader | Converts PSR-0/4 autoloading to classmap for a faster autoloader (good for production) | +| `cgu` | composer global update | Allows update command to run on COMPOSER_HOME directory | +| `cgr` | composer global require | Allows require command to run on COMPOSER_HOME directory | +| `cgrm` | composer global remove | Allows remove command to run on COMPOSER_HOME directory | +| `cget` | `curl -s https://getcomposer.org/installer` | Installs composer in the current directory | -- cgit v1.2.3-70-g09d2 From a2dab42c35cfcd7e5f7e7d5ecc58bbd8699028ce Mon Sep 17 00:00:00 2001 From: Josh Parnham Date: Thu, 18 Oct 2018 06:26:48 +1100 Subject: nanoc: update to latest version (#7282) * nanoc: update command aliases - remove deprecated commands - update `create-site` - add `prune` * nanoc: update README * nanoc: update autompletion - update commands - add flag options to subcommands --- plugins/nanoc/README.md | 19 +++++------- plugins/nanoc/_nanoc | 68 +++++++++++++++++++++++++++++++++++------- plugins/nanoc/nanoc.plugin.zsh | 7 ++--- 3 files changed, 68 insertions(+), 26 deletions(-) (limited to 'plugins') diff --git a/plugins/nanoc/README.md b/plugins/nanoc/README.md index 9e21805f4..d5d437d8a 100644 --- a/plugins/nanoc/README.md +++ b/plugins/nanoc/README.md @@ -10,14 +10,11 @@ plugins=(... nanoc) ## Aliases -| Alias | Command | Description | -|-------|-----------------------|----------------------------------------------------| -| n | `nanoc` | Main Nanoc command | -| na | `nanoc autocompile` | The autocompile command has been deprecated since Nanoc 3.6. Use [guard-nanoc](https://github.com/nanoc/nanoc/tree/master/guard-nanoc) instead. | -| nco | `nanoc compile` | Compile all items of the current site. | -| nci | `nanoc create_item` | Command was deprecated in Nanoc v.3 and completely removed in v.4 | -| ncl | `nanoc create_layout` | Command was deprecated in Nanoc v.3 and completely removed in v.4 | -| ncs | `nanoc create_site` | Create a new site at the given path. The site will use the filesystem data source. | -| nd | `nanoc deploy` | Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the --target option. | -| nv | `nanoc view` | Start the static web server. Unless specified, the web server will run on port 3000 and listen on all IP addresses. | -| nw | `nanoc watch` | The watch command has been deprecated since Nanoc 3.6. Use [guard-nanoc](https://github.com/nanoc/nanoc/tree/master/guard-nanoc) instead. | \ No newline at end of file +| Alias | Command | Description | +|-------|-----------------------|-----------------------------------------------------------------------------------| +| n | `nanoc` | Main Nanoc command | +| nco | `nanoc compile` | Compile all items of the current site | +| ncs | `nanoc create-site` | Create a new site at the given path. The site will use the filesystem data source | +| nd | `nanoc deploy` | Deploy the compiled site to the destination (specified with `--target`) | +| np | `nanoc prune` | Remove files not managed by Nanoc from the output directory | +| nv | `nanoc view` | Start the static web server (on port 3000 and all IP addresses, unless specified) | diff --git a/plugins/nanoc/_nanoc b/plugins/nanoc/_nanoc index fde07c3fc..a6a4792ad 100644 --- a/plugins/nanoc/_nanoc +++ b/plugins/nanoc/_nanoc @@ -1,28 +1,21 @@ #compdef nanoc #autoload -# nanoc zsh completion - based on the homebrew zsh completion # requires the 'nanoc' gem to be installed local -a _1st_arguments _1st_arguments=( - 'autocompile:start the autocompiler' + 'check:run issue checks' 'compile:compile items of this site' - 'create-item:create an item' - 'create-layout:create a layout' 'create-site:create a site' 'deploy:deploy the compiled site' 'help:show help' 'prune:remove files not managed by nanoc from the output directory' + 'shell:open a shell on the Nanoc environment' 'show-data:show data in this site' 'show-plugins:show all available plugins' 'show-rules:describe the rules for each item' - 'update:update the data stored by the data source to a newer version' - 'validate-css:validate the site’s CSS' - 'validate-html:validate the site’s HTML' - 'validate-links:validate links in site' 'view:start the web server that serves static files' - 'watch:start the watcher' ) local expl @@ -31,13 +24,68 @@ local -a pkgs installed_pkgs _arguments \ '(--color)--color[enable color]' \ '(--debug)--debug[enable debugging]' \ + '(--env)--env[set environment]' \ '(--help)--help[show the help message and quit]' \ '(--no-color)--no-color[disable color]' \ - '(--verbose)--verbose[make nanoc output more detailed]' \ + '(--verbose)--verbose[make output more detailed]' \ '(--version)--version[show version information and quit]' \ '(--warn)--warn[enable warnings]' \ '*:: :->subcmds' && return 0 +case "$state" in + subcmds) + case $words[1] in + check) + _arguments \ + '(--preprocess)--preprocess[run preprocessor]' + ;; + + compile) + _arguments \ + '(--diff)--diff[generate diff]' + ;; + + compile) + _arguments \ + '(--diff)--diff[generate diff]' + ;; + + create-site) + _arguments \ + '(--force)--force[force creation of new site]' + ;; + + deploy) + _arguments \ + '(--target)--target[specify the location to deploy to (default: `default`)]' \ + '(--no-check)--no-check[do not run the issue checks marked for deployment]' \ + '(--list)--list[list available locations to deploy to]' \ + '(--list-deployers)--list-deployers[list available deployers]' \ + '(--dry-run)--dry-run[show what would be deployed]' + ;; + + prune) + _arguments \ + '(--yes)--yes[confirm deletion]' \ + '(--dry-run)--dry-run[print files to be deleted instead of actually deleting them]' + ;; + + shell) + _arguments \ + '(--preprocess)--preprocess[run preprocessor]' + ;; + + view) + _arguments \ + '(--handler)--handler[specify the handler to use (webrick/mongrel/...)]' \ + '(--host)--host[specify the host to listen on (default: 127.0.0.1)]' \ + '(--port)--port[specify the port to listen on (default: 3000]' \ + '(--live-reload)--live-reload[reload on changes]' + ;; + esac + ;; +esac + if (( CURRENT == 1 )); then _describe -t commands "nanoc subcommand" _1st_arguments return diff --git a/plugins/nanoc/nanoc.plugin.zsh b/plugins/nanoc/nanoc.plugin.zsh index 5a5064613..05272ed66 100644 --- a/plugins/nanoc/nanoc.plugin.zsh +++ b/plugins/nanoc/nanoc.plugin.zsh @@ -1,9 +1,6 @@ alias n='nanoc' -alias na='nanoc autocompile' alias nco='nanoc compile' -alias nci='nanoc create_item' -alias ncl='nanoc create_layout' -alias ncs='nanoc create_site' +alias ncs='nanoc create-site' alias nd='nanoc deploy' +alias np='nanoc prune' alias nv='nanoc view' -alias nw='nanoc watch' -- cgit v1.2.3-70-g09d2 From 54603333634d057c5d2e1b2eb826eec5ce8fd706 Mon Sep 17 00:00:00 2001 From: mhennecke Date: Wed, 17 Oct 2018 21:28:48 +0200 Subject: sublime: fix typo in cygwin path logic (#7304) Bug introduced in cea941ce42b5d550489367608dd1ac4401151c97 --- 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 f5bb070ab..485028d9f 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -42,8 +42,8 @@ elif [[ "$OSTYPE" = darwin* ]]; then fi done elif [[ "$OSTYPE" = 'cygwin' ]]; then - local sublime_cygwin_paths - sublime_cygwin_paths=( + local _sublime_cygwin_paths + _sublime_cygwin_paths=( "$(cygpath $ProgramW6432/Sublime\ Text\ 2)/sublime_text.exe" "$(cygpath $ProgramW6432/Sublime\ Text\ 3)/sublime_text.exe" ) -- cgit v1.2.3-70-g09d2 From 3a8b93727fd58ef99dd70b7899f71efa1e1d217f Mon Sep 17 00:00:00 2001 From: John Oerter Date: Thu, 18 Oct 2018 13:58:14 -0500 Subject: battery: add README (#7309) --- plugins/battery/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/battery/README.md (limited to 'plugins') diff --git a/plugins/battery/README.md b/plugins/battery/README.md new file mode 100644 index 000000000..b7a13a7ec --- /dev/null +++ b/plugins/battery/README.md @@ -0,0 +1,13 @@ +# Battery Plugin + +This plugin adds some functions you can use to display battery information in your custom theme. + +To use, add `battery` to the list of plugins in your `.zshrc` file: + +`plugins=(... battery)` + +Then, add the `battery_pct_prompt` function to your custom theme. For example: + +``` +RPROMPT='$(battery_pct_prompt)' +``` -- cgit v1.2.3-70-g09d2 From d7ba91a875c26a4243b5ad553e14e2446d3b48d5 Mon Sep 17 00:00:00 2001 From: Stephan Salzmann Date: Fri, 19 Oct 2018 15:22:09 +0200 Subject: Adding gitignore plugin README --- plugins/gitignore/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/gitignore/README.md (limited to 'plugins') diff --git a/plugins/gitignore/README.md b/plugins/gitignore/README.md new file mode 100644 index 000000000..12cf07bca --- /dev/null +++ b/plugins/gitignore/README.md @@ -0,0 +1,14 @@ +# gitignore + +This plugin enables you the use of gitignore.io from the command line. You need an active internet connection. + +To use it, add `gitignore` to the plugins array in your zshrc file: + +```zsh +plugins=(... gitignore) +``` + +## Plugin commands +* `gi list` List displays a list of all of the currently support gitignore.io templates. +* `gi [TEMPLATENAME]` Show output on the command line, e.g. `gi java` to exclude class and package files. +* `gi [TEMPLATENAME] >> .gitignore` Appending programming language settings to your projects .gitignore. -- cgit v1.2.3-70-g09d2 From eb87529b98abf5764c584a663a6665fce35e4fbf Mon Sep 17 00:00:00 2001 From: Stephan Salzmann Date: Fri, 19 Oct 2018 16:36:51 +0200 Subject: Adding gpg-agent plugin README --- plugins/gpg-agent/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 plugins/gpg-agent/README.md (limited to 'plugins') diff --git a/plugins/gpg-agent/README.md b/plugins/gpg-agent/README.md new file mode 100644 index 000000000..f5fe77102 --- /dev/null +++ b/plugins/gpg-agent/README.md @@ -0,0 +1,8 @@ +# gpg-agent + +Enable gpg-agent if it is not running. + +To use it, add gpg-agent to the plugins array of your zshrc file: +``` +plugins=(... gpg-agent) +``` -- cgit v1.2.3-70-g09d2 From 6a536f88aad20b4157e7693fa9544c7add3c3320 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 19 Oct 2018 18:46:29 +0200 Subject: reword and fix formatting --- plugins/gitignore/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/gitignore/README.md b/plugins/gitignore/README.md index 12cf07bca..753dd31fd 100644 --- a/plugins/gitignore/README.md +++ b/plugins/gitignore/README.md @@ -1,6 +1,6 @@ # gitignore -This plugin enables you the use of gitignore.io from the command line. You need an active internet connection. +This plugin enables you the use of [gitignore.io](https://www.gitignore.io/) from the command line. You need an active internet connection. To use it, add `gitignore` to the plugins array in your zshrc file: @@ -9,6 +9,9 @@ plugins=(... gitignore) ``` ## Plugin commands -* `gi list` List displays a list of all of the currently support gitignore.io templates. -* `gi [TEMPLATENAME]` Show output on the command line, e.g. `gi java` to exclude class and package files. -* `gi [TEMPLATENAME] >> .gitignore` Appending programming language settings to your projects .gitignore. + +* `gi list`: List all the currently supported gitignore.io templates. + +* `gi [TEMPLATENAME]`: Show git-ignore output on the command line, e.g. `gi java` to exclude class and package files. + +* `gi [TEMPLATENAME] >> .gitignore`: Appending programming language settings to your projects .gitignore. -- cgit v1.2.3-70-g09d2 From ca50dfda9f02836910bf5bc956d7d786bc997f92 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 19 Oct 2018 18:54:26 +0200 Subject: add link to documentation --- plugins/gpg-agent/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gpg-agent/README.md b/plugins/gpg-agent/README.md index f5fe77102..a9711f923 100644 --- a/plugins/gpg-agent/README.md +++ b/plugins/gpg-agent/README.md @@ -1,6 +1,6 @@ # gpg-agent -Enable gpg-agent if it is not running. +Enables [GPG's gpg-agent](https://www.gnupg.org/documentation/manuals/gnupg/) if it is not running. To use it, add gpg-agent to the plugins array of your zshrc file: ``` -- cgit v1.2.3-70-g09d2 From 576ada138fc5eed3f58a4aff8141e483310c90fb Mon Sep 17 00:00:00 2001 From: Stephan Salzmann Date: Fri, 19 Oct 2018 19:27:49 +0200 Subject: colorize: add README and refactor plugin (#7314) --- plugins/colorize/README.md | 18 ++++++++++++++++++ plugins/colorize/colorize.plugin.zsh | 21 ++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 plugins/colorize/README.md (limited to 'plugins') diff --git a/plugins/colorize/README.md b/plugins/colorize/README.md new file mode 100644 index 000000000..c006071f9 --- /dev/null +++ b/plugins/colorize/README.md @@ -0,0 +1,18 @@ +# colorize + +With this plugin you can syntax-highlight file contents of over 300 supported languages and other text formats. + +To use it, add colorize to the plugins array of your zshrc file: +``` +plugins=(... colorize) +``` + +## Usage + +* `ccat [files]`: colorize the contents of the file (or files, if more than one are provided). If no arguments are passed it will colorize the standard input or stdin. + +Colorize will highlight the content based on the filename extension. If it can't find a syntax-highlighting method for a given extension, it will try to find one by looking at the file contents. If no highlight method is found it will just cat the file normally, without syntax highlighting. + +## Requirements + +You have to install Pygments first: [pygments.org](http://pygments.org/download/) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index e2af6d25e..8eede9a94 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -1,9 +1,4 @@ -# Plugin for highlighting file content -# Plugin highlights file content based on the filename extension. -# If no highlighting method supported for given extension then it tries -# guess it by looking for file content. - -#easier alias to use plugin +# easier alias to use the plugin alias ccat='colorize_via_pygmentize' colorize_via_pygmentize() { @@ -12,16 +7,20 @@ colorize_via_pygmentize() { return 1 fi + # pygmentize stdin if no arguments passed if [ $# -eq 0 ]; then - pygmentize -g $@ + pygmentize -g + return $? fi + # guess lexer from file extension, or + # guess it from file contents if unsuccessful + local FNAME lexer for FNAME in $@ do - filename=$(basename "$FNAME") - lexer=`pygmentize -N \"$filename\"` - if [ "Z$lexer" != "Ztext" ]; then - pygmentize -l $lexer "$FNAME" + lexer=$(pygmentize -N "$FNAME") + if [[ $lexer != text ]]; then + pygmentize -l "$lexer" "$FNAME" else pygmentize -g "$FNAME" fi -- cgit v1.2.3-70-g09d2 From 4365792985f6bbaf65c847400fa47ce7c0d1cb79 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Tue, 23 Oct 2018 14:43:44 +0200 Subject: Create README.md Add README.md to Symfony2 plugin --- plugins/symfony2/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 plugins/symfony2/README.md (limited to 'plugins') diff --git a/plugins/symfony2/README.md b/plugins/symfony2/README.md new file mode 100644 index 000000000..d5d9c1880 --- /dev/null +++ b/plugins/symfony2/README.md @@ -0,0 +1,25 @@ +# Symfony2 + +This plugin provides completion for [symfony2](https://symfony.com/), as well as aliases for frequent composer commands. + +To use it add composer 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 | +| `sfge` | sf doctrine:generate:entity | Generate an entity | +| `sfsu` | sf doctrine:schema:update | Update the schema in Database | +| `sfdev` | sf --env=dev | Update environment to `dev` | +| `sfprod` | sf --env=prod | Update environment to `prod` | -- cgit v1.2.3-70-g09d2 From 550781561bf6871fcf5036e0beb707e116de9d3b Mon Sep 17 00:00:00 2001 From: Andreas Häber Date: Wed, 24 Oct 2018 15:56:51 +0200 Subject: helm: add README (#7325) --- plugins/helm/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/helm/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 50208f5c427fb6af076e24ac3a1eab714b4511b9 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 24 Oct 2018 16:01:42 +0200 Subject: fix copy errors --- plugins/symfony2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/symfony2/README.md b/plugins/symfony2/README.md index d5d9c1880..562641dfb 100644 --- a/plugins/symfony2/README.md +++ b/plugins/symfony2/README.md @@ -1,8 +1,8 @@ # Symfony2 -This plugin provides completion for [symfony2](https://symfony.com/), as well as aliases for frequent composer commands. +This plugin provides completion for [Symfony 2](https://symfony.com/), as well as aliases for frequent Symfony commands. -To use it add composer to the plugins array in your zshrc file. +To use it add symfony2 to the plugins array in your zshrc file. ```bash plugins=(... symfony2) -- cgit v1.2.3-70-g09d2 From 745b6550a6a8415e2c6df0006aad40549c3bc56a Mon Sep 17 00:00:00 2001 From: "Paul N. Baker" Date: Wed, 24 Oct 2018 09:41:05 -0600 Subject: mvn: run mvnw only if executable (#7326) The problem that can occur is ocassionally mvnw will not be executable. This can happen if mvnw is included from an archetype, as unix permissions aren't preserved within the jar they're stored in. Only using mvnw if it exists AND is executable --- plugins/mvn/mvn.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 74583c6dc..f367fecce 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -20,9 +20,9 @@ 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 +# if found an executable ./mvnw file execute it otherwise execute orignal mvn mvn-or-mvnw() { - if [ -f ./mvnw ] ; then + if [ -x ./mvnw ] ; then echo "executing mvnw instead of mvn" ./mvnw "$@"; else -- cgit v1.2.3-70-g09d2 From ad41fe50f9ac8b44b2171fea8b0b990aa9542699 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Thu, 25 Oct 2018 13:12:02 +0200 Subject: symfony: add README (#7337) --- plugins/symfony/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/symfony/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From ad9a8f2d434deb698702ba136d935d9d0910a4ae Mon Sep 17 00:00:00 2001 From: Patrick Artounian Date: Thu, 25 Oct 2018 04:26:22 -0700 Subject: systemadmin: fix getip output with ifconfig (#7306) --- plugins/systemadmin/systemadmin.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') 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 } -- cgit v1.2.3-70-g09d2 From 4c8dd9c26da5b6cb85c5b82dab5b31b9d216834e Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 14:52:54 +0200 Subject: heroku: add README (#7342) --- plugins/heroku/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/heroku/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From c6b68707f95faabb31fcaabf55f5d78abc64fb19 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 17:05:50 +0200 Subject: doctl: add README (#7346) --- plugins/doctl/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/doctl/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From b3483109f54dbb0481fb0d6a491f2bf89f0f4cf8 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 17:06:45 +0200 Subject: celery: add README (#7345) --- plugins/celery/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/celery/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From fcbfd75827e52cb11e40246735d2a8f43f861d1a Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 17:08:27 +0200 Subject: homestead: add README (#7343) --- plugins/homestead/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/homestead/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From f31ef2024dacc4c3a35e8486173fe9de3fcd67be Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 17:10:50 +0200 Subject: jake-node: add README (#7344) --- plugins/jake-node/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/jake-node/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 5da824526a0184087c8aa0eae2255ea547385e81 Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Sat, 27 Oct 2018 16:32:13 -0700 Subject: kops: add README.md --- plugins/kops/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/kops/README.md (limited to 'plugins') diff --git a/plugins/kops/README.md b/plugins/kops/README.md new file mode 100644 index 000000000..1983afab4 --- /dev/null +++ b/plugins/kops/README.md @@ -0,0 +1,9 @@ +# kops + +This plugin provides completion for [kops](https://github.com/kubernetes/kops). + +To use it, add `kops` to the plugins array in your zshrc file. + +``` +plugins=(... kops) +``` -- cgit v1.2.3-70-g09d2 From c4bdb83f07e8efee940292a42dd286a6263848ca Mon Sep 17 00:00:00 2001 From: Marco Zühlke Date: Sun, 28 Oct 2018 11:36:54 +0100 Subject: add readme fot git-flow-avh --- plugins/git-flow-avh/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/git-flow-avh/README.md (limited to 'plugins') diff --git a/plugins/git-flow-avh/README.md b/plugins/git-flow-avh/README.md new file mode 100644 index 000000000..340ed80d1 --- /dev/null +++ b/plugins/git-flow-avh/README.md @@ -0,0 +1,12 @@ +# 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/). + +The git-flow tool has to be [installed](https://github.com/petervanderdoes/gitflow-avh#installing-git-flow) separately. + +To use it, add `git-flow-avh` to the plugins array in your zshrc file: + +```zsh +plugins=(... git-flow-avh) +``` -- cgit v1.2.3-70-g09d2 From ac2ccb753521c279fc17ae26e33359f7dec9d527 Mon Sep 17 00:00:00 2001 From: Marco Zühlke Date: Sun, 28 Oct 2018 12:21:29 +0100 Subject: add readme for grails plugin --- plugins/grails/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/grails/README.md (limited to 'plugins') diff --git a/plugins/grails/README.md b/plugins/grails/README.md new file mode 100644 index 000000000..1b0eda1dd --- /dev/null +++ b/plugins/grails/README.md @@ -0,0 +1,15 @@ +# Grails plugin + +Adds tab-completion of Grails script names to the command line use of grails. +Looks for scripts in the following paths: + +- `$GRAILS_HOME/scripts` +- `~/.grails/scripts` +- `./scripts` +- `./plugins/*/scripts` + +To use it, add `grails` to the plugins array in your zshrc file: + +```zsh +plugins=(... grails) +``` -- cgit v1.2.3-70-g09d2 From abcac3e8a1819c0ad2a5bab84e4c57512a5d745e Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Sun, 28 Oct 2018 12:28:28 +0100 Subject: Create README.md Create stack's plugin README.md --- plugins/stack/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/stack/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 684feffc355df95c804a6a32196248bacfefebe7 Mon Sep 17 00:00:00 2001 From: Jorge Luis Vargas Aguilar Date: Sun, 28 Oct 2018 05:17:41 -0700 Subject: aws: add README (#7357) --- plugins/aws/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/aws/README.md (limited to 'plugins') 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 `: Sets `AWS_PROFILE` and `AWS_DEFAULT_PROFILE` (legacy) to ``. +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. -- cgit v1.2.3-70-g09d2 From 3752700a5a12136e0b6b80d3fd07a271c868d616 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:21:58 +0100 Subject: add description and author --- plugins/kops/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/kops/README.md b/plugins/kops/README.md index 1983afab4..5d9b5f8d6 100644 --- a/plugins/kops/README.md +++ b/plugins/kops/README.md @@ -1,9 +1,12 @@ # kops -This plugin provides completion for [kops](https://github.com/kubernetes/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) -- cgit v1.2.3-70-g09d2 From a58dc3232332db61f0e8244bcf0416aaef5d6fe0 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:22:26 +0100 Subject: delete duplicate documentation --- plugins/kops/kops.plugin.zsh | 6 ------ 1 file changed, 6 deletions(-) (limited to 'plugins') 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 -- cgit v1.2.3-70-g09d2 From 70246da9cbc96b33256496e501618b9963ac73ee Mon Sep 17 00:00:00 2001 From: Jorge Luis Vargas Aguilar Date: Sun, 28 Oct 2018 05:24:17 -0700 Subject: minikube: add README (#7359) --- plugins/minikube/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/minikube/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 8f777f30bbb97f27b855bad5585619da499ea7e1 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:37:55 +0100 Subject: add git completion requirements notice --- plugins/git-flow-avh/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/git-flow-avh/README.md b/plugins/git-flow-avh/README.md index 340ed80d1..0768d93ea 100644 --- a/plugins/git-flow-avh/README.md +++ b/plugins/git-flow-avh/README.md @@ -3,10 +3,17 @@ 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/). -The git-flow tool has to be [installed](https://github.com/petervanderdoes/gitflow-avh#installing-git-flow) separately. - 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. -- cgit v1.2.3-70-g09d2 From b6f629dc1c63c354d1e635f36a0f016554354a86 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:39:26 +0100 Subject: delete not applicable comments --- plugins/git-flow-avh/git-flow-avh.plugin.zsh | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'plugins') 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 -- cgit v1.2.3-70-g09d2 From f1250cfbce4dc08b1b4d147ff533fad0ca64d5e0 Mon Sep 17 00:00:00 2001 From: Marco Zühlke Date: Sun, 28 Oct 2018 13:46:08 +0100 Subject: git-hubflow: add README (#7361) --- plugins/git-hubflow/README.md | 24 ++++++++++++++++++++++++ plugins/git-hubflow/git-hubflow.plugin.zsh | 22 ---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 plugins/git-hubflow/README.md (limited to 'plugins') 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' -- cgit v1.2.3-70-g09d2 From 4e59ba755cb75793582566eacc6f042cb8f2461b Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:50:34 +0100 Subject: move path section after plugin-enabling section --- plugins/grails/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/grails/README.md b/plugins/grails/README.md index 1b0eda1dd..9d69b161e 100644 --- a/plugins/grails/README.md +++ b/plugins/grails/README.md @@ -1,15 +1,16 @@ # Grails plugin Adds tab-completion of Grails script names to the command line use of grails. -Looks for scripts in the following paths: - -- `$GRAILS_HOME/scripts` -- `~/.grails/scripts` -- `./scripts` -- `./plugins/*/scripts` 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` -- cgit v1.2.3-70-g09d2 From c87eea8bdb19aa3d3324158e83518140bf1c2b28 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 28 Oct 2018 13:51:26 +0100 Subject: add link --- plugins/grails/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/grails/README.md b/plugins/grails/README.md index 9d69b161e..6bf2ac1e6 100644 --- a/plugins/grails/README.md +++ b/plugins/grails/README.md @@ -1,6 +1,6 @@ # Grails plugin -Adds tab-completion of Grails script names to the command line use of grails. +Adds tab-completion of [Grails](https://grails.org/) script names to the command line use of grails. To use it, add `grails` to the plugins array in your zshrc file: -- cgit v1.2.3-70-g09d2 From e4946ef9f94360dd4767c2e58274cd62057822a5 Mon Sep 17 00:00:00 2001 From: "Vargas, Jorge L" Date: Sat, 27 Oct 2018 15:21:18 -0700 Subject: aws: change AWS_DEFAULT_PROFILE to AWS_PROFILE The environment variable name used to be AWS_DEFAULT_PROFILE but the CLI documentation now only mentions AWS_PROFILE. https://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html It seems like the CLI was the only tool using AWS_DEFAULT_PROFILE, and all the AWS SDKs used AWS_PROFILE, so they standardized on it. https://onetechnical.wordpress.com/2016/10/07/the-curious-case-of-aws_default_profile/ Note: still left AWS_DEFAULT_PROFILE on the method to set the profile to maintain backwards compatibility. Close #7354 --- plugins/aws/aws.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 183b0f226..252c0d9c1 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -24,7 +24,7 @@ _awscli-homebrew-installed() { export AWS_HOME=~/.aws function agp { - echo $AWS_DEFAULT_PROFILE + echo $AWS_PROFILE } function asp { @@ -33,7 +33,7 @@ function asp { export AWS_DEFAULT_PROFILE=$1 export AWS_PROFILE=$1 - export RPROMPT="$rprompt" + export RPROMPT="$rprompt" } function aws_profiles { -- cgit v1.2.3-70-g09d2 From 543044efe3940b623069996cf6b2f5127635815f Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Sat, 27 Oct 2018 15:59:03 -0700 Subject: aws: use AWS_CONFIG_FILE to complete profiles Stop exporting AWS_HOME and use the standard AWS_CONFIG_FILE environment variable, with a fallback to ~/.aws/config (default location) if not defined. Close #7356 --- plugins/aws/aws.plugin.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 252c0d9c1..f78e96ce3 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -21,8 +21,6 @@ _awscli-homebrew-installed() { [ -r $_brew_prefix/libexec/bin/aws_zsh_completer.sh ] &> /dev/null } -export AWS_HOME=~/.aws - function agp { echo $AWS_PROFILE } @@ -37,7 +35,7 @@ function asp { } 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 -- cgit v1.2.3-70-g09d2 From 2d74c1bf2beaef4bd6ee6b9448d170450c45b172 Mon Sep 17 00:00:00 2001 From: Mike Truso Date: Sun, 28 Oct 2018 13:26:08 -0500 Subject: grails readme (#7365) --- plugins/grails/README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/grails/README.md b/plugins/grails/README.md index 6bf2ac1e6..64b4a9f07 100644 --- a/plugins/grails/README.md +++ b/plugins/grails/README.md @@ -1,6 +1,6 @@ # Grails plugin -Adds tab-completion of [Grails](https://grails.org/) script names to the command line use of grails. +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: @@ -14,3 +14,58 @@ It looks for scripts in the following paths: - `~/.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` -- cgit v1.2.3-70-g09d2 From fa2dc41c233ac2f6a1fea81b6363cd97bb1d199b Mon Sep 17 00:00:00 2001 From: Michy Amrane Date: Sun, 28 Oct 2018 19:27:34 +0100 Subject: [yarn] more aliases ^^ (#7310) * more aliases ^^ --- plugins/yarn/README.md | 6 ++++++ plugins/yarn/yarn.plugin.zsh | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'plugins') 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" -- cgit v1.2.3-70-g09d2 From dc3a605ec1cd7fb2476074ce47f74b0b5093ab46 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Sun, 28 Oct 2018 19:28:15 +0100 Subject: Add symfony2 aliases (#7338) * Documentation for Npm plugin added * Fix style and add alias descriptions * Add Generate Command alias * Add Create Database alias * Add Generate Controller alias --- plugins/symfony2/README.md | 3 +++ plugins/symfony2/symfony2.plugin.zsh | 3 +++ 2 files changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/symfony2/README.md b/plugins/symfony2/README.md index 562641dfb..2946d0937 100644 --- a/plugins/symfony2/README.md +++ b/plugins/symfony2/README.md @@ -19,7 +19,10 @@ plugins=(... symfony2) | `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' -- cgit v1.2.3-70-g09d2 From e83a4c81845885f378843cb0e9726592d964aafe Mon Sep 17 00:00:00 2001 From: Akash Krishnan Date: Tue, 30 Oct 2018 02:41:02 +0530 Subject: cabal: add README (#7367) --- plugins/cabal/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/cabal/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 30125e10a60134e08f9ce411f2b2ebdd67face35 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Tue, 30 Oct 2018 15:55:35 +0100 Subject: bwana: add README (#7369) --- plugins/bwana/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/bwana/README.md (limited to 'plugins') 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) +``` -- cgit v1.2.3-70-g09d2 From 78935f7cf74e5092002dc66df875879aea502c86 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Thu, 1 Nov 2018 15:17:25 +0100 Subject: ant: add README (#7375) --- plugins/ant/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/ant/README.md (limited to 'plugins') 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. -- cgit v1.2.3-70-g09d2 From 5c91cfcb061aafbffe7b60f22c23a3ed580fdf2a Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Thu, 1 Nov 2018 15:29:05 +0100 Subject: capistrano: add README (#7376) --- plugins/capistrano/README.md | 14 ++++++++++++++ plugins/capistrano/capistrano.plugin.zsh | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 plugins/capistrano/README.md (limited to 'plugins') 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 $* -- cgit v1.2.3-70-g09d2 From 545446a3db0c7e7a2a7e44985b9d0459c347dc49 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Thu, 1 Nov 2018 15:42:18 +0100 Subject: cpanm: add README (#7377) --- plugins/cpanm/README.md | 9 +++++++++ plugins/cpanm/_cpanm | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 plugins/cpanm/README.md (limited to 'plugins') 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 -- cgit v1.2.3-70-g09d2 From fa9d93008b2c9d42f26320c92752f4f019c47404 Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Thu, 1 Nov 2018 16:40:31 +0100 Subject: fabric: add README (#7378) --- plugins/fabric/README.md | 9 ++++++ plugins/fabric/_fab | 60 ---------------------------------------- plugins/fabric/_fabric | 60 ++++++++++++++++++++++++++++++++++++++++ plugins/fabric/fabric.plugin.zsh | 1 - 4 files changed, 69 insertions(+), 61 deletions(-) create mode 100644 plugins/fabric/README.md delete mode 100644 plugins/fabric/_fab create mode 100644 plugins/fabric/_fabric delete mode 100644 plugins/fabric/fabric.plugin.zsh (limited to 'plugins') 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/_fab b/plugins/fabric/_fab deleted file mode 100644 index 9628e1224..000000000 --- a/plugins/fabric/_fab +++ /dev/null @@ -1,60 +0,0 @@ -#compdef fab -#autoload - -local curcontext=$curcontext state line -declare -A opt_args - -declare target_list -target_list=(`fab --shortlist 2>/dev/null`) - -_targets() { - _describe -t commands "fabric targets" target_list -} - -output_levels=( - 'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.' - 'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!' - 'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.' - 'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.' - 'stdout: Local, or remote, stdout, i.e. non-error output from commands.' - 'stderr: Local, or remote, stderr, i.e. error-related output from commands.' - 'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.' -) - -_arguments -w -S -C \ - '(-)'{-h,--help}'[show this help message and exit]: :->noargs' \ - '(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \ - '(-)--list[print list of possible commands and exit]: :->noargs' \ - '(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \ - '(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \ - '(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \ - "(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \ - '(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \ - '(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \ - '(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \ - '(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \ - '(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \ - '(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \ - '(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \ - '(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \ - '(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \ - '-i+[path to SSH private key file. May be repeated]: :_files' \ - "(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \ - '(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \ - '(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \ - '(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \ - '(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \ - '*::: :->subcmds' && return 0 - -if [[ CURRENT -ge 1 ]]; then - case $state in - noargs) - _message "nothing to complete";; - levels) - _describe -t commands "output levels" output_levels;; - *) - _targets;; - esac - - return -fi diff --git a/plugins/fabric/_fabric b/plugins/fabric/_fabric new file mode 100644 index 000000000..9628e1224 --- /dev/null +++ b/plugins/fabric/_fabric @@ -0,0 +1,60 @@ +#compdef fab +#autoload + +local curcontext=$curcontext state line +declare -A opt_args + +declare target_list +target_list=(`fab --shortlist 2>/dev/null`) + +_targets() { + _describe -t commands "fabric targets" target_list +} + +output_levels=( + 'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.' + 'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!' + 'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.' + 'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.' + 'stdout: Local, or remote, stdout, i.e. non-error output from commands.' + 'stderr: Local, or remote, stderr, i.e. error-related output from commands.' + 'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.' +) + +_arguments -w -S -C \ + '(-)'{-h,--help}'[show this help message and exit]: :->noargs' \ + '(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \ + '(-)--list[print list of possible commands and exit]: :->noargs' \ + '(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \ + '(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \ + '(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \ + "(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \ + '(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \ + '(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \ + '(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \ + '(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \ + '(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \ + '(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \ + '(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \ + '(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \ + '(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \ + '-i+[path to SSH private key file. May be repeated]: :_files' \ + "(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \ + '(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \ + '(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \ + '(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \ + '(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \ + '*::: :->subcmds' && return 0 + +if [[ CURRENT -ge 1 ]]; then + case $state in + noargs) + _message "nothing to complete";; + levels) + _describe -t commands "output levels" output_levels;; + *) + _targets;; + esac + + return +fi diff --git a/plugins/fabric/fabric.plugin.zsh b/plugins/fabric/fabric.plugin.zsh deleted file mode 100644 index aca411329..000000000 --- a/plugins/fabric/fabric.plugin.zsh +++ /dev/null @@ -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. -- cgit v1.2.3-70-g09d2 From 95a3b2768033627d9ba3e347f368dffae92906b7 Mon Sep 17 00:00:00 2001 From: Joseph Benden Date: Thu, 1 Nov 2018 15:07:58 -0700 Subject: Add keychain plugin This plugin integrates the Keychain tool[1] in to the project. [1] [keychain](https://www.funtoo.org/Keychain) --- plugins/keychain/README.md | 45 ++++++++++++++++++++++++++++++++++++ plugins/keychain/keychain.plugin.zsh | 32 +++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 plugins/keychain/README.md create mode 100644 plugins/keychain/keychain.plugin.zsh (limited to 'plugins') 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 -- cgit v1.2.3-70-g09d2 From 05b617066ba5a37ef0c533385efd6e232a387b8f Mon Sep 17 00:00:00 2001 From: Arvindraj Date: Fri, 2 Nov 2018 22:10:13 +0530 Subject: transfer: add deprecation notice (#7372) Fixes #7371 Signed-off-by: Arvindraj Co-authored-by: Stephen Ward --- plugins/transfer/README.md | 4 ++++ plugins/transfer/transfer.plugin.zsh | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/transfer/README.md b/plugins/transfer/README.md index 5fa064445..37c7ca2f7 100644 --- a/plugins/transfer/README.md +++ b/plugins/transfer/README.md @@ -1,5 +1,9 @@ # `transfer` plugin +**NOTICE: The `transfer` plugin is deprecated and will be removed soon, since the [transfer.sh](https://transfer.sh) service will be shutdown on 30th November 30th, 2018. Please move your files to an alternative file sharing service provider.** + +---- + [`transfer.sh`](https://transfer.sh) is an easy to use file sharing service from the command line ## Usage diff --git a/plugins/transfer/transfer.plugin.zsh b/plugins/transfer/transfer.plugin.zsh index 7a7cd85ec..8fd09ef04 100644 --- a/plugins/transfer/transfer.plugin.zsh +++ b/plugins/transfer/transfer.plugin.zsh @@ -12,6 +12,14 @@ # Modified to use tar command instead of zip # +echo -ne '\e[1;33m' +cat <<-EOF + [oh-my-zsh] WARNING: The 'transfer' plugin is deprecated and will be removed after + [oh-my-zsh] transfer.sh shuts down on November 30th. We suggest you stop using the + [oh-my-zsh] plugin and find an alternative file hosting service. +EOF +echo -ne '\e[0m' + curl --version 2>&1 > /dev/null if [ $? -ne 0 ]; then echo "Could not find curl." @@ -64,4 +72,4 @@ transfer() { # cleanup rm -f $tmpfile -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2 From 209f1aa8d669622fa37fb48ecccefe2eea97813d Mon Sep 17 00:00:00 2001 From: Deepankumar Date: Sat, 3 Nov 2018 17:34:04 +0530 Subject: ansible plugin added --- plugins/ansible/README.md | 35 +++++++++++++++++++++++++++++++++++ plugins/ansible/ansible.plugin.zsh | 29 +++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 plugins/ansible/README.md create mode 100644 plugins/ansible/ansible.plugin.zsh (limited to 'plugins') diff --git a/plugins/ansible/README.md b/plugins/ansible/README.md new file mode 100644 index 000000000..38bc13775 --- /dev/null +++ b/plugins/ansible/README.md @@ -0,0 +1,35 @@ +# 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 ` / `arinit` | Creates the Ansible Role as per Ansible Galaxy standard | +| `a` | command `ansible` | +| `aconf` | command `ansible-config` | +| `acon` | command `ansible-console` | +| `aconn` | command `ansible-connection` | +| `ainv` | command `ansible-inventory` | +| `aplay` | 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..0e7aff528 --- /dev/null +++ b/plugins/ansible/ansible.plugin.zsh @@ -0,0 +1,29 @@ +# 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 " + echo "Example : ansible-role-init role1" + fi +} + +# Alias +alias a='ansible ' +alias aconf='ansible-config ' +alias acon='ansible-console ' +alias aconn='ansible-connection ' +alias aver='ansible-version' +alias arinit='ansible-role-init' +alias aplay='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 -- cgit v1.2.3-70-g09d2 From 3d8f2bda599c8c6d160dc448e5ab28aaf2d5e90d Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 13 Nov 2018 10:54:33 +0100 Subject: Revert "transfer: add deprecation notice (#7372)" (#7402) This reverts commit 05b617066ba5a37ef0c533385efd6e232a387b8f. --- plugins/transfer/README.md | 4 ---- plugins/transfer/transfer.plugin.zsh | 10 +--------- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'plugins') diff --git a/plugins/transfer/README.md b/plugins/transfer/README.md index 37c7ca2f7..5fa064445 100644 --- a/plugins/transfer/README.md +++ b/plugins/transfer/README.md @@ -1,9 +1,5 @@ # `transfer` plugin -**NOTICE: The `transfer` plugin is deprecated and will be removed soon, since the [transfer.sh](https://transfer.sh) service will be shutdown on 30th November 30th, 2018. Please move your files to an alternative file sharing service provider.** - ----- - [`transfer.sh`](https://transfer.sh) is an easy to use file sharing service from the command line ## Usage diff --git a/plugins/transfer/transfer.plugin.zsh b/plugins/transfer/transfer.plugin.zsh index 8fd09ef04..7a7cd85ec 100644 --- a/plugins/transfer/transfer.plugin.zsh +++ b/plugins/transfer/transfer.plugin.zsh @@ -12,14 +12,6 @@ # Modified to use tar command instead of zip # -echo -ne '\e[1;33m' -cat <<-EOF - [oh-my-zsh] WARNING: The 'transfer' plugin is deprecated and will be removed after - [oh-my-zsh] transfer.sh shuts down on November 30th. We suggest you stop using the - [oh-my-zsh] plugin and find an alternative file hosting service. -EOF -echo -ne '\e[0m' - curl --version 2>&1 > /dev/null if [ $? -ne 0 ]; then echo "Could not find curl." @@ -72,4 +64,4 @@ transfer() { # cleanup rm -f $tmpfile -} +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From b1424e289375439eef04254f3817dc3fa4b18a8f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 16 Nov 2018 19:40:06 +0100 Subject: tmux: use echoti instead of tput for FreeBSD compatibility Fixes #7407 FreeBSD's tput needs termcap codes instead of terminfo capnames, so using `tput colors` has the wrong effect. See #7407 --- plugins/tmux/tmux.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 7ddf42099..64687641c 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 [[ $(echoti colors) == 256 ]]; then export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR else export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR -- cgit v1.2.3-70-g09d2 From ad69c7a82f25857343f3d57a77466da790f0e65e Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 16 Nov 2018 18:55:07 +0000 Subject: fabric: rename completion back to _fab Fixes #7405 --- plugins/fabric/_fab | 60 ++++++++++++++++++++++++++++++++++++++++ plugins/fabric/_fabric | 60 ---------------------------------------- plugins/fabric/fabric.plugin.zsh | 0 3 files changed, 60 insertions(+), 60 deletions(-) create mode 100644 plugins/fabric/_fab delete mode 100644 plugins/fabric/_fabric create mode 100644 plugins/fabric/fabric.plugin.zsh (limited to 'plugins') diff --git a/plugins/fabric/_fab b/plugins/fabric/_fab new file mode 100644 index 000000000..9628e1224 --- /dev/null +++ b/plugins/fabric/_fab @@ -0,0 +1,60 @@ +#compdef fab +#autoload + +local curcontext=$curcontext state line +declare -A opt_args + +declare target_list +target_list=(`fab --shortlist 2>/dev/null`) + +_targets() { + _describe -t commands "fabric targets" target_list +} + +output_levels=( + 'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.' + 'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!' + 'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.' + 'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.' + 'stdout: Local, or remote, stdout, i.e. non-error output from commands.' + 'stderr: Local, or remote, stderr, i.e. error-related output from commands.' + 'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.' +) + +_arguments -w -S -C \ + '(-)'{-h,--help}'[show this help message and exit]: :->noargs' \ + '(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \ + '(-)--list[print list of possible commands and exit]: :->noargs' \ + '(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \ + '(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \ + '(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \ + "(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \ + '(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \ + '(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \ + '(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \ + '(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \ + '(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \ + '(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \ + '(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \ + '(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \ + '(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \ + '-i+[path to SSH private key file. May be repeated]: :_files' \ + "(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \ + '(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \ + '(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \ + '(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \ + '(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \ + '*::: :->subcmds' && return 0 + +if [[ CURRENT -ge 1 ]]; then + case $state in + noargs) + _message "nothing to complete";; + levels) + _describe -t commands "output levels" output_levels;; + *) + _targets;; + esac + + return +fi diff --git a/plugins/fabric/_fabric b/plugins/fabric/_fabric deleted file mode 100644 index 9628e1224..000000000 --- a/plugins/fabric/_fabric +++ /dev/null @@ -1,60 +0,0 @@ -#compdef fab -#autoload - -local curcontext=$curcontext state line -declare -A opt_args - -declare target_list -target_list=(`fab --shortlist 2>/dev/null`) - -_targets() { - _describe -t commands "fabric targets" target_list -} - -output_levels=( - 'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.' - 'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!' - 'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.' - 'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.' - 'stdout: Local, or remote, stdout, i.e. non-error output from commands.' - 'stderr: Local, or remote, stderr, i.e. error-related output from commands.' - 'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.' -) - -_arguments -w -S -C \ - '(-)'{-h,--help}'[show this help message and exit]: :->noargs' \ - '(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \ - '(-)--list[print list of possible commands and exit]: :->noargs' \ - '(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \ - '(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \ - '(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \ - "(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \ - '(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \ - '(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \ - '(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \ - '(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \ - '(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \ - '(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \ - '(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \ - '(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \ - '(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \ - '-i+[path to SSH private key file. May be repeated]: :_files' \ - "(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \ - '(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \ - '(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \ - '(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \ - '(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \ - '*::: :->subcmds' && return 0 - -if [[ CURRENT -ge 1 ]]; then - case $state in - noargs) - _message "nothing to complete";; - levels) - _describe -t commands "output levels" output_levels;; - *) - _targets;; - esac - - return -fi diff --git a/plugins/fabric/fabric.plugin.zsh b/plugins/fabric/fabric.plugin.zsh new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3-70-g09d2 From e8aba1bf5912f89f408eaebd1bc74c25ba32a62c Mon Sep 17 00:00:00 2001 From: Ricardo Seriani Date: Fri, 16 Nov 2018 18:53:29 -0300 Subject: golang: support "go help environment" in autocompletion (#7404) Signed-off-by: Ricardo Seriani --- plugins/golang/golang.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') 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]' \ -- cgit v1.2.3-70-g09d2 From e780209c33883d0ecab39dd50663e2e1424250c9 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 26 Nov 2018 19:57:52 +0100 Subject: tmux: use $terminfo to avoid echoti errors See https://github.com/robbyrussell/oh-my-zsh/issues/7407#issuecomment-441665143 --- plugins/tmux/tmux.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 64687641c..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 [[ $(echoti 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 -- cgit v1.2.3-70-g09d2 From 0a59baf4c526b95fe6137397be6b1b8b63d1daba Mon Sep 17 00:00:00 2001 From: Sagar Patil Date: Wed, 28 Nov 2018 03:27:07 +0530 Subject: debian: add README (#7438) --- plugins/debian/README.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 plugins/debian/README.md (limited to 'plugins') 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/ *//' | cut -s -d ' ' -f 1 | "' 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|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 | + -- cgit v1.2.3-70-g09d2 From 2614b7ecdfe8b8f0cbeafffefb5925196f4011d4 Mon Sep 17 00:00:00 2001 From: Igor Kapkov Date: Wed, 28 Nov 2018 08:58:36 +1100 Subject: osx: fix rmdsstore function definition (#7443) --- plugins/osx/osx.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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 } -- cgit v1.2.3-70-g09d2 From 990104730c442fa7813e0d2e2cfef79f6c5723fb Mon Sep 17 00:00:00 2001 From: Patrick Artounian Date: Mon, 31 Dec 2018 11:12:34 -0800 Subject: Update docker plugin from upstream docker/cli (#7470) --- plugins/docker/_docker | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins') 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: " \ -- cgit v1.2.3-70-g09d2 From 64976138b643b6adc1f46d9529d1d5fb2aa587e1 Mon Sep 17 00:00:00 2001 From: Andrew Imeson Date: Mon, 31 Dec 2018 14:13:31 -0500 Subject: Add new vagrant commands (#7455) * vagrant: Add `cloud` subcommand to completion * vagrant: Add `port` subcommand to completion * vagrant: Add `validate` subcommand to completion --- plugins/vagrant/_vagrant | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins') 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 ;; -- cgit v1.2.3-70-g09d2 From d0c06d9ec840739623bbc2e1ae0b1f473187d7f2 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Mon, 31 Dec 2018 19:14:22 +0000 Subject: added svcat plugin (#7452) Including a Kubernetes Service Catalog plugin --- plugins/svcat/README.md | 9 +++++++++ plugins/svcat/svcat.plugin.zsh | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 plugins/svcat/README.md create mode 100644 plugins/svcat/svcat.plugin.zsh (limited to 'plugins') 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 -- cgit v1.2.3-70-g09d2 From 3c3766fdf5f64daa4a4e96bee56487314ebcd642 Mon Sep 17 00:00:00 2001 From: Alexander Huynh Date: Mon, 31 Dec 2018 14:15:14 -0500 Subject: Provide even spacing between marks (#7456) Before, when typing the `marks` command, longer mark keys would cause the tabs to spill over to the next tab stop, like so: rc -> /home/ahlex/.rc repos -> /home/ahlex/repos a-longer-string -> /tmp Implement better key display by running through all of the marks twice, once to get the longest key length, and the second time to format everything according to that length: rc -> /home/ahlex/.rc repos -> /home/ahlex/repos a-longer-string -> /tmp --- plugins/jump/jump.plugin.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins') 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 } -- cgit v1.2.3-70-g09d2 From 0cc1266c17204b84255f924f099152c9e4f0383f Mon Sep 17 00:00:00 2001 From: Anton Stamenov Date: Mon, 31 Dec 2018 21:15:56 +0200 Subject: aws_porfiles regex is catching more lines than profiles, thus breaking completion (#7469) --- plugins/aws/aws.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index f78e96ce3..af27e669a 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -35,7 +35,7 @@ function asp { } function aws_profiles { - reply=($(grep profile "${AWS_CONFIG_FILE:-$HOME/.aws/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 -- cgit v1.2.3-70-g09d2 From fabee55948776e2e4c210e9dcd75e7bc38c02bec Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 9 Jan 2019 21:19:52 +0100 Subject: ssh-agent: autoload identities not already loaded (#7174) With this PR the ssh-agent plugin checks the `ssh-add -l` output for the identities added, and adds all those specified by the user that haven't been added yet. We also decouple the logic of starting ssh-agent from the logic of adding identities, meaning that even if ssh-agent has been started by some other means (like launchd) we can still ssh-add the user's identities. Fixes #3019 Fixes #6979 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index fe4946c6d..a688855d0 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -2,20 +2,27 @@ 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 + local -a identities ids zstyle -a :omz:plugins:ssh-agent identities identities - echo starting ssh-agent... - ssh-add $HOME/.ssh/${^identities} + # get list of loaded identities + for line in ${(f)"$(ssh-add -l)"}; do ids+=${${(z)line}[3]}; done + + # add identities if not already loaded + for id in ${^identities}; do + [[ ${ids[(I)$HOME/.ssh/$id]} -le 0 ]] && ssh-add $HOME/.ssh/$id + done } # Get the filename to store/lookup the environment from @@ -42,6 +49,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 -- cgit v1.2.3-70-g09d2 From 2a603856598eafc3c8a0bde80f8a885d2a81dfee Mon Sep 17 00:00:00 2001 From: François Scala Date: Mon, 14 Jan 2019 16:38:45 +0100 Subject: ssh-agent: use key signatures to check loaded ids (#7504) Use fingerprint of ssh key instead of file name to control if the key is already loaded. Also check for .ssh folder presence (#5128) --- plugins/ssh-agent/ssh-agent.plugin.zsh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index a688855d0..2a860f3aa 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -12,16 +12,28 @@ function _start_agent() { } function _add_identities() { - local id line - local -a identities ids + local id line sig + local -a identities loaded signatures zstyle -a :omz:plugins:ssh-agent identities identities - # get list of loaded identities - for line in ${(f)"$(ssh-add -l)"}; do ids+=${${(z)line}[3]}; done + # check for .ssh folder presence + if [[ ! -d $HOME/.ssh ]]; then + return + fi + + # get list of loaded identities' signatures + for line in ${(f)"$(ssh-add -l)"}; do loaded+=${${(z)line}[2]}; done + + # get signatures of private keys + for id in $identities; do + signatures+="$(ssh-keygen -lf "$HOME/.ssh/$id" | awk '{print $2}') $id" + done # add identities if not already loaded - for id in ${^identities}; do - [[ ${ids[(I)$HOME/.ssh/$id]} -le 0 ]] && ssh-add $HOME/.ssh/$id + for sig in $signatures; do + id="$(cut -f2 <<< $sig)" + sig="$(cut -f1 <<< $sig)" + [[ ${loaded[(I)$sig]} -le 0 ]] && ssh-add $HOME/.ssh/$id done } -- cgit v1.2.3-70-g09d2 From 9329efd2522b3eaba5f6d9d53e41c090eb6b3c92 Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 14 Jan 2019 16:42:14 +0100 Subject: ssh-agent: autoload identities in one go (#7507) With this PR the ssh-agent plugin loads all identities which are not yet loaded in a single call to ssh-add. If a passphrase is shared between loaded identities it only needs to be entered once. Fixes #7506 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 2a860f3aa..1cc5630e1 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -13,7 +13,7 @@ function _start_agent() { function _add_identities() { local id line sig - local -a identities loaded signatures + local -a identities loaded not_loaded signatures zstyle -a :omz:plugins:ssh-agent identities identities # check for .ssh folder presence @@ -33,8 +33,10 @@ function _add_identities() { for sig in $signatures; do id="$(cut -f2 <<< $sig)" sig="$(cut -f1 <<< $sig)" - [[ ${loaded[(I)$sig]} -le 0 ]] && ssh-add $HOME/.ssh/$id + [[ ${loaded[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id" done + + if [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded} } # Get the filename to store/lookup the environment from -- cgit v1.2.3-70-g09d2 From 586ca16902d9dae4d95d5256a824572f60219c83 Mon Sep 17 00:00:00 2001 From: "Ing. Jan Kaláb" Date: Tue, 15 Jan 2019 19:03:07 +0100 Subject: extract: add AAR Android archive support (#7511) --- plugins/extract/README.md | 1 + plugins/extract/_extract | 2 +- plugins/extract/extract.plugin.zsh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') 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) -- cgit v1.2.3-70-g09d2 From 9d1dd24e3568ebbcce093bb351ea776a0bf2c0ff Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 19 Jan 2019 18:00:04 +0100 Subject: ssh-agent: add default keys if no zstyle identities were set (#7520) --- plugins/ssh-agent/ssh-agent.plugin.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 1cc5630e1..0a204309e 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -21,6 +21,16 @@ function _add_identities() { 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 for line in ${(f)"$(ssh-add -l)"}; do loaded+=${${(z)line}[2]}; done @@ -36,7 +46,7 @@ function _add_identities() { [[ ${loaded[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id" done - if [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded} + [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded} } # Get the filename to store/lookup the environment from -- cgit v1.2.3-70-g09d2 From 3c16466a14516eb3c177e7eb0553adbe16f39890 Mon Sep 17 00:00:00 2001 From: neeasade Date: Sun, 20 Jan 2019 13:19:07 -0600 Subject: git: quote branch name in ggpull and ggpush (#7472) --- plugins/git/git.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 45a706173..2251bae2e 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -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)' -- cgit v1.2.3-70-g09d2 From c4948696328eab3b954932eb940ec8ec97b12906 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 21 Jan 2019 20:31:30 +0100 Subject: ssh-agent: check for loaded id filenames first (#7521) This change makes the plugin check if an identity is loaded by looking first at the key filename reported by `ssh-add -l`. This fixes the use case where ssh-keygen is not able to output the fingerprint of a key, such as the one reported on #7516. Now, for an identity to be passed onto ssh-add, it has to fail the match for a loaded identity, both filename and signature. --- plugins/ssh-agent/ssh-agent.plugin.zsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 0a204309e..a7a4ee33a 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -13,7 +13,7 @@ function _start_agent() { function _add_identities() { local id line sig - local -a identities loaded not_loaded signatures + local -a identities loaded_sigs loaded_ids not_loaded zstyle -a :omz:plugins:ssh-agent identities identities # check for .ssh folder presence @@ -31,19 +31,19 @@ function _add_identities() { done fi - # get list of loaded identities' signatures - for line in ${(f)"$(ssh-add -l)"}; do loaded+=${${(z)line}[2]}; done - - # get signatures of private keys - for id in $identities; do - signatures+="$(ssh-keygen -lf "$HOME/.ssh/$id" | awk '{print $2}') $id" + # 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 sig in $signatures; do - id="$(cut -f2 <<< $sig)" - sig="$(cut -f1 <<< $sig)" - [[ ${loaded[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id" + 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} -- cgit v1.2.3-70-g09d2 From ea6ec09b9c7752ee0e074659ca0689d0af053e5a Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 25 Jan 2019 12:16:20 +0100 Subject: cake: add README (#7473) --- plugins/cake/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/cake/README.md (limited to 'plugins') 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. -- cgit v1.2.3-70-g09d2 From 932d611c90b979078f4cdd37a20e2bf12e400a84 Mon Sep 17 00:00:00 2001 From: Bartlomiej Tartanus Date: Wed, 30 Jan 2019 16:22:14 +0100 Subject: git: properly indent ggfl function (#7556) Fixes (probably MacOS) issue: > ggfl zsh: command not found: ggfl --- plugins/git/git.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 2251bae2e..12400ede4 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 -- cgit v1.2.3-70-g09d2 From 83ce8d05dfefacf1d4a7fdc957f38b3bd6cba6b4 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 30 Jan 2019 16:35:16 +0100 Subject: transfer: add newline after showing the link Fixes #7562 --- plugins/transfer/transfer.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') 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 +} -- cgit v1.2.3-70-g09d2