zsh-workers
 help / color / mirror / code / Atom feed
* suffix aliases behaving weird?
@ 2007-06-25 16:26 Frank Terbeck
  2007-06-25 17:23 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Terbeck @ 2007-06-25 16:26 UTC (permalink / raw)
  To: zsh workers

Hi list!

Consider the following:

[snip]
  % alias -s ogg='ogg123'
  % /mnt/audio/music/S/Slayer\ -\ South\ Of\ Heaven\ -\ 01\ -\ South\ Of\ Heaven.ogg
      [plays fine]
  % "/mnt/audio/music/S/Slayer - South Of Heaven - 01 - South Of Heaven.ogg"
  zsh: permission denied: /mnt/audio/music/S/Slayer - South Of Heaven - 01 - South Of Heaven.ogg
[snap]

Bug or intended behaviour?

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


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

* Re: suffix aliases behaving weird?
  2007-06-25 16:26 suffix aliases behaving weird? Frank Terbeck
@ 2007-06-25 17:23 ` Peter Stephenson
  2007-06-25 17:40   ` Frank Terbeck
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2007-06-25 17:23 UTC (permalink / raw)
  To: zsh workers

Frank Terbeck wrote:
>   % "/mnt/audio/music/S/Slayer - South Of Heaven - 01 - South Of Heaven.ogg"
>   zsh: permission denied: /mnt/audio/music/S/Slayer - South Of Heaven - 01 - 
> South Of Heaven.ogg
> [snap]
> 
> Bug or intended behaviour?

That's how aliases work: they're handled very early, before processing
of quotes, so it looks like the suffix is `ogg"'.  If you use
backslashes you won't have that problem.  Completion used to convert
automatically to backslashed form but it doesn't any more (I think I've
bitten off my than I can chew here, actually, but I can't put my finger
on exactly how it happened anyway).  With 4.3 the following ZLE widget
will do it:

backslashify() {
    modify-current-argument '${(q)${(Q)ARG}}'
}
autoload -U modify-current-argument
zle -N backslashify

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: suffix aliases behaving weird?
  2007-06-25 17:23 ` Peter Stephenson
@ 2007-06-25 17:40   ` Frank Terbeck
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Terbeck @ 2007-06-25 17:40 UTC (permalink / raw)
  To: zsh workers

Peter Stephenson <pws@csr.com>:
> Frank Terbeck wrote:
> >   % "/mnt/audio/music/S/Slayer - South Of Heaven - 01 - South Of Heaven.ogg"
> >   zsh: permission denied: /mnt/audio/music/S/Slayer - South Of Heaven - 01 - 
> > South Of Heaven.ogg
> > [snap]
> > 
> > Bug or intended behaviour?
> 
> That's how aliases work: they're handled very early, before processing
> of quotes, so it looks like the suffix is `ogg"'. [...]

Hm, and since that is the first thing mentioned in zshexpn(1), I
should probably read before babbling about maybe-bugs. :-)

Thanks, for pointing it out, Peter. :)

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


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

end of thread, other threads:[~2007-06-25 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 16:26 suffix aliases behaving weird? Frank Terbeck
2007-06-25 17:23 ` Peter Stephenson
2007-06-25 17:40   ` Frank Terbeck

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