diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-10-20 14:42:45 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-10-20 14:42:45 +1300 |
commit | f4d28a49dea60bf473b92cb6290cebdfbe4673cb (patch) | |
tree | 0217e239a0a66f633a4dfba8f369c92cb28090d1 /bash/bashrc.d/path.bash | |
parent | Fix consistent spacing in muttrc (diff) | |
download | dotfiles-f4d28a49dea60bf473b92cb6290cebdfbe4673cb.tar.gz dotfiles-f4d28a49dea60bf473b92cb6290cebdfbe4673cb.zip |
Handle spaces correctly in completions
This is technically still wrong; COMPREPLY needs to be specified with
null-delimited IFS, as done in the pass() function. This will do for
now.
Diffstat (limited to 'bash/bashrc.d/path.bash')
-rw-r--r-- | bash/bashrc.d/path.bash | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bash/bashrc.d/path.bash b/bash/bashrc.d/path.bash index 29c356ff..e73e6b2f 100644 --- a/bash/bashrc.d/path.bash +++ b/bash/bashrc.d/path.bash @@ -194,6 +194,7 @@ _path() { insert|i|append|add|a|check|c) if ((COMP_CWORD == 2)) ; then compopt -o filenames + local IFS=$'\n' COMPREPLY=( $(compgen -A directory -- "$word") ) fi ;; @@ -201,6 +202,7 @@ _path() { # Complete with any number of directories set|s) compopt -o filenames + local IFS=$'\n' COMPREPLY=( $(compgen -A directory -- "$word") ) ;; |