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

Re: How to stop dir expansion in the prompt?



2014-11-04 15:36 GMT+08:00 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:

> /#$HOME/ means the pattern has to match at the start of the string.
> Are you sure the value of $vcs_info_msg_0_ starts with the directory
> name?

When outside a vcs directory, `echo $vcs_info_msg_0_` gives %d, which
is the same string in zstyle nvcsformat.
So in this scenario, it would be better to let it expand to the actual
full path so that I can do the replacement.
Any idea on that? (My last idea is to insert a function into the
prompt, but it's ugly).


 >Also, why is the %% in the inner expansion?  (I guess it was in
> your original example too, but it's extraneous if there's nothing
> between it and the closing brace.)
Yup. One minor question. No matter how many % I write, like this
one:echo  ${vcs_info_msg_0_%%%%%}, it's the same as echo
${vcs_info_msg_0_}. So what's % here?


Again. Thanks for your help.


-- 

吾輩は猫である。ホームーページはhttp://introo.me。;



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