bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: completion inconsistencies involving symlinks


From: Chet Ramey
Subject: Re: completion inconsistencies involving symlinks
Date: Fri, 08 Sep 2006 12:04:58 -0400
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

Kartik K. Agaram wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
> -DCONF_VENDOR='pc' 
> -DLOCALEDIR='/var/local/akkartik/akk.tmp/bash/bash-3.1/install/share/locale' 
> -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g 
> -O2
> uname output: Linux xxxxxxxx.cs.utexas.edu 2.6.17.4 #1 SMP Wed Jul 12 
> 14:41:00 CDT 2006 i686 GNU/Linux
> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
> 
> Description:
>   If any part of cwd is a symlink, file completion when you try to navigate
>   above that part follows the logical path. This is in conflict with all
>   coreutils commands that use the physical path.
> 
>   ---
> 
>   In an ideal world I think bash's completion makes more sense than coreutils
>   semantics. But after looking into coreutils sources and ext2 documentation
>   
> (http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.11.tar.bz:Documentation/filesystems/ext2.txt)
>   I conclude that the 'logical path' is maintained only by the shell, not in
>   the filesystem. If I'm right, then the whole notion of logical path is a
>   leaky abstraction honored only by 'cd -L' (are there any others?). I would
>   really like to be told I'm wrong.

The shell's concept of a logical view of the file system (the default, as
specified by POSIX) is maintained by `cd' and communicated to other
processes via $PWD.  Other processes may or may not choose to use that
information.  There are environments where support for $PWD is pervasive.

If you're uncomfortable with the logical view of the file system and the
default treatment of `..', you can use `set -o physical' to force the shell
to always use physical pathnames.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]