Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: protect backslash before space
- X-seq: zsh-users 30474
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: protect backslash before space
- Date: Wed, 1 Apr 2026 10:41:59 -0700
- Archived-at: <https://zsh.org/users/30474>
- In-reply-to: <CAH+w=7YiwaGUaC3WM1gVs-WgiA1nBX4AUPX6YchJepsOyqYP_g@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <f8b01396-d8c8-4837-aa8c-3f1e467bfeaa@eastlink.ca> <CAH+w=7YiwaGUaC3WM1gVs-WgiA1nBX4AUPX6YchJepsOyqYP_g@mail.gmail.com>
Nuts, it's easy. Mark showed me:
alias test='noglob _test'
function _test ()
{
ls -l -- $~@
}
ls -l -- $@
echo
run:
5 /aWorking/Zsh/Source/Wk 3 % . test junk\ * && test junk\ *
-rw-r--r-- 1 root root 0 Apr 1 10:34 'junk a'
-rw-r--r-- 1 root root 0 Apr 1 10:35 'junk b'
-rw-r--r-- 1 root root 0 Mar 31 18:55 'junk junk'
-rw-r--r-- 1 root root 0 Apr 1 10:34 'junk a'
-rw-r--r-- 1 root root 0 Apr 1 10:35 'junk b'
-rw-r--r-- 1 root root 0 Mar 31 18:55 'junk junk'
... I wonder how much sinful 'eval'ing I'm doing when '$~@' seems to
expand the globs just fine. You don't know what you don't know.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author