Re: Proposal for bug 73937 / symlinks in nautilus



Iain,
	Oh yes.  Let's follow what the shell does!  Here's the relevant docs:

       symlinks (+)
               Can  be set to several different values to control
               symbolic link (`symlink') resolution:

               If set to `chase', whenever the current  directory
               changes to a directory containing a symbolic link,
               it is expanded to the real name of  the  directory
               to  which the link points.  This does not work for
               the user's home directory; this is a bug.

               If set to `ignore', the shell tries to construct a
               current  directory  relative to the current direc-
               tory before the link was crossed.  This means that
               cding  through a symbolic link and then `cd ..'ing
               returns  one  to  the  original  directory.   This
               affects only builtin commands and filename comple-
               tion.

               If set to `expand', the shell tries  to  fix  sym-
               bolic  links by actually expanding arguments which
               look like path names.  This affects  any  command,
               not  just  builtins.  Unfortunately, this does not
               work  for  hard-to-recognize  filenames,  such  as
               those  embedded in command options.  Expansion may
               be prevented by quoting.  While  this  setting  is
               usually  the most convenient, it is sometimes mis-
               leading and sometimes confusing when it  fails  to
               recognize an argument which should be expanded.  A
               compromise is to use `ignore' and use  the  editor
               command  normalize-path (bound by default to ^X-n)
               when necessary.

               Some examples are in order.  First, let's  set  up
               some play directories:

                   > cd /tmp
                   > mkdir from from/src to
                   > ln -s from/src to/dist

               Here's the behavior with symlinks unset,

                   > cd /tmp/to/dist; echo $cwd
                   /tmp/to/dist
                   > cd ..; echo $cwd
                   /tmp/from

               here's the behavior with symlinks set to `chase',

                   > cd /tmp/to/dst; echo $cwd
                   /tmp/from/src
                   > cd ..; echo $cwd
                   /tmp/from

               here's the behavior with symlinks set to `ignore',

                   > cd /tmp/to/dist; echo $cwd
                   /tmp/to/dst
                   > cd ..; echo $cwd
                   /tmp/to

               and here's  the  behavior  with  symlinks  set  to
               `expand'.

                   > cd /tmp/to/dist; echo $cwd
                   /tmp/to/dst
                   > cd ..; echo $cwd
                   /tmp/to
                   > cd /tmp/to/dist; echo $cwd
                   /tmp/to/dst
                   > cd ".."; echo $cwd
                   /tmp/from
                   > /bin/echo ..
                   /tmp/to
                   > /bin/echo ".."
                   ..

               Note  that  `expand'  expansion 1) works just like
               `ignore' for builtins like cd, 2) is prevented  by
               quoting,  and  3)  happens  before  filenames  are
               passed to non-builtin commands.



On Sun, 2003-01-12 at 08:19, iain wrote:
> søn, 2003-01-12 kl. 07:44 skrev Rolf Kulemann:
> 
> > -------------------------------------------------------------------------
> > Perhaps it would make sense to make an option in nautilus's preferences
> > so users can choose the behavior.
> > The useability team can propose what default option would make sense.
> > -------------------------------------------------------------------------
> 
> That really sounds like the "Please unbreak me" option.
> 
> My opinion is that we should do whatever "cd .." does, because that in
> reality is what clicking the button really should be meaning.
> 
> On bash I think it does it the way it works now.
> /misc -> /mnt/misc
> cd /misc
> cd ..
> pwd gives /





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