summaryrefslogtreecommitdiff
path: root/plugins/cargo
diff options
context:
space:
mode:
authorHenrik Johansson <dahankzter@gmail.com>2014-08-08 14:09:07 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-10-03 19:09:59 +0200
commit0887a7eb504debd8714bb914b99a2d6343f6b131 (patch)
tree3514ece33528cc22b4fd437c2ba5c08438296b99 /plugins/cargo
parent1f64fa92f524d47a87320a4baf9d9883fd23ab5e (diff)
downloadzsh-0887a7eb504debd8714bb914b99a2d6343f6b131.tar.gz
zsh-0887a7eb504debd8714bb914b99a2d6343f6b131.tar.bz2
zsh-0887a7eb504debd8714bb914b99a2d6343f6b131.zip
Added simple support for Cargo -
the Rust build system
Diffstat (limited to 'plugins/cargo')
-rw-r--r--plugins/cargo/cargo.plugin.zsh22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/cargo/cargo.plugin.zsh b/plugins/cargo/cargo.plugin.zsh
new file mode 100644
index 000000000..e1dc953dd
--- /dev/null
+++ b/plugins/cargo/cargo.plugin.zsh
@@ -0,0 +1,22 @@
+function _cargo_commands() {
+ local ret=1 state
+ _arguments ':subcommand:->subcommand' && ret=0
+
+ case $state in
+ subcommand)
+ subcommands=(
+ "build:Build the current project"
+ "clean:Clean up after a build"
+ "help:Help about available commands"
+ "new:Create a new project"
+ "test:Run the tests"
+ "update:Updates list of known packages"
+ "run:Builds and runs the currecnt project"
+ )
+ _describe -t subcommands 'cargo subcommands' subcommands && ret=0
+ esac
+
+ return ret
+}
+
+compdef _cargo_commands cargo