Skip to content

Tags: ucarion/cargo

Tags

homu-tmp

Toggle homu-tmp's commit message
Auto merge of rust-lang#1853 - apjanke:zsh-compl-fix-parse-near-manif…

…est, r=alexcrichton

Fixes a syntax error in the zsh completion definition.

The `[[ $foo ]]` test isn't valid for zsh; it needs `-z` or `-n`. This PR changes the `! [[ $manifest ]]` which appeared to be checking for an empty manifest to `[[ -z $manifest ]]`, which is the zsh syntax for it.

Fixes rust-lang#1852.
Addresses Homebrew/legacy-homebrew#41374.

I tested this on OS X 10.9. I only tested the `zsh` completion behavior, since Rust itself is unchanged by this.

The rust-lang#920 PR looks like it was trying to do the same thing, but it got the semantics wrong. Putting `!` and `[[` together as `![[` removes the syntax error, but not because `![[ $x ]]` is a test for nonempty; `![[` is now a history backreference. The `!` needs to be its own word to be used as a logical "not".

v0.0.1-pre

Toggle v0.0.1-pre's commit message
auto merge of rust-lang#988 : Gekkio/cargo/zsh-run-normal-args, r=ale…

…xcrichton

Running a Rust program with some arguments such as files is a common use
case. The ZSH completion did not declare support for extra arguments to
"cargo run", so file completion was impossible. In practice pressing TAB
after writing "cargo run -- " gave no completion at all.

After this patch, cargo run can do "normal completion",
which in practice does file/directory completion. This works nicely
with "cargo run -- ".