in reply to Re: (OT) Bash Tabbing
in thread (OT) Bash Tabbing
I haven't worked with bash_completion enough to provide a working example unfortunately. One potential shortcoming would be that you need to tell bash when to run this completion code. This is typically done by specifying the completion logic for a given command. (e.g. perl is handled by the _perl function).
And awk to extract it:#!/usr/bin/perl #complete -G '*.bak'
Explanation of the awk:awk 'NR == 1 {next} /^\#complete/ {print} /^[^#]/ {exit}' $filename
|
|---|