Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Strange prompting in new 3.1.5



On Nov 4, 12:44pm, Stucki wrote:
} Subject: Strange prompting in new 3.1.5
}
} I installed the new Version 3.1.5 and since then my
} (unchanged) 'prompt' always showed '~PWD' where '%~'
} is expanded.

This changed because PWD was "special" before 3.1.5, but became an
ordinary parameter in 3.1.5.  When it was "special" it never got
added to the named directory hash table.

On Nov 4,  1:26pm, Peter Stephenson wrote:
} Subject: PATCH: Re: Strange prompting in new 3.1.5
}
} "Zefram" wrote:
} > Basically, AUTO_NAME_DIRS is a really bad idea if you want to do
} > %~ expansion.  Think about it: ~PWD is always a correct name for the
} > directory you're in.  It's just not useful.  Even if we make an exception
} > for PWD, there's nothing stopping other parameters being equally unhelpful
} > (OLDPWD, and anything the user uses in the chpwd function).
} 
} But %~ doesn't use OLDPWD and users can make arrangments for their own
} variables, whereas PWD is set by the shell and it's up to the shell to
} make it useful.  I don't think it's good enough simply saying %~ and
} autonamedirs are incompatible; that's the shell's fault, not the
} user's.

I have to agree with Peter here.  The shell shouldn't be screwing up its
own features.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author