Skip to content

Commit afd240e

Browse files
committedMay 5, 2019
Auto merge of #6905 - ArifRoktim:fork/bash_complete, r=ehuss
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.
2 parents d809b5b + e2c519d commit afd240e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/etc/cargo.bashcomp.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Required for bash versions < 4.1
2+
# Default bash version is 3.2 on latest macOS. See #6874
3+
shopt -s extglob
4+
15
command -v cargo >/dev/null 2>&1 &&
26
_cargo()
37
{

0 commit comments

Comments
 (0)