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

Re: unshift



On Mon, Apr 1, 2024 at 6:11 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2024-04-01 07:38, Roman Perepelitsa wrote:
> >
> > That's an interesting challenge. A start:
>
> Very interesting!  Could it be official?  Maybe not worth it's weight
> but ...

It doesn't seem super useful to be honest. The semantics are odd, too.
What should this do?

    shift
    set blah
    unshift

Or this?

    foo=(42)
    shift foo
    integer foo
    unshift

There is no obvious answer, only options with pros and cons. The path
from a special-purpose hack to a general solution is long and arduous.

Roman.




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