Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Mattias =?UTF-8?B?QW5kcsOpZQ==?= Newsgroups: gnu.bash.bug Subject: Re: Incorrect path canonicalisation at autocompletion Date: Mon, 3 Dec 2018 16:05:56 +0100 Lines: 48 Approved: bug-bash@gnu.org Message-ID: References: <20181201211249.7979d994.maandree@kth.se> <20181203154908.081e637d.maandree@kth.se> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1543849568 610 208.118.235.17 (3 Dec 2018 15:06:08 GMT) X-Complaints-To: action@cs.stanford.edu Cc: To: Chet Ramey Envelope-to: bug-bash@gnu.org X-Virus-Scanned: by amavisd-new at kth.se X-KTH-Auth: maandree [81.228.219.220] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1543849558; bh=vis1BeCj/MeHUhAPRR0Gwb7gj1x03h8ntoLu/sqofqo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=gE8nbkhWNgFnOHHjryJIA4XWaooIuzkOmZAixWJ5D/neC1enxkVq0xd6ZGYDGu14b LSSw4ZAI1jxMyJKG/Ptj78prl7IQVy9gVvqVrasg0vFdjZN3tHwRHW9GVe3pi+HWy2 TNhuzR/zeGQoI+z+ubbmJrwCudDQtGr6eSl9kKe8= X-KTH-mail-from: maandree@kth.se In-Reply-To: X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Awesomeness: 120 % User-Agent: Claws Mail X-Operating-System: GNU/Linux X-Clacks-Overhead: GNU Terry Pratchett X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:6b0:1:1300:250:56ff:fea6:2de3 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14886 On Mon, 3 Dec 2018 09:58:33 -0500 Chet Ramey wrote: > On 12/3/18 9:49 AM, Mattias Andr=C3=A9e wrote: > > On Mon, 3 Dec 2018 09:33:48 -0500 > > Chet Ramey wrote: > > =20 > >> On 12/1/18 3:12 PM, Mattias Andr=C3=A9e wrote: =20 > >>> 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 twice. 4/ and 5 will > >>> be suggested, but if you press > >>> you will see that it should suggest the> files in /home. =20 > >> > >> It's not a bug. Bash maintains a logical view of the file system and t= he > >> current directory for cd, pwd, and $PWD, as Posix specifies. One of t= he > >> 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, whi= ch > >> includes completion. > >> > >> If you want to see a physical view of the file system, use > >> `set -o physical'. > >> =20 > >=20 > > Is there a way to only get physical view for > > completion but logical view for cd, pwd, and $PWD? =20 >=20 > 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'. >=20 Thanks!