Fixed handling of spaces in path for completion for Bash command "cd".
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2021 20:15:51 +0200
changeset 972 27754771cbb6
parent 971 c4a808f66996
child 973 277ccd286936
Fixed handling of spaces in path for completion for Bash command "cd".
.bash_completion
--- a/.bash_completion	Thu Jan 14 12:56:41 2021 +0200
+++ b/.bash_completion	Mon Feb 22 20:15:51 2021 +0200
@@ -59,6 +59,7 @@
 
 _mycd() {
   local cur
+  local IFS=$'\n'
   cur=${COMP_WORDS[COMP_CWORD]}
   if [[ -z "${CDPATH:-}" ]] || [[ $cur == ?(.)?(.)/* ]] || [[ $cur == '~'/* ]]; then
     compopt -o dirnames; COMPREPLY=()