Skip to content

Commit

Permalink
Fix bash completion on mac.
Browse files Browse the repository at this point in the history
For some bizarro reason, mac's bash doesn't like negative indexes,
even though its version of bash should support it.
  • Loading branch information
ehuss committed Sep 16, 2018
1 parent 010710b commit 8dee4e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/cargo.bashcomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ __cargo_commands=$(cargo --list 2>/dev/null | tail -n +2)
_locate_manifest(){
local manifest=`cargo locate-project 2>/dev/null`
# regexp-replace manifest '\{"root":"|"\}' ''
echo ${manifest:9:-2}
echo ${manifest:9:${#manifest}-11}
}

# Extracts the values of "name" from the array given in $1 and shows them as
Expand Down

0 comments on commit 8dee4e4

Please sign in to comment.