[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Behavior of 'complete -o filenames' unclear
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Behavior of 'complete -o filenames' unclear |
Date: |
Thu, 4 Oct 2018 10:29:55 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 10/4/18 4:46 AM, Michael Siegel wrote:
> In that case, the shell will add a slash to the name, as if it were
> completing directory names within $PWD:
>
> ~/devel/sandbox/probe$ ls
> a_file msiism/ tests/
> ~/devel/sandbox/probe$ dbm msi<Tab> # Results in 'dbm msiism/'
> ~/devel/sandbox/probe$
>
> Now, the Bash Reference Manual does say that '-o filename' will "perform
> any filename-specific processing"[1], "like adding a slash to directory
> names"[1] and such. What I don't understand is why it is still adding
> the slash when completion is based on file names in $dbm_dir instead of
> $PWD.
How would readline (because readline is adding the slash) know that the
possible completion should be interpreted relative to some other directory
and not $PWD? It's not an absolute pathname, the current working directory
hasn't changed, and there's not currently a way to direct readline
otherwise.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/