diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/encode64/README.md | 69 | ||||
-rw-r--r-- | plugins/grunt/README.md | 37 | ||||
-rw-r--r-- | plugins/jump/jump.plugin.zsh | 2 |
3 files changed, 107 insertions, 1 deletions
diff --git a/plugins/encode64/README.md b/plugins/encode64/README.md new file mode 100644 index 000000000..9850da85f --- /dev/null +++ b/plugins/encode64/README.md @@ -0,0 +1,69 @@ +# encode64 + +Alias plugin for encoding or decoding using `base64` command + +## Functions and Aliases + +| Function | Alias | Description | +| ---------- | ----- | ------------------------------ | +| `encode64` | `e64` | Encodes given data to base64 | +| `decode64` | `d64` | Decodes given data from base64 | + +## Enabling plugin + +1. Edit your `.zshrc` file and add `encode64` to the list of plugins: + + ```sh + plugins=( + # ...other enabled plugins + encode64 + ) + ``` + +2. Restart your terminal session or reload configuration by running: + + ```sh + source ~/.zshrc + ``` + +## Usage and examples + +### Encoding + +- From parameter + + ```console + $ encode64 "oh-my-zsh" + b2gtbXktenNo + $ e64 "oh-my-zsh" + b2gtbXktenNo + ``` + +- From piping + + ```console + $ echo "oh-my-zsh" | encode64 + b2gtbXktenNo== + $ echo "oh-my-zsh" | e64 + b2gtbXktenNo== + ``` + +### Decoding + +- From parameter + + ```console + $ decode64 b2gtbXktenNo + oh-my-zsh% + $ d64 b2gtbXktenNo + oh-my-zsh% + ``` + +- From piping + + ```console + $ echo "b2gtbXktenNoCg==" | decode64 + oh-my-zsh + $ echo "b2gtbXktenNoCg==" | decode64 + oh-my-zsh + ``` diff --git a/plugins/grunt/README.md b/plugins/grunt/README.md new file mode 100644 index 000000000..a69a9b7fc --- /dev/null +++ b/plugins/grunt/README.md @@ -0,0 +1,37 @@ +# grunt plugin + +This plugin adds completions for [grunt](https://github.com/gruntjs/grunt). + +To use it, add `grunt` to the plugins array of your `.zshrc` file: +```zsh +plugins=(... grunt) +``` + +## Enable caching + +If you want to use the cache, set the following in your `.zshrc`: +```zsh +zstyle ':completion:*' use-cache yes +``` + +## Settings + +* Show grunt file path: + ```zsh + zstyle ':completion::complete:grunt::options:' show_grunt_path yes + ``` +* Cache expiration days (default: 7): + ```zsh + zstyle ':completion::complete:grunt::options:' expire 1 + ``` +* Not update options cache if target gruntfile is changed. + ```zsh + zstyle ':completion::complete:grunt::options:' no_update_options yes + ``` + +Note that if you change the zstyle settings, you should delete the cache file and restart zsh. + +```zsh +$ rm ~/.zcompcache/grunt +$ exec zsh +``` diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 168dfaba2..a19a86022 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -19,7 +19,7 @@ mark() { MARK="$1" fi if read -q \?"Mark $PWD as ${MARK}? (y/n) "; then - mkdir -p "$MARKPATH"; ln -s "$PWD" "$MARKPATH/$MARK" + mkdir -p "$MARKPATH"; ln -sfn "$PWD" "$MARKPATH/$MARK" fi } |