diff options
author | Allan Odgaard <git@abetarda.com> | 2014-04-15 07:27:37 (GMT) |
---|---|---|
committer | Allan Odgaard <git@abetarda.com> | 2014-04-15 07:28:42 (GMT) |
commit | 4835a2b1952d6f7c21b6a02cf27b31f79fe89a25 (patch) | |
tree | 48909eb6e9beed14e104be0b0483296a222ac02d /misc/bash-completion | |
parent | 1f38478eb976d3c11db7885972664c0422317ea8 (diff) | |
download | Ninja-4835a2b1952d6f7c21b6a02cf27b31f79fe89a25.zip Ninja-4835a2b1952d6f7c21b6a02cf27b31f79fe89a25.tar.gz Ninja-4835a2b1952d6f7c21b6a02cf27b31f79fe89a25.tar.bz2 |
Expand the -C argument via ‘eval’ in bash completion
Previously completion would not work for ‘ninja -C $HOME/Source/foo targ‸’.
We still do not support using tilde in the directory argument.
Diffstat (limited to 'misc/bash-completion')
-rw-r--r-- | misc/bash-completion | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/bash-completion b/misc/bash-completion index 93bc9a1..719e7a8 100644 --- 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 |