Note the following session:

 m...@nix:~$ mkdir foo
 m...@nix:~$ mkdir foo/bar
 m...@nix:~$ mkdir foo/feh
 m...@nix:~$ mkdir baz
 m...@nix:~$ mkdir baz/bo
 m...@nix:~$ cd baz
 m...@nix:~/baz$ ln -s ../foo/bar
 m...@nix:~/baz$ cd bar
 m...@nix:~/baz/bar$ ls ../bo

Bash file completion works as one expects. I'm in "baz/bar". That's even
what pwd says:

 m...@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"

  m...@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?

Reply via email to