From 08b04f5df2b9a4747b8f8975785bdcd523d85445 Mon Sep 17 00:00:00 2001 From: mickk-on-cpp Date: Fri, 28 Feb 2020 17:27:16 +0100 Subject: fancy-ctrl-z: ensure widgets are called with full context (#4838) This allows other plugins that hook e.g. accept-line to identify the fancy-ctrl-z widget as the caller and take appropriate steps when necessary. See https://github.com/tarruda/zsh-autosuggestions/issues/82#issuecomment-181133379 --- plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh index 8ab297913..82b968894 100644 --- a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh +++ b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh @@ -1,10 +1,10 @@ fancy-ctrl-z () { if [[ $#BUFFER -eq 0 ]]; then BUFFER="fg" - zle accept-line + zle accept-line -w else - zle push-input - zle clear-screen + zle push-input -w + zle clear-screen -w fi } zle -N fancy-ctrl-z -- cgit v1.2.3-70-g09d2 From 3e16d6434778ee9e1d7d5369c53d1e9c6b0517cb Mon Sep 17 00:00:00 2001 From: Ján Koščo <640131+s7anley@users.noreply.github.com> Date: Fri, 28 Feb 2020 17:29:11 +0100 Subject: geeknote: update completion (#4986) Fixes Completion only working for first parameter --- plugins/geeknote/README.md | 17 ++- plugins/geeknote/_geeknote | 267 ++++++++++++++++++++++++--------------------- 2 files changed, 156 insertions(+), 128 deletions(-) (limited to 'plugins') diff --git a/plugins/geeknote/README.md b/plugins/geeknote/README.md index 3f2353112..99c1fbf5b 100644 --- a/plugins/geeknote/README.md +++ b/plugins/geeknote/README.md @@ -1,12 +1,19 @@ -## ZSH-Geeknote +ZSH-Geeknote +============ [Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for oh-my-zsh. Plugins provides: -- auto completion of commands and their options -- alias `gn` +* auto completion of commands and their options +* alias `gn` -You can find information how to install Geeknote and it's available commands on the [project website](http://www.geeknote.me/). +## Installation -Maintainer : Ján Koščo ([@s7anley](https://twitter.com/s7anley)) +### oh-my-zsh +This plugin is already bundled in oh-my-zsh. To enable just configure plugin definition + + plugins=( ... geeknote ...) + +### Antigen +Use [Antigen's](https://github.com/zsh-users/antigen) bundle command to install by adding `antigen bundle s7anley/zsh-geeknote` to your `.zshrc` along with your other plugins. diff --git a/plugins/geeknote/_geeknote b/plugins/geeknote/_geeknote index cf1a187d2..a34be59b1 100644 --- a/plugins/geeknote/_geeknote +++ b/plugins/geeknote/_geeknote @@ -1,136 +1,157 @@ #compdef geeknote -# --------------- ------------------------------------------------------------ -# Name : _geeknote -# Synopsis : zsh completion for geeknote -# Author : Ján Koščo <3k.stanley@gmail.com> -# HomePage : http://www.geeknote.me -# Version : 0.1 -# Tag : [ shell, zsh, completion, evernote ] -# Copyright : © 2014 by Ján Koščo, -# Released under current GPL license. -# --------------- ------------------------------------------------------------ + +# Geeknote Autocomplete plugin for Zsh +# Requires: Geeknote installed +# Author : Ján Koščo (@s7anley) + +__login() { + # no arguments +} + +__logout() { + _arguments \ + '--force[Do not ask about logging out.]' +} + +__settings() { + _arguments \ + "--editor+[Set the editor, which use to edit and create notes.]::" +} + +__create() { + _arguments \ + '--title+[The note title.]::' \ + '--content+[The note content.]::' \ + '--tags+[One tag or the list of tags which will be added to the note.]::' \ + '--notebook+[Set the notebook where to save note.]::' \ + '--resource+[Add a resource to the note.]::' +} + +__edit() { + _arguments \ + '--note+[The name or ID from the previous search of a note to edit.]::' \ + '--title+[Set new title of the note.]::' \ + '--content+[Set new content of the note.]::' \ + '--tags+[Set new list o tags for the note.]::' \ + '--notebook+[Assign new notebook for the note.]::' \ + '--resource+[Add a resource to the note.]::' +} + +__find() { + _arguments \ + '--search+[Text to search.]::' \ + '--tags+[Notes with which tag/tags to search.]::' \ + '--notebook+[In which notebook search the note.]::' \ + '--date+[Set date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy.]::' \ + '--count+[How many notes show in the result list.]::' \ + '--with-url[Add direct url of each note in results to Evernote web-version.]' \ + '--content-search[Search by content, not by title.]' \ + '--exact-entry[Search for exact entry of the request.]' +} + +__show() { + _arguments \ + '--note+[The name or ID from the previous search of a note to show.]::' \ + '--raw[Show the raw note body.]' +} + +__remove() { + _arguments \ + '--note+[The name or ID from the previous search of a note to remove.]::' \ + '--force[Do not ask about removing.]' +} + +__notebook-list() { + # no arguments +} + +__notebook-create() { + _arguments \ + '--title+[Set the title of new notebook.]::' +} + +__notebook-edit() { + _arguments \ + '--title+[Set the title of new notebook.]::' \ + '--notebook+[The name of a notebook to rename.]::' +} + +__tag-list() { + # no arguments +} + +__tag-create() { + _arguments \ + '--title+[Set the title of new tag.]::' +} + +__tag-edit() { + _arguments \ + '--tagname+[The name of a tag to rename.]::' \ + '--title+[Set the new name of tag.]::' +} + +__user() { + _arguments \ + '--full[Show full information.]' +} local -a _1st_arguments _1st_arguments=( - 'login' - 'logout' - 'settings' - 'create' - 'edit' - 'find' - 'show' - 'remove' - 'notebook-list' - 'notebook-create' - 'notebook-edit' - 'tag-list' - 'tag-create' - 'tag-edit' - 'tag-remove' - 'gnsync' - 'user' + 'login':'Authorize in Evernote.' + 'logout':'Logout from Evernote.' + 'settings':'Show and edit current settings.' + 'create':'Create note in Evernote.' + 'edit':'Edit note in Evernote.' + 'find':'Search notes in Evernote.' + 'show':'Output note in the terminal.' + 'remove':'Remove note from Evernote.' + 'notebook-list':'Show the list of existing notebooks in your Evernote.' + 'notebook-create':'Create new notebook.' + 'notebook-edit':'Edit/rename notebook.' + 'tag-list':'Show the list of existing tags in your Evernote.' + 'tag-create':'Create new tag.' + 'tag-edit':'Edit/rename tag.' + 'user':'Show information about active user.' ) _arguments '*:: :->command' if (( CURRENT == 1 )); then - _describe -t commands "geeknote command" _1st_arguments - return + _describe -t commands "geeknote command" _1st_arguments + return fi local -a _command_args case "$words[1]" in - user) - _command_args=( - '(--full)--full' \ - ) - ;; - logout) - _command_args=( - '(--force)--force' \ - ) - ;; - settings) - _command_args=( - '(--editor)--editor' \ - ) - ;; - create) - _command_args=( - '(-t|--title)'{-t,--title}'[note title]' \ - '(-c|--content)'{-c,--content}'[note content]' \ - '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \ - '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \ - ) - ;; - edit) - _command_args=( - '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \ - '(-t|--title)'{-t,--title}'[note title]' \ - '(-c|--content)'{-c,--content}'[note content]' \ - '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \ - '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \ - ) - ;; - remove) - _command_args=( - '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \ - '(--force)--force' \ - ) - ;; - show) - _command_args=( - '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \ - ) - ;; - find) - _command_args=( - '(-s|--search)'{-s,--search}'[text to search]' \ - '(-tg|--tags)'{-tg,--tags}'[notes with which tag/tags to search]' \ - '(-nb|--notebook)'{-nb,--notebook}'[in which notebook search the note]' \ - '(-d|--date)'{-d,--date}'[date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy]' \ - '(-cn|--count)'{-cn,--count}'[how many notes show in the result list]' \ - '(-uo|--url-only)'{-uo,--url-only}'[add direct url of each note in results to Evernote web-version]' \ - '(-ee|--exact-entry)'{-ee,--exact-entry}'[search for exact entry of the request]' \ - '(-cs|--content-search)'{-cs,--content-search}'[search by content, not by title]' \ - ) - ;; - notebook-create) - _command_args=( - '(-t|--title)'{-t,--title}'[notebook title]' \ - ) - ;; - notebook-edit) - _command_args=( - '(-nb|--notebook)'{-nb,--notebook}'[name of notebook to rename]' \ - '(-t|--title)'{-t,--title}'[new notebook title]' \ - ) - ;; - notebook-remove) - _command_args=( - '(-nb|--notebook)'{-nb,--notebook}'[name of notebook to remove]' \ - '(--force)--force' \ - ) - ;; - tag-create) - _command_args=( - '(-t|--title)'{-t,--title}'[title of tag]' \ - ) - ;; - tag-edit) - _command_args=( - '(-tgn|--tagname)'{-tgn,--tagname}'[tag to edit]' \ - '(-t|--title)'{-t,--title}'[new tag name]' \ - ) - ;; - tag-remove) - _command_args=( - '(-tgn|--tagname)'{-tgn,--tagname}'[tag to remove]' \ - '(--force)--force' \ - ) - ;; - esac - -_arguments \ - $_command_args \ - && return 0 + login) + __login ;; + logout) + __logout ;; + settings) + __settings ;; + create) + __create ;; + edit) + __edit ;; + find) + __find ;; + show) + __show ;; + remove) + __remove ;; + notebook-list) + __notebook-list ;; + notebook-create) + __notebook-create ;; + notebook-edit) + __notebook-edit ;; + tag-list) + __tag-list ;; + tag-create) + __tag-create ;; + tag-edit) + __tag-edit ;; + user) + __user ;; +esac -- cgit v1.2.3-70-g09d2 From 6f85dc2389b415011b844ff2a8cbd948be566ec3 Mon Sep 17 00:00:00 2001 From: Gustavo Maia Date: Fri, 28 Feb 2020 15:23:36 -0300 Subject: kitchen: change sed regex in completion to capture all commands (#5820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/kitchen/_kitchen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/kitchen/_kitchen b/plugins/kitchen/_kitchen index 29a3125e4..d93d93d78 100644 --- a/plugins/kitchen/_kitchen +++ b/plugins/kitchen/_kitchen @@ -67,7 +67,7 @@ _kitchen() { _kitchen_commands() { local commands - commands=("${(@f)$(_call_program commands $service help | sed -n 's/^ kitchen \([[:alpha:]]*\) [ [].*# \(.*\)$/\1:\2/p')}") + commands=("${(@f)$(_call_program commands $service help | sed -n 's/^ kitchen \([[:alpha:]]*\) [ A-Z[].*# \(.*\)$/\1:\2/p')}") _describe -t commands 'kitchen commands' commands } -- cgit v1.2.3-70-g09d2 From 864b441688efee6573d233b21075a6f23a903097 Mon Sep 17 00:00:00 2001 From: Thomas Ruiz Date: Fri, 28 Feb 2020 19:28:55 +0100 Subject: composer: keep composer autocompletion when using global (#5933) --- plugins/composer/composer.plugin.zsh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'plugins') diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 634961023..fb53da113 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -15,20 +15,16 @@ _composer_get_required_list () { } _composer () { - local curcontext="$curcontext" state line - typeset -A opt_args - _arguments \ - '1: :->command'\ - '*: :->args' - - case $state in - command) - compadd $(_composer_get_command_list) - ;; - *) - compadd $(_composer_get_required_list) - ;; - esac + local curcontext="$curcontext" state line + typeset -A opt_args + _arguments \ + '*:: :->subcmds' + + if (( CURRENT == 1 )) || ( ((CURRENT == 2)) && [ "$words[1]" = "global" ] ) ; then + compadd $(_composer_get_command_list) + else + compadd $(_composer_get_required_list) + fi } compdef _composer composer -- cgit v1.2.3-70-g09d2 From 5023a4787bee5da4a47a3155f3f7a3ee3cee155c Mon Sep 17 00:00:00 2001 From: Joshua Pratt Date: Sat, 29 Feb 2020 05:59:33 +1100 Subject: stack: use builtin completion command (#6230) --- plugins/stack/stack.plugin.zsh | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'plugins') diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh index a149208d0..4e812880e 100644 --- a/plugins/stack/stack.plugin.zsh +++ b/plugins/stack/stack.plugin.zsh @@ -1,37 +1,2 @@ -function _stack_commands() { - local ret=1 state - _arguments ':subcommand:->subcommand' && ret=0 - - case $state in - subcommand) - subcommands=( - "build:Build the project(s) in this directory/configuration" - "install:Build executables and install to a user path" - "test:Build and test the project(s) in this directory/configuration" - "bench:Build and benchmark the project(s) in this directory/configuration" - "haddock:Generate haddocks for the project(s) in this directory/configuration" - "new:Create a brand new project" - "init:Initialize a stack project based on one or more stack packages" - "solver:Use a dependency solver to try and determine missing extra-deps" - "setup:Get the appropriate ghc for your project" - "path:Print out handy path information" - "unpack:Unpack one or more packages locally" - "update:Update the package index" - "upgrade:Upgrade to the latest stack (experimental)" - "upload:Upload a package to Hackage" - "dot:Visualize your project's dependency graph using Graphviz dot" - "exec:Execute a command" - "ghc:Run ghc" - "ghci:Run ghci in the context of project(s)" - "ide:Run ide-backend-client with the correct arguments" - "runghc:Run runghc" - "clean:Clean the local packages" - "docker:Subcommands specific to Docker use" - ) - _describe -t subcommands 'stack subcommands' subcommands && ret=0 - esac - - return ret -} - -compdef _stack_commands stack +autoload -U +X bashcompinit && bashcompinit +source <(stack --bash-completion-script stack) -- cgit v1.2.3-70-g09d2 From c3984a775994645b8fb9ef7f714a92edb7baf5ac Mon Sep 17 00:00:00 2001 From: Ville Lautanala Date: Fri, 28 Feb 2020 21:01:14 +0200 Subject: fasd: cache full fasd initialisation script (#6097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using `fasd —-init auto` will first detect terminal and then call fasd again to generate the final initialisation script. Caching that gives a more significant performance boost. --- plugins/fasd/fasd.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh index ec2e5183a..cdf99708c 100644 --- a/plugins/fasd/fasd.plugin.zsh +++ b/plugins/fasd/fasd.plugin.zsh @@ -1,7 +1,8 @@ if [ $commands[fasd] ]; then # check if fasd is installed fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then - fasd --init auto >| "$fasd_cache" + fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \ + zsh-wcomp zsh-wcomp-install >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache -- cgit v1.2.3-70-g09d2 From 389de86cf5e4976bdda4259b27987c44d401ae96 Mon Sep 17 00:00:00 2001 From: Sven Hergenhahn Date: Fri, 28 Feb 2020 20:29:44 +0100 Subject: pass: update completion to upstream version (675a002e) (#6475) --- plugins/pass/_pass | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins') diff --git a/plugins/pass/_pass b/plugins/pass/_pass index 5f3b8f541..75f3feb4f 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -10,6 +10,14 @@ # Please visit https://git.zx2c4.com/password-store/tree/COPYING for more information. +# If you use multiple repositories, you can configure completion like this: +# +# compdef _pass workpass +# zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass" +# workpass() { +# PASSWORD_STORE_DIR=$HOME/work/pass pass $@ +# } + # If you use multiple repositories, you can configure completion like this: # # compdef _pass workpass -- cgit v1.2.3-70-g09d2 From e61228282acced09d9b245b3fc337fd079dc26a8 Mon Sep 17 00:00:00 2001 From: Wenbing Li Date: Fri, 28 Feb 2020 11:35:19 -0800 Subject: gradle: fix command option name in completion (#6586) It should be `--rerun-tasks`, the original one miss a 's' at the end. See https://docs.gradle.org/current/userguide/command_line_interface.html --- plugins/gradle/gradle.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index c651b91ca..bba6ad4e9 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -83,7 +83,7 @@ function _gradle_arguments() { '--quiet[Log errors only]' \ '--recompile-scripts[Forces scripts to be recompiled, bypassing caching]' \ '--refresh-dependencies[Refresh the state of dependencies]' \ - '--rerun-task[Specifies that any task optimization is ignored]' \ + '--rerun-tasks[Specifies that any task optimization is ignored]' \ '--settings-file[Specifies the settings file]' \ '--stacktrace[Print out the stacktrace also for user exceptions]' \ '--status[Print Gradle Daemon status]' \ -- cgit v1.2.3-70-g09d2 From f94e55a1a91492662e87ae6e96e3c36ae08d18dd Mon Sep 17 00:00:00 2001 From: Cody Fuller Date: Fri, 28 Feb 2020 13:42:18 -0600 Subject: mix: add format option to completion (#7256) --- plugins/mix/_mix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mix/_mix b/plugins/mix/_mix index 61fa1cf25..c0fe68c91 100644 --- a/plugins/mix/_mix +++ b/plugins/mix/_mix @@ -34,6 +34,7 @@ _1st_arguments=( 'firmware:Nerves - Build a firmware image for the selected target platform' 'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file' 'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte' + 'format:Formats the given files and patterns' 'help:Print help information for tasks' 'hex:Print hex help information' 'hex.config:Read or update hex config' @@ -92,7 +93,7 @@ __task_list () local expl declare -a tasks - tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.presence phx.gen.schema phx.gen.secret phx.new phx.new.ecto phx.new.web phx.routes phx.server run test) + tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build format help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.presence phx.gen.schema phx.gen.secret phx.new phx.new.ecto phx.new.web phx.routes phx.server run test) _wanted tasks expl 'help' compadd $tasks } -- cgit v1.2.3-70-g09d2 From dddbb5c9ebe0805750c0b8c0282ca86f1c6b1818 Mon Sep 17 00:00:00 2001 From: Michal Kielan Date: Fri, 28 Feb 2020 11:51:38 -0800 Subject: mercurial: add hga alias to README (#7547) --- plugins/mercurial/README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mercurial/README.md b/plugins/mercurial/README.md index f42212d68..68c7d0f43 100644 --- a/plugins/mercurial/README.md +++ b/plugins/mercurial/README.md @@ -26,6 +26,7 @@ Update .zshrc: ### What's inside? #### Adds handy aliases: ###### general +* `hga` - 'hg add` * `hgc` - `hg commit` * `hgb` - `hg branch` * `hgba` - `hg branches` -- cgit v1.2.3-70-g09d2 From befdb4649b3894cb2c545182810f228e8cb721ae Mon Sep 17 00:00:00 2001 From: Gianluca Recchia Date: Fri, 28 Feb 2020 21:00:44 +0100 Subject: gitignore: add newline to `gi` output (#7586) * Add trailing new line at the end of output * Double-quote variable expansion --- plugins/gitignore/gitignore.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 15e38d3b7..a687f5cce 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,4 +1,4 @@ -function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} } +function gi() { curl -fLw '\n' https://www.gitignore.io/api/"${(j:,:)@}" } _gitignoreio_get_command_list() { curl -sfL https://www.gitignore.io/api/list | tr "," "\n" -- cgit v1.2.3-70-g09d2 From 1689e9bb907ab184d7418dd88bc2639a794c916d Mon Sep 17 00:00:00 2001 From: Alexander Schlarb <246386+alexander255@users.noreply.github.com> Date: Fri, 28 Feb 2020 20:01:35 +0000 Subject: zsh_reload: respect `$ZDOTDIR` when searching for `.zshrc` (#7706) --- plugins/zsh_reload/zsh_reload.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh index 51048ba9d..83f8da733 100644 --- a/plugins/zsh_reload/zsh_reload.plugin.zsh +++ b/plugins/zsh_reload/zsh_reload.plugin.zsh @@ -3,7 +3,7 @@ src() { autoload -U compinit zrecompile compinit -i -d "$cache/zcomp-$HOST" - for f in ~/.zshrc "$cache/zcomp-$HOST"; do + for f in ${ZDOTDIR:-~}/.zshrc "$cache/zcomp-$HOST"; do zrecompile -p $f && command rm -f $f.zwc.old done -- cgit v1.2.3-70-g09d2 From e42683b8c5e20ca3d9c0fde1cb748cd8c8169619 Mon Sep 17 00:00:00 2001 From: Dan D'Avella Date: Mon, 2 Mar 2020 07:17:16 -0500 Subject: pip: add local Python package files to completion (#7442) --- plugins/pip/_pip | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/pip/_pip b/plugins/pip/_pip index 607f68e58..a5adead4a 100644 --- a/plugins/pip/_pip +++ b/plugins/pip/_pip @@ -89,6 +89,7 @@ case "$words[1]" in if [[ "$state" == packages ]]; then _pip_all _wanted piplist expl 'packages' compadd -a piplist + _files -g "*.(tar.gz|whl)" fi ;; uninstall) _pip_installed -- cgit v1.2.3-70-g09d2 From 74420341df46fab5cf34f24917927d675d717102 Mon Sep 17 00:00:00 2001 From: Pavel Fokin Date: Mon, 2 Mar 2020 14:20:28 +0200 Subject: minikube: cache command completions (#7446) --- plugins/minikube/minikube.plugin.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/minikube/minikube.plugin.zsh b/plugins/minikube/minikube.plugin.zsh index d8ebe79af..f7b365c7f 100644 --- a/plugins/minikube/minikube.plugin.zsh +++ b/plugins/minikube/minikube.plugin.zsh @@ -1,6 +1,13 @@ # Autocompletion for Minikube. # +if (( $+commands[minikube] )); then + __MINICUBE_COMPLETION_FILE="${ZSH_CACHE_DIR}/minicube_completion" -if [ $commands[minikube] ]; then - source <(minikube completion zsh) + if [[ ! -f $__MINICUBE_COMPLETION_FILE ]]; then + minikube completion zsh >! $__MINICUBE_COMPLETION_FILE + fi + + [[ -f $__MINICUBE_COMPLETION_FILE ]] && source $__MINICUBE_COMPLETION_FILE + + unset __MINICUBE_COMPLETION_FILE fi -- cgit v1.2.3-70-g09d2 From e65bce849580fbb96c436b1a2a3739cb8c27c299 Mon Sep 17 00:00:00 2001 From: "Pavel N. Krivitsky" Date: Mon, 2 Mar 2020 23:30:52 +1100 Subject: shrink-path: add minimum length and ellipsis symbol options (#7382) * Added minimum length and ellipsis symbol options for the shrink-path plugin. * Replaced tab indentation with space indentation for the shrink-path plugin. * Added handling of multicharacter ellipsis, and updated documentation and README for the shrink-path plugin. --- plugins/shrink-path/README.md | 8 ++++++- plugins/shrink-path/shrink-path.plugin.zsh | 37 ++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/shrink-path/README.md b/plugins/shrink-path/README.md index b990aea91..54bc351d3 100644 --- a/plugins/shrink-path/README.md +++ b/plugins/shrink-path/README.md @@ -20,6 +20,8 @@ here are the results of calling `shrink_path