summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/arcanist/README.md2
-rw-r--r--plugins/colorize/README.md20
-rw-r--r--plugins/colorize/colorize.plugin.zsh2
-rw-r--r--plugins/extract/README.md4
-rw-r--r--plugins/extract/_extract2
-rw-r--r--plugins/extract/extract.plugin.zsh6
-rw-r--r--plugins/fasd/README.md4
-rw-r--r--plugins/fzf/fzf.plugin.zsh6
-rw-r--r--plugins/keychain/keychain.plugin.zsh2
-rw-r--r--plugins/sbt/README.md10
-rw-r--r--plugins/sbt/_sbt20
-rw-r--r--plugins/sbt/sbt.plugin.zsh10
-rw-r--r--plugins/tmux/README.md3
-rw-r--r--plugins/tmux/tmux.plugin.zsh3
-rw-r--r--plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh10
-rw-r--r--plugins/yarn/README.md1
-rw-r--r--plugins/yarn/yarn.plugin.zsh1
17 files changed, 66 insertions, 40 deletions
diff --git a/plugins/arcanist/README.md b/plugins/arcanist/README.md
index 4bb8c8090..f2ca8cf55 100644
--- a/plugins/arcanist/README.md
+++ b/plugins/arcanist/README.md
@@ -2,4 +2,4 @@
**Maintainer:** [@emzar](https://github.com/emzar)
-This plugin adds many useful aliases.
+This plugin adds many useful aliases for [arcanist](https://github.com/phacility/arcanist).
diff --git a/plugins/colorize/README.md b/plugins/colorize/README.md
index 8971fa011..d37443011 100644
--- a/plugins/colorize/README.md
+++ b/plugins/colorize/README.md
@@ -6,12 +6,22 @@ Colorize will highlight the content based on the filename extension. If it can't
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.
-To use it, add colorize to the plugins array of your zshrc file:
+## Setup
+
+To use it, add colorize to the plugins array of your `~/.zshrc` file:
```
plugins=(... colorize)
```
+
## Configuration
+### Requirements
+
+This plugin requires that either of the following tools be installed:
+
+* Chroma: [https://github.com/alecthomas/chroma](https://github.com/alecthomas/chroma)
+* Pygments be installed: [pygments.org](https://pygments.org/)
+
### Colorize tool
Colorize supports `pygmentize` and `chroma` as syntax highlighter. By default colorize uses `pygmentize` unless it's not installed and `chroma` is. This can be overridden by the `ZSH_COLORIZE_TOOL` environment variable:
@@ -30,7 +40,7 @@ ZSH_COLORIZE_STYLE="colorful"
## Usage
-* `ccat <file> [files]`: colorize the contents of the file (or files, if more than one are provided).
+* `ccat <file> [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.
* `cless <file> [files]`: colorize the contents of the file (or files, if more than one are provided) and
@@ -40,9 +50,3 @@ Note that `cless` will behave as less when provided more than one file: you have
the commands `:n` for next and `:p` for previous. The downside is that less options are not supported.
But you can circumvent this by either using the LESS environment variable, or by running `ccat file1 file2|less --opts`.
In the latter form, the file contents will be concatenated and presented by less as a single file.
-
-## Requirements
-
-You have to either install Pygments: [pygments.org](http://pygments.org/download.html)
-
-Or install chroma: [https://github.com/alecthomas/chroma](https://github.com/alecthomas/chroma)
diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
index e250397be..3e91a9f46 100644
--- a/plugins/colorize/colorize.plugin.zsh
+++ b/plugins/colorize/colorize.plugin.zsh
@@ -63,7 +63,7 @@ colorize_via_pygmentize() {
colorize_via_pygmentize_less() (
# this function is a subshell so tmp_files can be shared to cleanup function
- declare -a tmp_files
+ declare -a tmp_files
cleanup () {
[[ ${#tmp_files} -gt 0 ]] && rm -f "${tmp_files[@]}"
diff --git a/plugins/extract/README.md b/plugins/extract/README.md
index 41b6a61f1..d6e4fa116 100644
--- a/plugins/extract/README.md
+++ b/plugins/extract/README.md
@@ -32,17 +32,21 @@ plugins=(... extract)
| `tar` | Tarball |
| `tar.bz2` | Tarball with bzip2 compression |
| `tar.gz` | Tarball with gzip compression |
+| `tar.lz` | Tarball with lzip compression |
| `tar.xz` | Tarball with lzma2 compression |
| `tar.zma` | Tarball with lzma compression |
+| `tar.zst` | Tarball with zstd compression |
| `tbz` | Tarball with bzip compression |
| `tbz2` | Tarball with bzip2 compression |
| `tgz` | Tarball with gzip compression |
| `tlz` | Tarball with lzma compression |
| `txz` | Tarball with lzma2 compression |
+| `tzst` | Tarball with zstd compression |
| `war` | Web Application archive (Java-based) |
| `xpi` | Mozilla XPI module file |
| `xz` | LZMA2 archive |
| `zip` | Zip archive |
+| `zst` | Zstandard file (zstd) |
See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for
more information regarding archive formats.
diff --git a/plugins/extract/_extract b/plugins/extract/_extract
index 0257ce231..e9d12d4d3 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|aar|bz2|deb|gz|ipsw|jar|lzma|rar|rpm|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|rpm|sublime-package|tar|tar.bz2|tar.gz|tar.lz|tar.xz|tar.zma|tar.zst|tbz|tbz2|tgz|tlz|txz|tzst|war|whl|xpi|xz|zip|zst)(-.)'" \
&& return 0
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
index 27b9e50f1..5cc30d1ce 100644
--- a/plugins/extract/extract.plugin.zsh
+++ b/plugins/extract/extract.plugin.zsh
@@ -40,7 +40,12 @@ extract() {
tar --lzma --help &> /dev/null \
&& tar --lzma -xvf "$1" \
|| lzcat "$1" | tar xvf - ;;
+ (*.tar.zst|*.tzst)
+ tar --zstd --help &> /dev/null \
+ && tar --zstd -xvf "$1" \
+ || zstdcat "$1" | tar xvf - ;;
(*.tar) tar xvf "$1" ;;
+ (*.tar.lz) (( $+commands[lzip] )) && tar xvf "$1" ;;
(*.gz) (( $+commands[pigz] )) && pigz -dk "$1" || gunzip -k "$1" ;;
(*.bz2) bunzip2 "$1" ;;
(*.xz) unxz "$1" ;;
@@ -59,6 +64,7 @@ extract() {
cd ..; rm *.tar.* debian-binary
cd ..
;;
+ (*.zst) unzstd "$1" ;;
(*)
echo "extract: '$1' cannot be extracted" >&2
success=1
diff --git a/plugins/fasd/README.md b/plugins/fasd/README.md
index 1641a92d0..a5c74e5b8 100644
--- a/plugins/fasd/README.md
+++ b/plugins/fasd/README.md
@@ -5,7 +5,7 @@
To use it, add `fasd` to the plugins array in your zshrc file:
```zsh
-plugins=(... fd)
+plugins=(... fasd)
```
## Installation
@@ -18,4 +18,4 @@ Please find detailed installation guide [`here`](https://github.com/clvv/fasd#in
|-------|-------------------------------------------|-------------------------------------------------------------|
| v | `fasd -f -e "$EDITOR"` | List frequent/recent files matching the given filename. |
| o | `fasd -a -e xdg-open` | List frequent/recent files and directories matching. |
-| j | `fasd_cd -d -i` | cd with interactive selection | \ No newline at end of file
+| j | `fasd_cd -d -i` | cd with interactive selection |
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh
index fe471a363..c8aefd7ab 100644
--- a/plugins/fzf/fzf.plugin.zsh
+++ b/plugins/fzf/fzf.plugin.zsh
@@ -12,6 +12,7 @@ function setup_using_base_dir() {
"${HOME}/.fzf"
"/usr/local/opt/fzf"
"/usr/share/fzf"
+ "/usr/local/share/examples/fzf"
)
for dir in ${fzfdirs}; do
if [[ -d "${dir}" ]]; then
@@ -67,7 +68,10 @@ function setup_using_debian_package() {
# NOTE: There is no need to configure PATH for debian package, all binaries
# are installed to /usr/bin by default
- local completions="/usr/share/zsh/vendor-completions/_fzf"
+ # Determine completion file path: first bullseye/sid, then buster/stretch
+ local completions="/usr/share/doc/fzf/examples/completion.zsh"
+ [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf"
+
local key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh"
# Auto-completion
diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh
index af34793e7..def97d8d1 100644
--- a/plugins/keychain/keychain.plugin.zsh
+++ b/plugins/keychain/keychain.plugin.zsh
@@ -15,7 +15,7 @@ function _start_agent() {
zstyle -a :omz:plugins:keychain options options
# start keychain...
- keychain ${^options:-} --agents ${agents:-gpg} ${^identities}
+ keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
# Get the filenames to store/lookup the environment from
_keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh"
diff --git a/plugins/sbt/README.md b/plugins/sbt/README.md
index f1a5753b9..f0201938e 100644
--- a/plugins/sbt/README.md
+++ b/plugins/sbt/README.md
@@ -17,16 +17,16 @@ plugins=(... sbt)
| 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 |
+| sbcq | `sbt consoleQuick` | Starts Scala with all dependencies |
+| sbcp | `sbt consoleProject` | 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 |
+| sbgi | `sbt genIdea` | Create Idea project files |
| sbp | `sbt publish` | Publishes artifacts to the repository |
-| sbpl | `sbt publish-local` | Publishes artifacts to the local Ivy repository |
+| sbpl | `sbt publishLocal` | 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 |
+| sbrm | `sbt runMain` | 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 |
diff --git a/plugins/sbt/_sbt b/plugins/sbt/_sbt
index a601c9b97..2138a722f 100644
--- a/plugins/sbt/_sbt
+++ b/plugins/sbt/_sbt
@@ -6,23 +6,23 @@ _sbt_commands=(
'clean:delete files produced by the build'
'compile:compile sources'
'console:start the Scala REPL with project classes on the classpath'
- 'console-quick:start the Scala REPL with project deps on the classpath'
- 'console-project:start the Scala REPL w/sbt+build-def on the classpath'
+ 'consoleQuick:start the Scala REPL with project deps on the classpath'
+ 'consoleProject:start the Scala REPL w/sbt+build-def on the classpath'
'dist:generate distribution artifacts'
'dist\:clean:clean distribution artifacts'
'doc:generate API documentation'
- 'gen-idea:generate Intellij Idea project files'
+ 'genIdea:generate Intellij Idea project files'
'package:produce the main artifact, such as a binary jar'
- 'package-doc:produce a doc artifact, such as a jar containing API docs'
- 'package-src:produce a source artifact, such as a jar containing sources'
+ 'packageDoc:produce a doc artifact, such as a jar containing API docs'
+ 'packageSrc:produce a source artifact, such as a jar containing sources'
'publish:publish artifacts to a repository'
- 'publish-local:publish artifacts to the local repository'
- 'publish-m2:publish artifacts to the local Maven 2 repository'
+ 'publishLocal:publish artifacts to the local repository'
+ 'publishM2:publish artifacts to the local Maven 2 repository'
'run:run a main class'
- 'run-main:run the main class selected by the first argument'
+ 'runMain:run the main class selected by the first argument'
'test:execute all tests'
- 'test-only:execute the tests provided as arguments'
- 'test-quick:execute previously failed tests'
+ 'testOnly:execute the tests provided as arguments'
+ 'testQuick:execute previously failed tests'
'update:resolve and optionally retrieve dependencies'
)
diff --git a/plugins/sbt/sbt.plugin.zsh b/plugins/sbt/sbt.plugin.zsh
index f883b7fee..851302c68 100644
--- a/plugins/sbt/sbt.plugin.zsh
+++ b/plugins/sbt/sbt.plugin.zsh
@@ -9,17 +9,17 @@
alias sbc='sbt compile'
alias sbcc='sbt clean compile'
alias sbco='sbt console'
-alias sbcq='sbt console-quick'
+alias sbcq='sbt consoleQuick'
alias sbcln='sbt clean'
-alias sbcp='sbt console-project'
+alias sbcp='sbt consoleProject'
alias sbd='sbt doc'
alias sbdc='sbt dist:clean'
alias sbdi='sbt dist'
-alias sbgi='sbt gen-idea'
+alias sbgi='sbt genIdea'
alias sbp='sbt publish'
-alias sbpl='sbt publish-local'
+alias sbpl='sbt publishLocal'
alias sbr='sbt run'
-alias sbrm='sbt run-main'
+alias sbrm='sbt runMain'
alias sbu='sbt update'
alias sbx='sbt test'
alias sba='sbt assembly'
diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md
index 1e25af38f..db57f5be2 100644
--- a/plugins/tmux/README.md
+++ b/plugins/tmux/README.md
@@ -37,4 +37,5 @@ The plugin also supports the following -
| `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` |
-| `ZSH_TMUX_CONFIG` | Set the configuration path (default: `$HOME/.tmux.conf`) | \ No newline at end of file
+| `ZSH_TMUX_CONFIG` | Set the configuration path (default: `$HOME/.tmux.conf`) |
+| `ZSH_TMUX_UNICODE` | Set `tmux -u` option to support unicode |
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index dad3db578..e52443a71 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -36,6 +36,8 @@ alias tkss='tmux kill-session -t'
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
# Set the configuration path
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
+# Set -u option to support unicode
+: ${ZSH_TMUX_UNICODE:=false}
# Determine if the terminal supports 256 colors
if [[ $terminfo[colors] == 256 ]]; then
@@ -62,6 +64,7 @@ function _zsh_tmux_plugin_run() {
local -a tmux_cmd
tmux_cmd=(command tmux)
[[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
+ [[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
# Try to connect to an existing session.
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
index 2a4b43189..b07b2a306 100644
--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
@@ -77,6 +77,12 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
else
ENV_NAME=""
fi
+
+ if [[ -n $CD_VIRTUAL_ENV && "$ENV_NAME" != "$CD_VIRTUAL_ENV" ]]; then
+ # We've just left the repo, deactivate the environment
+ # Note: this only happens if the virtualenv was activated automatically
+ deactivate && unset CD_VIRTUAL_ENV
+ fi
if [[ "$ENV_NAME" != "" ]]; then
# Activate the environment only if it is not already active
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then
@@ -86,10 +92,6 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME"
fi
fi
- elif [[ -n $CD_VIRTUAL_ENV && -n $VIRTUAL_ENV ]]; then
- # We've just left the repo, deactivate the environment
- # Note: this only happens if the virtualenv was activated automatically
- deactivate && unset CD_VIRTUAL_ENV
fi
fi
}
diff --git a/plugins/yarn/README.md b/plugins/yarn/README.md
index e6daae44f..05f18a499 100644
--- a/plugins/yarn/README.md
+++ b/plugins/yarn/README.md
@@ -27,6 +27,7 @@ plugins=(... yarn)
| 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` |
+| yln | `yarn lint` | Run the lint script 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 |
diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh
index 18c5dcc89..9cfcb7539 100644
--- a/plugins/yarn/yarn.plugin.zsh
+++ b/plugins/yarn/yarn.plugin.zsh
@@ -12,6 +12,7 @@ alias ygu="yarn global upgrade"
alias yh="yarn help"
alias yi="yarn init"
alias yin="yarn install"
+alias yln="yarn lint"
alias yls="yarn list"
alias yout="yarn outdated"
alias yp="yarn pack"