Guest User

Untitled

a guest
Feb 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $ echo $PATH
  2. /home/USERNAME/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
  3.  
  4. > set -x
  5. > ls foo<tab>
  6. ... <--- lots of output removed
  7. ...
  8. + _quote_readline_by_ref foo quoted
  9. + '[' -z foo ']'
  10. + [[ foo == '* ]] <--- froze here
  11. + [[ foo == ~* ]] <--- actually causing the trouble
  12.  
  13. --- /usr/share/bash-completion/bash_completion.orig 2014-11-06 10:36:14.981888369 +0100
  14. +++ /usr/share/bash-completion/bash_completion 2014-11-06 10:36:25.142070963 +0100
  15. @@ -542,9 +542,9 @@
  16. elif [[ $1 == '* ]]; then
  17. # Leave out first character
  18. printf -v $2 %s "${1:1}"
  19. - elif [[ $1 == ~* ]]; then
  20. + elif [[ $1 == ~* ]]; then
  21. # avoid escaping first ~
  22. - printf -v $2 ~%q "${1:1}"
  23. + printf -v $2 ~%q "${1:1}"
  24. else
  25. printf -v $2 %q "$1"
  26. fi
Add Comment
Please, Sign In to add comment