zsh-users
 help / color / mirror / code / Atom feed
* Minor expansion problem
@ 2001-09-25 13:09 Peter Stephenson
  2001-09-25 15:30 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 2001-09-25 13:09 UTC (permalink / raw)
  To: Zsh users list

Can anyone would explain why I get

% echo foo and, just to be different, bar >foo
% echo `cat foo`<TAB>
     ->foo\ and,\ just\ to\ be\ different,\ bar.

with the _expand completer (and complete-word bound to TAB), but what I
expect, i.e. no backslashes, with the _expand_word widget?  I've stared at
my styles but can't see what might be causing it.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* Re: Minor expansion problem
  2001-09-25 13:09 Minor expansion problem Peter Stephenson
@ 2001-09-25 15:30 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-09-25 15:30 UTC (permalink / raw)
  To: Peter Stephenson, Zsh users list

On Sep 25,  2:09pm, Peter Stephenson wrote:
}
} Can anyone would explain why I get
} 
} % echo foo and, just to be different, bar >foo
} % echo `cat foo`<TAB>
}      ->foo\ and,\ just\ to\ be\ different,\ bar.
} 
} with the _expand completer (and complete-word bound to TAB)

It's in part because you used backticks.  Expanding $(...) doesn't put
in backslashes, but expanding `...` does.  This appears to be happening
because the ${(e)exp} at _expand line 83 returns one word for `...` but
an array for $(...).

} but what I expect, i.e. no backslashes, with the _expand_word widget?

Hrm, I get backslashes in both cases.  Are you sure you're using the
_expand_word widget (^Xe) and not the builtin expand-word (^X*) ?

} I've stared at my styles but can't see what might be causing it.

The only style that I can see getting involved here is the "glob"
style, in contexts :completion:expand:* and :completion:expand-word:*.
See _expand line 98.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

end of thread, other threads:[~2001-09-25 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-25 13:09 Minor expansion problem Peter Stephenson
2001-09-25 15:30 ` Bart Schaefer

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