Op 26-03-09 14:24, Jari Aalto schreef:
Package: wcd
Version: 3.2.0-1
Severity: normal


Wcd records information using absolute path names:

    $ cd ~/some/project/tree/deep/here
    $ wcd -l
    Enter alias for current directory: test

    $ cat $WCDHOME/.alias.wcd
    
/mnt/nfs/sripe-server/home/user/staff/depatment-xx/j/ja/jaalto/some/project/tree/deep/here

And this happens:

    $ wcd test
    
/mnt/nfs/sripe-server/home/user/staff/depatment-xx/j/ja/jaalto/some/project/tree/deep/here$

Notice the prompt, where cursor sithe to the rightmost of ($). The typical bash 
setting contains
the path name '\w' to keep track of current directory:

     $ echo $PS1
     \...@\h \w\$

SUGGESTION

Please substitute all path names so that the tilde(~) is used instead
of absolute path name. To my understanding all interactive *user*
shells (csh, tcsh, bash, ksh, pdksh etc.) support tilde expansion, so
this should not create interactive use problems. Alternativey add new
configuration option that would export path using tilde.

This idea would be same as applying following code, before storing the
PATH information:

        pwd | sed "s,$HOME,~,"

Naturally implement in C, using getenv("HOME") ans some string
manipulation.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages wcd depends on:
ii  libc6                     2.9-4          GNU C Library: Shared libraries
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand

wcd recommends no packages.

wcd suggests no packages.

-- no debconf information


Wcd will report the same path as `/bin/pwd', and that is different than the shell builtin `pwd' command. For instance if you cd to a soft link that is a link to a directory `pwd' will report a different path than `/bin/pwd'. Wcd has no access to the shell builtin commands. That is also the reason why the wcd executable cannot change directory, and we have to do a trick with a shell function.

Replacing $HOME with ~ will not work in multi-user environments if people start reading each others .wcd files. ~ has a different meaning for every user.

It looks like that on your system the auto mounter has mounted your $HOME to /mnt/nfs/sripe-server/home/user/staff/depatment-xx/j/ja/jaalto What path do you get if you type `pwd' and `/bin/pwd' in your $HOME directory?

Wcd assumes a default way of working of the auto mounter, that all HOME directories are auto mounted in /tmp_mnt/.
For instance my HOME dir is mounted to
/tmp_mnt/home/waterlan
In my HOME dir the output of pwd is as follows:
>pwd
/home/waterlan
>/bin/pwd
/tmp_mnt/home/waterlan

Wcd will also see /tmp_mnt/home/waterlan, but automatically strips /tmp_mnt from the path. The "/tmp_mnt" string is hard coded in Wcd. Perhaps it is better to make this configurable.

best regards,

Erwin







--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to