projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e9d7b0
)
avoid wrong invoking from non-project directory
author
Frederick Zhang
<Frederick888@Tsundere.moe>
Wed, 26 Aug 2015 18:31:46 +0000
(
02:31
+0800)
committer
Frederick Zhang
<Frederick888@Tsundere.moe>
Wed, 26 Aug 2015 18:31:46 +0000
(
02:31
+0800)
src/etc/cargo.bashcomp.sh
patch
|
blob
|
history
diff --git
a/src/etc/cargo.bashcomp.sh
b/src/etc/cargo.bashcomp.sh
index 8aa12834e89aa1201f751a616ba3abd70d7ac84e..21cea0cae9c1378ea0714421f79cd056c25b904b 100644
(file)
--- a/
src/etc/cargo.bashcomp.sh
+++ b/
src/etc/cargo.bashcomp.sh
@@
-100,9
+100,12
@@
_get_examples(){
}
_get_targets(){
+ local CURRENT_PATH=$(_locate_manifest)
+ if [[ -z "$CURRENT_PATH" ]]; then
+ return 1
+ fi
local TARGETS=()
local FIND_PATHS=( "/" )
- local CURRENT_PATH=$(_locate_manifest)
local FIND_PATH LINES LINE
while [[ "$CURRENT_PATH" != "/" ]]; do
FIND_PATHS+=( "$CURRENT_PATH" )