Re: words in COMPWORDS vs. words in COMPREPLY

2010-07-24 Thread Chet Ramey
On 7/20/10 3:14 PM, Ben Pfaff wrote: > I'm trying to learn how bash completion works, so that I can > write completion functions for some utilities. > > As an experiment, I wrote the following trivial completion. It > is intended to report that the completions for the current word > are exactly t

Re: empty lines at the end of quoted command subsitutions missing

2010-07-24 Thread Chet Ramey
On 7/24/10 3:23 AM, Andreas Schwab wrote: > koe...@science-computing.de writes: > >> empty line(s) at the end of quoted command subsitutions are missing: > > That is not a bug, but a feature. Command subsitution generally strips > trailing newlines from the output of the command. If you want th

Re: empty lines at the end of quoted command subsitutions missing

2010-07-24 Thread Pierre Gaston
On Sat, Jul 24, 2010 at 10:23 AM, Andreas Schwab wrote: > koe...@science-computing.de writes: > >> empty line(s) at the end of quoted command subsitutions are missing: > > That is not a bug, but a feature.  Command subsitution generally strips > trailing newlines from the output of the command.  I

Re: empty lines at the end of quoted command subsitutions missing

2010-07-24 Thread Andreas Schwab
koe...@science-computing.de writes: > empty line(s) at the end of quoted command subsitutions are missing: That is not a bug, but a feature. Command subsitution generally strips trailing newlines from the output of the command. If you want the complete output use a pipe. Andreas. -- Andreas