Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14886
| From | Mattias Andrée <maandree@kth.se> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Incorrect path canonicalisation at autocompletion |
| Date | 2018-12-03 16:05 +0100 |
| Message-ID | <mailman.5084.1543849568.1284.bug-bash@gnu.org> (permalink) |
| References | <20181201211249.7979d994.maandree@kth.se> <e1be40d1-3245-bf32-cbe8-a7ec1e75263b@case.edu> <20181203154908.081e637d.maandree@kth.se> <e4d09a67-e539-a95a-9f02-33f10b1e7bab@case.edu> |
On Mon, 3 Dec 2018 09:58:33 -0500 Chet Ramey <chet.ramey@case.edu> wrote: > On 12/3/18 9:49 AM, Mattias Andrée wrote: > > On Mon, 3 Dec 2018 09:33:48 -0500 > > Chet Ramey <chet.ramey@case.edu> wrote: > > > >> On 12/1/18 3:12 PM, Mattias Andrée wrote: > >>> Using Bash 4.4.023, type > >>> > >>> cd > >>> mkdir -p 1/2 > >>> cd 1/2 > >>> touch ../../3 > >>> ln -s ~ 4 > >>> touch 5 > >>> ls 4/../ > >>> > >>> without pressing enter at the last line, > >>> instead press <tab> twice. 4/ and 5 will > >>> be suggested, but if you press <enter> > >>> you will see that it should suggest the> files in /home. > >> > >> It's not a bug. Bash maintains a logical view of the file system and the > >> current directory for cd, pwd, and $PWD, as Posix specifies. One of the > >> consequences is that the pathname of the current directory depends on the > >> path used to reach it, which affects how bash canonicalizes `..'. Bash is > >> consistent in its use of this logical view across shell features, which > >> includes completion. > >> > >> If you want to see a physical view of the file system, use > >> `set -o physical'. > >> > > > > Is there a way to only get physical view for > > completion but logical view for cd, pwd, and $PWD? > > You can by using set -o physical within a completion function or running > with set -o physical all the time and using `cd -L' and `pwd -L'. > Thanks!
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Incorrect path canonicalisation at autocompletion Mattias Andrée <maandree@kth.se> - 2018-12-03 16:05 +0100
csiph-web