[Bash-completion-devel] handling values with spaces
Guillaume Rousse
guillomovitch at gmail.com
Tue Sep 4 20:50:36 UTC 2012
My two latest completions handle list of values containing spaces:
camera models for gphoto2, wifi networks essid for nmcli. I figured out
how to redefine IFS for ensuring they are correctly suggested as
possible completions, but this result in invalid command lines, such as:
gphoto2 --camera Wi<TAB> ->
gphoto2 --camera Wild Planet Digital Spy Camera 70137
If I manually insert quotes, everything is OK:
gphoto2 --camera "Wi<TAB> ->
gphoto2 --camera "Wild Planet Digital Spy Camera 70137"
I'd like to automatically either quote such values, or espace spaces
through them, so as to produces valid command lines, such as:
gphoto2 --camera "Wild Planet Digital Spy Camera 70137"
gphoto2 --camera Wild\ Planet\ Digital\ Spy\ Camera\ 70137
Is there any way to achieve this ?
--
BOFH excuse #90:
Budget cuts
More information about the Bash-completion-devel
mailing list