From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13681 invoked from network); 5 Sep 1997 23:46:11 -0000 Received: from math.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 5 Sep 1997 23:46:11 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id TAA15587; Fri, 5 Sep 1997 19:38:43 -0400 (EDT) Resent-Date: Fri, 5 Sep 1997 19:38:22 -0400 (EDT) Date: Sat, 6 Sep 1997 01:37:26 +0200 (MET DST) From: Wolfgang Hukriede Message-Id: <199709052337.BAA28775@sally.ifm.uni-kiel.de> To: zsh-users@math.gatech.edu, kutek@cybercomm.net Subject: Re: escaping a colon in a function Resent-Message-ID: <"9FtSh2.0.mo3.jV94q"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1004 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu zsh-3.0.2> x=addr:0.0.0.0 zsh-3.0.2> echo ${x##addr:} 0.0.0.0 apparently works. No escaping of the colon is necessary at all. Greetings, Wolfgang. -- kutek@cybercomm.net wrote: > i have read the docs and i have not found therein a way to escape a > colon within a function. > > what i am doing is parsing the output of ifconfig to get my currently > active ip address.the ouput of that function is in the form > > addr:0.0.0.0 > > and i am attempting to use the ${name##pattern} construct to remove the > "addr:" from the ultimate output. unfortunately,zsh seems to be interpreting > the colon in the pattern as a delimiter and complains that there is no > closing brace in the function. i have tried both single and double quotes > as well as the backslash to escape the colon's special meaning..to no avail.