On Wed, Apr 1, 2015 at 5:48 PM, Denys Vlasenko <[email protected]> wrote:
> On Wed, Apr 1, 2015 at 4:39 AM, santosh <[email protected]> wrote:
>> Hello!
>>
>> I have a link to directory.
>>
>> /var/test --> /hdd1/test.
>>
>> /$pwd
>> /
>> $cd /var/test
>> /hdd/test$
>>
>> The prompt's PS1 w should displays real directory name.
>> I like it to display like
>>
>> /var/test$
>>
>> Is there anything I can configure to get this behavior?
>
> No.
>
> In Unix, current directory is always physical.
> You can't really "cd to a symlink".
> When you do that, your current directory
> will be where symlink points to, not the symlink.

But busybox ash prompt displays physical unlike bash..

Here I'm pasting the output from bash and busybox ash.

BASH:
root@cmx52:~# ll /var/test
lrwxrwxrwx    1 root     root            10 Apr  1 13:35 /var/test -> /hdd1/test
root@cmx52:~# echo $PS1
\u@\h:\w\$
root@cmx52:~# cd /var/test
root@cmx52:/var/test# pwd
/var/test
root@cmx52:/var/test#

Busybox ASH:
root@cmx52:~# ll /var/test/
total 2
drwxr-xr-x    2 root     root          1024 Apr  1 13:35 .
drwxr-xr-x    3 root     root          1024 Apr  1 13:33 ..
root@cmx52:~# ll /var/test
lrwxrwxrwx    1 root     root            10 Apr  1 13:35 /var/test -> /hdd1/test
root@cmx52:~# echo $PS1
\u@\h:\w\$
root@cmx52:~# cd /var/test/
root@cmx52:/hdd1/test# pwd
/var/test
root@cmx52:/hdd1/test#

I just want busybox ash to display the prompt same as ash.

Thanks.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to