Skip to content

Commit

Permalink
Auto merge of #6905 - ArifRoktim:fork/bash_complete, r=ehuss
Browse files Browse the repository at this point in the history
Fixes #6874

Bash completion for cargo on the latest version of stock macOS produced syntax errors. More info in #6874 . This PR should fix that, but as I don't have any apple devices, I can't test it.

Pinging @jimmycuadra or anyone who runs macOS: If you have the time, could you please check if applying the commit in this PR fixes the syntax error when running the stock bash that comes with macOS?
Quick one-liner to apply the commit would be:
```bash
patch -d "$(rustc --print sysroot)/etc/bash_completion.d/" cargo <(curl https://github.com/rust-lang/cargo/commit/e2c519dd7ac61e4d2f94cad60ef920ce4aa1718f.patch)
```

Once this PR is confirmed to work, it can marked as ready.
  • Loading branch information
bors committed May 5, 2019
2 parents d809b5b + e2c519d commit afd240e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/etc/cargo.bashcomp.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Required for bash versions < 4.1
# Default bash version is 3.2 on latest macOS. See #6874
shopt -s extglob

command -v cargo >/dev/null 2>&1 &&
_cargo()
{
Expand Down

0 comments on commit afd240e

Please sign in to comment.