Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Linda Walsh Newsgroups: gnu.bash.bug Subject: Re: bash expanding relative paths in auto-complete Date: Fri, 14 Aug 2015 11:48:11 -0700 Lines: 67 Approved: bug-bash@gnu.org Message-ID: References: <55CD1B61.8030405@tlinx.org> <87bneaxrvu.fsf@igel.home> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1439578108 16195 208.118.235.17 (14 Aug 2015 18:48:28 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Andreas Schwab Envelope-to: bug-bash@gnu.org User-Agent: Thunderbird In-Reply-To: <87bneaxrvu.fsf@igel.home> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 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:11351 Andreas Schwab wrote: > Linda Walsh writes: > >> in bash 4.3.39, >> if I type a command, (like "."(source)) and a relative path >> like : ../conf, >> it expands the relative pathname to absolute pathnames. > > Worksforme. Make sure to run complete -r first. --- Nope -- didn't change anything. But throwing in a complete -D prevented any expansions until I typed in complete -r again. complete -r says to remove all completion specifications. I tried complete -p ../l -- and that printed out all the files starting w/'l' in my 'bin' dir (currently in ~/bin/sys; so from there, I can type ls ../lib and see all the lib supporting stuff under ~/bin/lib, but it changes a typed "ls ../l -> "ls "/home/law/bin/l" Also tried a clean environment: env bash --norc --noprofile -- and that undefined my aliases until I typed a new command: Ishtar:law/bin/sys> env bash --norc --noprofile bash: _pf: command not found ...elided 22 copies of same ... bash: _pf: command not found Ishtar:> which bash ## ===== Notice the 1st prompt before I type which bash doesn't show the 'cwd' (_pf, BTW, is an alias for printf for when I'm writing out my "spwd" (short pwd) to print out a shortened version of my current directory for my prompt and window title). I do have "expand_tilde", but I'm not using a tilde and the same happens in: Ishtar:/etc/local> ls ../rc. rc.d@ rc.splash rc.status.orig rc.status.rpmsave* rc.include rc.status rc.status.rpmorig* rc.status.systemd Ishtar:/etc/local> ls /etc/rc. <<-- .. changed to /etc I ran into this, BTW, when I was looking at a src-tree that used symlinks w/abs. paths, so when I ran it with make clean, the symlinks pointed at the real root-based binaries rather than the tree-based binaries. This resulted in "rmx -fr *" (rmx=rm --one-file-system) not seeing that the symlinks (or mount-points) in the starting dir were on different file systems and rm only checks to see that *descendants* of cmdline-args are on the same FS -- which used to not be a problem when you could do an "rmx -fr ." which would delete the contents before failing on "." at the end (w/msg suppressed by "-f"). Sigh.