[kwlug-disc] Bash Autocompletion (Nov 2022)
Ronald Barnes
ron at ronaldbarnes.ca
Tue Nov 15 20:40:10 EST 2022
John Steel via kwlug-disc wrote on 2022-11-15 11:31:
> I've seen some awesome autocomplete scripts that automatically add
> quotes for you, but I forget what did that. I'll see if I can find a
> good example.
I've been thinking about how one would do that with quotes, and it
sounds really hard.
How would one handle the first two-word phrase? word1\ w[tab] -> "word1
word2"? Would that be extensible? Or, would one have to remove quotes
from all "words" (phrases) at each tab function invocation to match the
word list?
Any examples would make interesting reading.
I'm going to try to implement something with that technique, plus my
technique using escape sequences (i.e. " " -> "\ ").
Stay tuned.
rb
More information about the kwlug-disc
mailing list