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

Re: unshift



On 2024-04-01 14:54, Mark J. Reed wrote:
I haven't read your whole message yet, but to unshift a new value in
front of the positional params, all you have to do is this:

    set -- "$new" "$@"

And now $1 is "$new", $2 is whatever $1 used to be, and so on.
[...]

Or

argv[1,0]=$new

--
Stephane




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