projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f38478
)
Expand the -C argument via ‘eval’ in bash completion
author
Allan Odgaard
<git@abetarda.com>
Tue, 15 Apr 2014 07:27:37 +0000
(14:27 +0700)
committer
Allan Odgaard
<git@abetarda.com>
Tue, 15 Apr 2014 07:28:42 +0000
(14:28 +0700)
Previously completion would not work for ‘ninja -C $HOME/Source/foo targ‸’.
We still do not support using tilde in the directory argument.
misc/bash-completion
patch
|
blob
|
history
diff --git
a/misc/bash-completion
b/misc/bash-completion
index
93bc9a1
..
719e7a8
100644
(file)
--- a/
misc/bash-completion
+++ b/
misc/bash-completion
@@
-31,7
+31,7
@@
_ninja_target() {
C) dir="$OPTARG" ;;
esac
done;
- targets_command="
ninja -C ${dir}
-t targets all"
+ targets_command="
eval ninja -C \"${dir}\"
-t targets all"
targets=$((${targets_command} 2>/dev/null) | awk -F: '{print $1}')
COMPREPLY=($(compgen -W "$targets" -- "$cur"))
fi