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

Two different zsh sessions handle $* differently



Hi zsh-workers,

Recently I noticed that my journal script has started to lose data. Then
I noticed that this is somehow in how zsh handles my little helper
function. This peculiarly affects one zsh session and not many others
that I can see.

This is what happens in a freshly launched session:

    (~) echo $ZSH_VERSION
    5.2

    (~) whence -f j
    j () {
        noglob journal.py "$*"
    }

    (~) j Test. ABC this is a test.
    argv ['/home/progo/pika/journal.py', 'Test. ABC this is a test.']


And this is what the faulty session does:


    (~) echo $ZSH_VERSION
    5.2

    (~) whence -f j
    j () {
        noglob journal.py "$*"
    }

    (~) j Test. ABC this is a test.
    argv ['/home/progo/pika/journal.py', 'Test.']


The python script is modified to be trivial:

    (~) head -n5 /home/progo/pika/journal.py
    #!/usr/bin/env python3

    import sys
    print ('argv', sys.argv)
    sys.exit (0)


The faulty session might be a longer running one, if there's a way to
find out zsh-uptime, let me know. But I have several terminals open with
at least as old zsh sessions running, they behave correctly.

Unless X crashes or there's a long electricity break, I'll have these
sessions open if anyone comes up with something I can run to help with
this issue.

BR,
-- Mikael



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