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

Re: Empty element elision and associative arrays (was Re: Slurping a file)





On Fri, Jan 19, 2024 at 8:46 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
  v      Used with k, substitute (as two consecutive words) both the key and the value of each associative array element.  

It seems that the `kv` is effectively applied before the `o`, so you get the keys and values intermixed and then the whole list sorted together. Hard to imagine a use case where that would be the desired outcome. 

I understand that the expansion flags are generally intended to be independent of each other, but I wonder if it's not worth special-casing a few combinations to ensure the most useful interpretation.

--
Mark J. Reed <markjreed@xxxxxxxxx>


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