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

Re: Why are prompt expansions of %v sequences quoted in bindkey style?



On Wed, Jan 24, 2024 at 10:53 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:

Thinking about this made me realize that namerefs can be quite useful here, eg
typeset -n .prompt.logicaldescription='psvar[3]'
then you don't have to remember what number you decided to use for
what (I always forget what I picked). And it makes code using them
slightly more self descriptive.

Can you give an example of how you would use this in practice? I'm not sure I understand.



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