Re: programmable completion: completing filenames with default Readline behavior

2013-10-02 Thread Jeremy Lin
On Tue, Oct 1, 2013 at 1:59 PM, Chet Ramey chet.ra...@case.edu wrote: On 10/1/13 4:55 PM, Jeremy Lin wrote: Thanks, I actually ended up with the same solution (for Bash 4.0 and above, where 'compopt' is available, anyway). I just set '+o default' at the top of the completion function and

Re: programmable completion: completing filenames with default Readline behavior

2013-10-01 Thread Chet Ramey
On 9/27/13 3:57 AM, Jeremy Lin wrote: I'm writing a completion where, in some cases, I'd like to use COMPREPLY=() to indicate that no more arguments to a command are expected, but in other cases, I'd like to offer the default Readline behavior for filename completions. So, if I have a

Re: programmable completion: completing filenames with default Readline behavior

2013-10-01 Thread Jeremy Lin
On Tue, Oct 1, 2013 at 1:35 PM, Chet Ramey chet.ra...@case.edu wrote: On 9/27/13 3:57 AM, Jeremy Lin wrote: I'm writing a completion where, in some cases, I'd like to use COMPREPLY=() to indicate that no more arguments to a command are expected, but in other cases, I'd like to offer the

Re: programmable completion: completing filenames with default Readline behavior

2013-10-01 Thread Chet Ramey
On 10/1/13 4:55 PM, Jeremy Lin wrote: Thanks, I actually ended up with the same solution (for Bash 4.0 and above, where 'compopt' is available, anyway). I just set '+o default' at the top of the completion function and then set '-o default' as needed. Unfortunately, for earlier versions of

programmable completion: completing filenames with default Readline behavior

2013-09-27 Thread Jeremy Lin
I'm writing a completion where, in some cases, I'd like to use COMPREPLY=() to indicate that no more arguments to a command are expected, but in other cases, I'd like to offer the default Readline behavior for filename completions. So, if I have a directory 'foo', I'd like the shell to first