From dd30cf104c9ca42d89d26a134382ca421869ce7e Mon Sep 17 00:00:00 2001 From: Aleksandr Kozlov Date: Mon, 22 Jan 2018 12:54:02 +0300 Subject: [PATCH 001/591] Added kgpall alias --- plugins/kubectl/kubectl.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 88177b5a0..3c6e8045c 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -24,6 +24,7 @@ alias klp='k logs pods' alias kep='k edit pods' alias kdp='k describe pods' alias kdelp='k delete pods' +alias kgpall='k get pods --all-namespaces -o wide' # Service management. alias kgs='k get svc' From edbd86cd956266ee80f6b128588f5673f0cdb3c7 Mon Sep 17 00:00:00 2001 From: Sayan Roy Date: Sun, 7 Jun 2020 12:14:55 +0530 Subject: [PATCH 002/591] Updating some gem command reference # Updating some gem command reference gem_info,gem help , etc. --- plugins/ruby/ruby.plugin.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/ruby/ruby.plugin.zsh b/plugins/ruby/ruby.plugin.zsh index 177b35b31..88e769d39 100644 --- a/plugins/ruby/ruby.plugin.zsh +++ b/plugins/ruby/ruby.plugin.zsh @@ -12,3 +12,14 @@ alias rb="ruby" alias gin="gem install" alias gun="gem uninstall" alias gli="gem list" +alias gi="gem info" +alias giall="gem info --all" +alias gca="gem cert --add" +alias gcr="gem cert --remove" +alias gcb="gem cert --build" +alias gclup="gem cleanup -n" +alias ggi="gem generate_index" +alias gh="gem help" +alias gl="gem lock" +alias go="gem open" +alias goe="gem open -e" From c268d176bf5e1efbf31bb1f3c00c182c1b369e9b Mon Sep 17 00:00:00 2001 From: Sayan Roy Date: Tue, 9 Jun 2020 00:48:50 +0530 Subject: [PATCH 003/591] Updating the README.md --- plugins/ruby/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/ruby/README.md b/plugins/ruby/README.md index ad2755bbf..a4a9c5036 100644 --- a/plugins/ruby/README.md +++ b/plugins/ruby/README.md @@ -18,3 +18,14 @@ plugins=(... ruby) | gin | `gem install` | Install a gem into the local repository | | gun | `gem uninstall` | Uninstall gems from the local repository | | gli | `gem list` | Display gems installed locally | +| gi | `gem info` | Show information for the given gem | +| giall | `gem info --all` | Display all gem versions | +| gca | `gem cert --add` | Add a trusted certificate | +| gcr | `gem cert --remove` | Remove a trusted certificate | +| gcb | `gem cert --build` | Build private key and self-signed certificate | +| gclup | `gem cleanup -n` | Do not uninstall gem | +| ggi | `gem generate_index` | Generate index file for gem server | +| gh | `gem help` | Provide additional help | +| gl | `gem lock` | Generate a lockdown list of gems | +| go | `gem open` | Open gem source in default editor | +| goe | `gem open -e` | Open gem sources in preferred editor | From e751d2519d586a2c022beeb0b40dfe9b7a1ed6eb Mon Sep 17 00:00:00 2001 From: Sayan Roy Date: Wed, 1 Jul 2020 08:58:27 +0530 Subject: [PATCH 004/591] spacing changed --- plugins/ruby/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ruby/README.md b/plugins/ruby/README.md index a4a9c5036..a2de11991 100644 --- a/plugins/ruby/README.md +++ b/plugins/ruby/README.md @@ -19,7 +19,7 @@ plugins=(... ruby) | gun | `gem uninstall` | Uninstall gems from the local repository | | gli | `gem list` | Display gems installed locally | | gi | `gem info` | Show information for the given gem | -| giall | `gem info --all` | Display all gem versions | +| giall | `gem info --all` | Display all gem versions | | gca | `gem cert --add` | Add a trusted certificate | | gcr | `gem cert --remove` | Remove a trusted certificate | | gcb | `gem cert --build` | Build private key and self-signed certificate | From 70ab2928a5ecd2513d4f6a67beb10f79d64d5172 Mon Sep 17 00:00:00 2001 From: "kalle (jag)" Date: Mon, 3 May 2021 16:35:28 +0200 Subject: [PATCH 005/591] feat(plugins): add `gh` plugin for GitHub CLI (#9557) --- plugins/gh/.gitignore | 1 + plugins/gh/README.md | 23 +++++++++++++++++++++++ plugins/gh/gh.plugin.zsh | 13 +++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 plugins/gh/.gitignore create mode 100644 plugins/gh/README.md create mode 100644 plugins/gh/gh.plugin.zsh diff --git a/plugins/gh/.gitignore b/plugins/gh/.gitignore new file mode 100644 index 000000000..fa1244ab5 --- /dev/null +++ b/plugins/gh/.gitignore @@ -0,0 +1 @@ +_gh diff --git a/plugins/gh/README.md b/plugins/gh/README.md new file mode 100644 index 000000000..54e046a1c --- /dev/null +++ b/plugins/gh/README.md @@ -0,0 +1,23 @@ +# GitHub CLI plugin + +This plugin adds completion for the [GitHub CLI](https://cli.github.com/). + +To use it, add `gh` to the plugins array in your zshrc file: + +```zsh +plugins=(... gh) +``` + +This plugin does not add any aliases. + +## Cache + +This plugin caches the completion script and is automatically updated when the +plugin is loaded, which is usually when you start up a new terminal emulator. + +The cache is stored at: + +- `$ZSH/plugins/gh/_gh` completions script + +- `$ZSH_CACHE_DIR/gh_version` version of GitHub CLI, used to invalidate + the cache. diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh new file mode 100644 index 000000000..8e055ec35 --- /dev/null +++ b/plugins/gh/gh.plugin.zsh @@ -0,0 +1,13 @@ +# Autocompletion for the GitHub CLI (gh). + +if (( $+commands[gh] )); then + if [[ ! -r "$ZSH_CACHE_DIR/gh_version" \ + || "$(gh --version)" != "$(< "$ZSH_CACHE_DIR/gh_version")" + || ! -f "$ZSH/plugins/gh/_gh" ]]; then + gh completion --shell zsh > $ZSH/plugins/gh/_gh + gh --version > $ZSH_CACHE_DIR/gh_version + fi + autoload -Uz _gh + _comps[gh]=_gh +fi + From f4de8c5b3a977d67ecbd302f24463dc00667eb40 Mon Sep 17 00:00:00 2001 From: sevendials Date: Mon, 3 May 2021 07:49:41 -0700 Subject: [PATCH 006/591] fix(command-not-found): remove invalid argument for PackageKit (#9876) `pk-command-not-found` doesn't accept `--` as an argument. This is what happens when `--` is the first argument: ``` $ gem zsh: --: command not found... ``` --- plugins/command-not-found/command-not-found.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index cbf9a0a8e..3ec13429c 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -38,7 +38,7 @@ fi if [[ -x /usr/libexec/pk-command-not-found ]]; then command_not_found_handler() { if [[ -S /var/run/dbus/system_bus_socket && -x /usr/libexec/packagekitd ]]; then - /usr/libexec/pk-command-not-found -- "$@" + /usr/libexec/pk-command-not-found "$@" return $? fi From 4e8ffe88d4311edcd084de5efd4ee6688e9e70f7 Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Mon, 3 May 2021 10:59:45 -0400 Subject: [PATCH 007/591] fix(cargo): complete flags for default cargo aliases (#9692) By default, cargo provides alias for some commonly used functions. This patch makes it that those alias will complete the same as their full commands. Default alias: b -> build c -> check t -> test r -> run Since cargo allows users to define custom alias it would be nice if oh-my-zsh automatically detected those and preformed completions as such but that would be a much more complex patch. --- plugins/cargo/_cargo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/cargo/_cargo b/plugins/cargo/_cargo index ffc9fcdc8..ebff99310 100644 --- a/plugins/cargo/_cargo +++ b/plugins/cargo/_cargo @@ -77,7 +77,7 @@ _cargo() { '*:args:_default' ;; - build) + build|b) _arguments -s -S $common $parallel $features $msgfmt $triple $target $manifest \ '--all-targets[equivalent to specifying --lib --bins --tests --benches --examples]' \ "${command_scope_spec[@]}" \ @@ -86,7 +86,7 @@ _cargo() { '--build-plan[output the build plan in JSON]' \ ;; - check) + check|c) _arguments -s -S $common $parallel $features $msgfmt $triple $target $manifest \ '--all-targets[equivalent to specifying --lib --bins --tests --benches --examples]' \ "${command_scope_spec[@]}" \ @@ -224,7 +224,7 @@ _cargo() { _arguments -s -S $common $manifest ;; - run) + run|r) _arguments -s -S $common $parallel $features $msgfmt $triple $target $manifest \ '--example=[name of the bin target]:name' \ '--bin=[name of the bin target]:name' \ @@ -259,7 +259,7 @@ _cargo() { '*: :_guard "^-*" "query"' ;; - test) + test|t) _arguments -s -S $common $parallel $features $msgfmt $triple $target $manifest \ '--test=[test name]: :_cargo_test_names' \ '--no-fail-fast[run all tests regardless of failure]' \ From d646884add277d134235a9b18ab755388d6e0d8d Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 3 May 2021 20:05:13 +0430 Subject: [PATCH 008/591] feat(git): add aliases `gcas` and `gcasm` for commit with sign-off (#8881) --- plugins/git/README.md | 2 ++ plugins/git/git.plugin.zsh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/git/README.md b/plugins/git/README.md index 6ad19543e..4f051db8d 100644 --- a/plugins/git/README.md +++ b/plugins/git/README.md @@ -41,6 +41,8 @@ plugins=(... git) | gcan! | git commit -v -a --no-edit --amend | | gcans! | git commit -v -a -s --no-edit --amend | | gcam | git commit -a -m | +| gcas | git commit -a -s | +| gcasm | git commit -a -s -m | | gcsm | git commit -s -m | | gcb | git checkout -b | | gcf | git config --list | diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index e815d0787..35ebfbfa3 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -80,6 +80,8 @@ alias gcan!='git commit -v -a --no-edit --amend' alias gcans!='git commit -v -a -s --no-edit --amend' alias gcam='git commit -a -m' alias gcsm='git commit -s -m' +alias gcas='git commit -a -s' +alias gcasm='git commit -a -s -m' alias gcb='git checkout -b' alias gcf='git config --list' alias gcl='git clone --recurse-submodules' From 1bda62dffadf175091fe144cb423db348e3029df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 21 May 2021 21:57:34 +0200 Subject: [PATCH 009/591] feat(shrink-path): add ability to toggle off path shrinking (#9794) --- plugins/shrink-path/README.md | 87 +++++++++++++++------- plugins/shrink-path/shrink-path.plugin.zsh | 12 +++ 2 files changed, 73 insertions(+), 26 deletions(-) diff --git a/plugins/shrink-path/README.md b/plugins/shrink-path/README.md index 33dc3f8ae..71a242b2c 100644 --- a/plugins/shrink-path/README.md +++ b/plugins/shrink-path/README.md @@ -1,43 +1,50 @@ -# A plugin to shrink directory paths for brevity and pretty-printing +# shrink-path +A plugin to shrink directory paths for brevity and pretty-printing. + +To use it, add `shrink-path` to the plugins array in your zshrc file: + +```zsh +plugins=(... shrink-path) +``` ## Examples For this directory tree: ``` - /home/ - me/ - f o o/ # The prefix f is ambiguous between "f o o" and "f i g". - bar/ - quux/ - biz/ # The prefix b is ambiguous between bar and biz. - f i g/ - baz/ +/home/ + me/ + f o o/ # The prefix f is ambiguous between "f o o" and "f i g". + bar/ + quux/ + biz/ # The prefix b is ambiguous between bar and biz. + f i g/ + baz/ ``` here are the results of calling `shrink_path