diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/command-not-found/README.md | 31 | ||||
-rw-r--r-- | plugins/dirpersist/README.md | 9 | ||||
-rw-r--r-- | plugins/kitchen/README.md | 9 | ||||
-rw-r--r-- | plugins/pylint/README.md | 15 | ||||
-rw-r--r-- | plugins/scala/README.md | 15 | ||||
-rw-r--r-- | plugins/systemadmin/README.md | 61 | ||||
-rw-r--r-- | plugins/virtualenv/README.md | 15 |
7 files changed, 155 insertions, 0 deletions
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 <selected package> +``` + +### 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. 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) +``` 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) +``` 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 | | 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 | 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 | <code>ps -e -orss=,args= \| sort -b -k1,1n</code> | Display the processes using the most memory | +| psmem10| <code>ps -e -orss=,args= \| sort -b -k1,1n\| head -10</code> | Display the top 10 processes using the most memory | +| pscpu | <code>ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr</code> | Display the top processes using the most CPU | +| pscpu10| <code>ps -e -o pcpu,cpu,nice,state,cputime,args\|sort -k1 -nr \| head -10</code> | Display the top 10 processes using the most CPU | +| hist10 | <code>print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10</code> | 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 | 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 `]`. |