zsh-users
 help / color / mirror / code / Atom feed
* question mark in filename.
@ 2021-01-10  4:49 Ray Andrews
  2021-01-10  5:39 ` Lawrence Velázquez
  2021-01-10  7:02 ` Roman Perepelitsa
  0 siblings, 2 replies; 11+ messages in thread
From: Ray Andrews @ 2021-01-10  4:49 UTC (permalink / raw)
  To: Zsh Users

Not that there should ever be such a thing, but I was curious:  I throw 
strings around mostly successfully but not with the stupid question mark:


    function test1 ()
    {
         input=( "$@" )         # 'input' is fine: "ls s,7*"
         eval $input            # this works fine.
         output=( $(eval ${()input}) )
         print "$output"        # ... but 'output' looses the question
    marks.
    }

    function test2 ()
    {
         string="ls s,7*"       # 'ls' finds: 's,7,big?improvements?in?code'
         test1 $string
    }

    $ . test; test2
    s,7,big?improvements?in?code
    s,7,big improvements in code

I've tried various invocations in the parenthesis, I thought '(q)' 
should work but no luck.  I'm know that protecting special characters is 
possible.  'output' prefers to be separate words, broken on the '?' but 
the outer parenthesis at least get it all back on one line.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-10 20:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-10  4:49 question mark in filename Ray Andrews
2021-01-10  5:39 ` Lawrence Velázquez
2021-01-10  5:46   ` Ray Andrews
2021-01-10  6:06     ` Lawrence Velázquez
2021-01-10  6:21       ` Ray Andrews
2021-01-10  7:02 ` Roman Perepelitsa
2021-01-10 15:03   ` Ray Andrews
2021-01-10 15:28     ` Roman Perepelitsa
2021-01-10 15:55       ` Ray Andrews
2021-01-10 16:32         ` Roman Perepelitsa
2021-01-10 20:57           ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).