News for hackers. Stuff that matters.
Re:Creating a bash completion script (2018) by kazinator on Wednesday March 02, 2022 @09:51AM (#30527951)
I gave up on Bash completion when I ran into a silly thing that can't be turned off: when you complete something which is quoted 'foo.b_[Tab] it will complete, close the quote and add a space: 'foo.bar' _. When you wanted 'foo.bar_ so then you could continue, for instance, like 'foo.bar(arg, _. There isn't anything the completion handler can do to fix this.

Bash completion is designed for simple arguments like command line options and path names; anything else was not envisioned, in spite of embedded scripts being a pattern in the traditional Unix command line.

E.g. Awk completion could go like this:

   awk 'BE_[Tab]

   awk 'BEGIN {_

There are no comments on this comment yet.