Re: the subshell's way of chdir'ing
- From: Pavel Roskin <proski gnu org>
- To: Oskar Liljeblad <oskar osk mine nu>
- Cc: mc-devel gnome org
- Subject: Re: the subshell's way of chdir'ing
- Date: Fri, 6 Sep 2002 20:37:18 -0400 (EDT)
Hello, Oskar!
> Check out this bug:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150996&repeatmerged=yes
>
> Short desc: When the subshell is active and you change dir in the
> panels in MC, MC must make the subshell change dir too. This is
> done by something like « cd "`echo '\0..\0..'`"» where \0..\0..
> is a bunch of octal numbers. The problem is that some shells
> require 'echo -e' instead of 'echo'.
My understanding of the discussion is that some versions of zsh require
"-e", at least in some circumstances. I've applied a patch to use "-e"
with zsh.
The original reporter was too emotional to mention his version of zsh.
And by the way, I did test the original code with bash, tcsh and zsh, so
the subject "Sick way of chdir'ing incompatible with non bash shells" is
misleading.
> Would it not be possible to fix this by doing
>
> cd "`cat some-temp-file-containing-new-working-dir`"
>
> instead? Slower but more portable I think.
For that matter, using printf (as Clint Adams suggested) would be better,
since reading the filesystem is faster that writing to it. But I don't
think we are forced the abandon "echo".
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]