zsh-workers
 help / color / mirror / code / Atom feed
* About quoting
@ 2002-01-02 20:38 Raúl Núñez de Arenas Coronado
  2002-01-02 21:05 ` Zefram
  0 siblings, 1 reply; 3+ messages in thread
From: Raúl Núñez de Arenas Coronado @ 2002-01-02 20:38 UTC (permalink / raw)
  To: Zsh

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

    Hello all zshworkers :))

    First of all, happy new year :)

    I have a little problem with quoting. I'm not understanding
something about it. With Bash I can do the following:

    $ export PAGER="/my/pager --flag --otherflag -"
    $ ls | $PAGER

    And it works. But under zsh, when doing the redirection above,
the shell complains 'no such file or directory: /my/pager --flag...'.

    The matter here, I think, is that spaces remains quoted when
doing the expansion in the redirection. Anyway, I need to quote the
spaces in order to define de variable, or zsh will complain then.

    How can I do this with zsh?

    Thanks a lot :)

    Raúl


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: About quoting
@ 2002-01-02 21:32 Raúl Núñez de Arenas Coronado
  0 siblings, 0 replies; 3+ messages in thread
From: Raúl Núñez de Arenas Coronado @ 2002-01-02 21:32 UTC (permalink / raw)
  To: raul, zefram; +Cc: zsh-workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

    Hi Zefram :))

    Thanks a lot for your answer, fast and good :))

>There are several solutions.  If you want to divide up a scalar value
>in that way, add an "=" after the "$", so

    This will do, since none of my binaries (AFAIK) use $PAGER thru
the shell...

>You can also set the option SH_WORD_SPLIT, which does this
>automatically for all variable substitutions, but this is a bad
>idea, because it's often useful to retain spaces in a variable
>expansion.

    Anyway, I need bash compatibility, so this is not a bad idea too.

    I'll try the second solution first.

    Thanks a lot again :))

    Raúl


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

end of thread, other threads:[~2002-01-02 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 20:38 About quoting Raúl Núñez de Arenas Coronado
2002-01-02 21:05 ` Zefram
2002-01-02 21:32 Raúl Núñez de Arenas Coronado

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).