diff options
author | Frederick Zhang <frederick888@tsundere.moe> | 2017-01-24 03:48:57 +1100 |
---|---|---|
committer | Frederick Zhang <frederick888@tsundere.moe> | 2018-09-24 18:02:50 +1000 |
commit | 5423f7fa2ad255ec417fc3aea0c69077f0530ccb (patch) | |
tree | 943e6b74a6ce844fd9bda44824eafbe62494b82e /plugins/cargo/_cargo | |
parent | b9533ccac2846d74693158eef1759d198231a79b (diff) | |
download | zsh-5423f7fa2ad255ec417fc3aea0c69077f0530ccb.tar.gz zsh-5423f7fa2ad255ec417fc3aea0c69077f0530ccb.tar.bz2 zsh-5423f7fa2ad255ec417fc3aea0c69077f0530ccb.zip |
complete installed sub-commands
Diffstat (limited to 'plugins/cargo/_cargo')
-rw-r--r-- | plugins/cargo/_cargo | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/cargo/_cargo b/plugins/cargo/_cargo index 7ed95c0ce..e26fbfeba 100644 --- a/plugins/cargo/_cargo +++ b/plugins/cargo/_cargo @@ -390,6 +390,7 @@ esac } _cargo_cmds(){ +local IFS=$'\n' local -a commands;commands=( 'bench:execute all benchmarks of a local package' 'build:compile the current project' @@ -420,6 +421,7 @@ local -a commands;commands=( 'verify-project:check Cargo.toml' 'version:show version information' 'yank:remove pushed file from index' +$( cargo --list | sed -n '1!p' | tr -d ' ' | egrep -v "^bench$|^build$|^clean$|^doc$|^fetch$|^generate-lockfile$|^git-checkout$|^help$|^init$|^install$|^locate-project$|^login$|^metadata$|^new$|^owner$|^package$|^pkgid$|^publish$|^read-manifest$|^run$|^rustc$|^rustdoc$|^search$|^test$|^uninstall$|^update$|^verify-project$|^version$|^yank$" | sed -r "s/(.*)/echo \"\1:$\(cargo help \1 | head -n 1\)\"/" | sh ) ) _describe 'command' commands |