From: Robert Rothenberg Date: 16:20 on 01 Feb 2007 Subject: Bash file completion, symbolic links and pwd confusion Note the following session: me@nix:~$ mkdir foo me@nix:~$ mkdir foo/bar me@nix:~$ mkdir foo/feh me@nix:~$ mkdir baz me@nix:~$ mkdir baz/bo me@nix:~$ cd baz me@nix:~/baz$ ln -s ../foo/bar me@nix:~/baz$ cd bar me@nix:~/baz/bar$ ls ../bo Bash file completion works as one expects. I'm in "baz/bar". That's even what pwd says: me@nix:~/baz/bar$ pwd /home/me/baz/bar So ".." should refer to "baz". But when I run that ls command ls: ../bo: No such file or directory Because ls knows it's really in "foo/bar", not "baz/bar" me@nix:~/baz/bar$ ls .. bar feh I understand that there are good reasons for this behaviour on the part of commands like ls. But why can't bash's file completion behave consistently with everything else?
From: Tony Finch Date: 17:25 on 01 Feb 2007 Subject: Re: Bash file completion, symbolic links and pwd confusion You can turn off this POSIX-me-harder braindamage with set -P. Tony.
From: peter (Peter da Silva) Date: 20:30 on 01 Feb 2007 Subject: Re: Bash file completion, symbolic links and pwd confusion Bash is doing the wrong thing. You are in "foo/bar". There is nothing inside "foo/bar" for any program you run to tell that you got there by following a symbolic link. Bash is hiding this from you. This is like getting on a plane and having it fly to the wrong airport, and your Joo Janta Peril Sensitive sunglasses magically changing the name of the city you're in to the one you were scheduled to go to whenever you look at a sign. This would be fine if it also magically moved the hotel you were booked into to the new destination, and magically changed the cabbies so they knew about the change. I'm sure that will be possible some time after the Singularity and we'll all be living in mediated environments and forget there's a real world, but I suspect there will be problems with that. Hateful beggar, bash is.
From: Bill Page Date: 23:01 on 01 Feb 2007 Subject: Re: Bash file completion, symbolic links and pwd confusion I think you'll find that if you scratch the Made in China sticker off your sunglasses, it says Hecho en Mexico, dude. http://www.achewood.com/index.php?date=07312006 On 2/2/07, Peter da Silva <peter@xxxxxxx.xxx> wrote: > Bash is doing the wrong thing. > > You are in "foo/bar". There is nothing inside "foo/bar" for any program > you run to tell that you got there by following a symbolic link. Bash > is hiding this from you. > > This is like getting on a plane and having it fly to the wrong airport, > and your Joo Janta Peril Sensitive sunglasses magically changing the name > of the city you're in to the one you were scheduled to go to whenever you > look at a sign. > > This would be fine if it also magically moved the hotel you were booked into > to the new destination, and magically changed the cabbies so they knew about > the change. I'm sure that will be possible some time after the Singularity > and we'll all be living in mediated environments and forget there's a real > world, but I suspect there will be problems with that. > > Hateful beggar, bash is. > >
From: Tony Finch Date: 00:24 on 02 Feb 2007 Subject: Re: Bash file completion, symbolic links and pwd confusion On Thu, 1 Feb 2007, Peter da Silva wrote: > Bash is doing the wrong thing. It's not a bash bug, it's a posix bug. BSD sh and ksh will do the same broken thing by default. Tony.
From: Peter da Silva Date: 03:00 on 02 Feb 2007 Subject: Re: Bash file completion, symbolic links and pwd confusion Is software any less hateful just because other software is hateful as well?
Generated at 12:28 on 17 Feb 2008 by mariachi