From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14534 invoked from network); 6 Oct 1998 19:28:42 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 6 Oct 1998 19:28:42 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id OAA23125; Tue, 6 Oct 1998 14:13:18 -0400 (EDT) Resent-Date: Tue, 6 Oct 1998 14:13:00 -0400 (EDT) To: zsh-users@math.gatech.edu Subject: Null tilde expansions? From: Greg Badros Date: 06 Oct 1998 11:16:28 -0700 Message-ID: X-Mailer: Gnus v5.4.65/XEmacs 20.4 - "Emerald" Resent-Message-ID: <"A1dom2.0.ze5.isb6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1831 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Is there any way to make ~notauser not cause an error (similar to the null globbing option)? I'd like this to give me the home directories of all the users in group oo_gang users=(`ypcat group | awk -F: '/^oo_gang\>/ { printf $4 }' | tr , ' '`) dirs=~$^users without first having to eliminate users from $users which no longer exist (our sysadmins aren't good about eliminating users from groups when the remove the user account). Thanks, Greg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17364 invoked from network); 7 Oct 1998 01:15:22 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 01:15:22 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id VAA01566; Tue, 6 Oct 1998 21:07:00 -0400 (EDT) Resent-Date: Tue, 6 Oct 1998 21:06:53 -0400 (EDT) Message-ID: <19981006211316.A4791@astaroth.nit.gwu.edu> Date: Tue, 6 Oct 1998 21:13:16 -0400 From: Sweth Chandramouli To: zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? Mail-Followup-To: zsh-users@math.gatech.edu References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=KsGdsel6WgEHnImy X-Mailer: Mutt 0.93.2i In-Reply-To: Resent-Message-ID: <"Fqsef3.0.0O.jwh6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1832 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii On Tue, Oct 06, 1998 at 11:16:28AM -0700, Greg Badros wrote: > exist (our sysadmins aren't good about eliminating users from groups > when the remove the user account). don't know about how to do what you want in zsh, but here's a quick perl script i whipped up a week ago to do what your sysadmins aren't doing. set $groupfile_out to something else at first, to test, since i don't want to be responsible for anything happening to your system. (this assumes you can either run this script as root or convince your admins to, of course...) -- sweth. -- Sweth Chandramouli IS Coordinator, The George Washington University / (202) 994 - 8521 (V) / (202) 994 - 0458 (F) * --KsGdsel6WgEHnImy Content-Type: application/x-perl Content-Description: Perl Script To Remove Non-Valid Users From /etc/group Content-Disposition: attachment; filename="fixgp.pl" #!/usr/local/bin/perl -w $passwdfile = "/etc/passwd"; $groupfile = "/etc/group"; $groupfile_out = ">/etc/group"; &mkuserlist; &fix_group_file; sub mkuserlist { $count = '0'; (open PASSWDFILE, $passwdfile) or die 'failed during opening of ', $passwdfile; @user_list = (); while () { chomp(($user_list[$count++]) = split(/:/,$_)); }; close PASSWDFILE; }; sub fix_group_file { &init_group_hash; &write_new_groupfile; }; sub init_group_hash { (open GROUPFILE, $groupfile) or die 'failed during open of ', $groupfile; while () { chomp(@tmp_array = split(/:/, $_)); $group_info = "$tmp_array[0]" . '::' . "$tmp_array[2]" . ':'; $user_count = '0'; GROUPMEMB: foreach $group_member (split(/,/, pop @tmp_array)) { foreach $user (@user_list) { if ($user eq $group_member) { if ($user_count++ == '0') { $group_info = $group_info . $group_member; } else { $group_info = $group_info . ',' . $group_member; }; next GROUPMEMB; }; }; }; push(@full_group_list, $group_info); }; close GROUPFILE; }; sub write_new_groupfile { (open GROUPFILE_OUT, $groupfile_out) or die 'failed during open of ', $groupfile_out; foreach $full_line ( @full_group_list ) { print GROUPFILE_OUT ($full_line, "\n"); }; }; --KsGdsel6WgEHnImy-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18702 invoked from network); 7 Oct 1998 03:57:24 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 03:57:24 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id XAA04272; Tue, 6 Oct 1998 23:51:26 -0400 (EDT) Resent-Date: Tue, 6 Oct 1998 23:51:17 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981006205428.ZM10148@candle.brasslantern.com> Date: Tue, 6 Oct 1998 20:54:28 -0700 In-Reply-To: Comments: In reply to Greg Badros "Null tilde expansions?" (Oct 6, 11:16am) References: X-Mailer: Z-Mail (4.0b.820 20aug96) To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"BIGg63.0.k11.qKk6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1834 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 6, 11:16am, Greg Badros wrote: } Subject: Null tilde expansions? } } Is there any way to make ~notauser not cause an error (similar to the } null globbing option)? unsetopt badpattern users=(`ypcat group | awk -F: '/^oo_gang\>/ { printf $4 }' | tr , ' '`) dirs=(~$^users) dirs=(${(M)dirs:#~) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14286 invoked from network); 7 Oct 1998 15:19:12 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 15:19:12 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id KAA14805; Wed, 7 Oct 1998 10:57:03 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 10:56:45 -0400 (EDT) To: "Bart Schaefer" Cc: zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? References: <981006205428.ZM10148@candle.brasslantern.com> From: Greg Badros Date: 07 Oct 1998 08:00:14 -0700 In-Reply-To: "Bart Schaefer"'s message of "Tue, 6 Oct 1998 20:54:28 -0700" Message-ID: X-Mailer: Gnus v5.4.65/XEmacs 20.4 - "Emerald" Resent-Message-ID: <"3pzu01.0.Zc3.i4u6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1838 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Bart Schaefer" writes: > On Oct 6, 11:16am, Greg Badros wrote: > } Subject: Null tilde expansions? > } > } Is there any way to make ~notauser not cause an error (similar to the > } null globbing option)? > > unsetopt badpattern > users=(`ypcat group | awk -F: '/^oo_gang\>/ { printf $4 }' | tr , ' '`) > dirs=(~$^users) > dirs=(${(M)dirs:#~) This doesn't work for me with Zsh 3.1.4 (few if any patches) or Zsh 3.0.5: % unsetopt badpattern % echo ~notauser zsh: no such user or named directory: notauser The badpattern option does look like the right thing, but perhaps it's broken? Thanks for the response... Greg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14542 invoked from network); 7 Oct 1998 15:40:45 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 15:40:45 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA15597; Wed, 7 Oct 1998 11:21:45 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 11:21:40 -0400 (EDT) Message-Id: <9810071511.AA34477@ibmth.df.unipi.it> To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? In-Reply-To: "Greg Badros"'s message of "07 Oct 1998 08:00:14 DFT." Date: Wed, 07 Oct 1998 17:11:42 +0200 From: Peter Stephenson Resent-Message-ID: <"3AEJf2.0.Dp3.4Su6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1839 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Greg Badros wrote: > "Bart Schaefer" writes: > % unsetopt badpattern > % echo ~notauser > zsh: no such user or named directory: notauser > > The badpattern option does look like the right thing, but perhaps > it's broken? I think the appropriate option is 'nomatch'. (Sounds OK to me, it's a match that's failing rather than a pattern that's been typed wrongly.) % setopt nomatch % echo ~nouser zsh: no such user or named directory: nouser % setopt nonomatch % echo ~nouser ~nouser % -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14563 invoked from network); 7 Oct 1998 15:43:34 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 15:43:34 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA15724; Wed, 7 Oct 1998 11:23:38 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 11:23:25 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981007082641.ZM12497@candle.brasslantern.com> Date: Wed, 7 Oct 1998 08:26:41 -0700 In-Reply-To: Comments: In reply to Greg Badros "Re: Null tilde expansions?" (Oct 7, 8:00am) References: <981006205428.ZM10148@candle.brasslantern.com> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Greg Badros Subject: Re: Null tilde expansions? Cc: zsh-users@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"TxRhm3.0.zq3.jTu6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1840 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 7, 8:00am, Greg Badros wrote: } Subject: Re: Null tilde expansions? } } "Bart Schaefer" writes: } } > On Oct 6, 11:16am, Greg Badros wrote: } > } Subject: Null tilde expansions? } > } } > } Is there any way to make ~notauser not cause an error (similar to the } > } null globbing option)? } > } > unsetopt badpattern } } This doesn't work for me with Zsh 3.1.4 (few if any patches) or Zsh 3.0.5: In the words of Geoff Wing: I hate it when I stuff up a post. unsetopt badpattern nomatch -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14684 invoked from network); 7 Oct 1998 15:59:48 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 15:59:48 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA16286; Wed, 7 Oct 1998 11:38:03 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 11:37:57 -0400 (EDT) To: "Bart Schaefer" Cc: zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? References: <981006205428.ZM10148@candle.brasslantern.com> <981007082641.ZM12497@candle.brasslantern.com> From: Greg Badros Date: 07 Oct 1998 08:41:25 -0700 In-Reply-To: "Bart Schaefer"'s message of "Wed, 7 Oct 1998 08:26:41 -0700" Message-ID: X-Mailer: Gnus v5.4.65/XEmacs 20.4 - "Emerald" Resent-Message-ID: <"2T0wZ1.0.sz3.Khu6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1841 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Bart Schaefer" writes: > On Oct 7, 8:00am, Greg Badros wrote: > } Subject: Re: Null tilde expansions? > } > } "Bart Schaefer" writes: > } > } > On Oct 6, 11:16am, Greg Badros wrote: > } > } Subject: Null tilde expansions? > } > } > } > } Is there any way to make ~notauser not cause an error (similar to the > } > } null globbing option)? > } > > } > unsetopt badpattern > } > } This doesn't work for me with Zsh 3.1.4 (few if any patches) or Zsh 3.0.5: > > In the words of Geoff Wing: I hate it when I stuff up a post. > > unsetopt badpattern nomatch Thanks. There were also some problems with the removing of ~notauser words that you suggested: > dirs=(${(M)dirs:#~) Besides the obvious typo of a closing paren for a closing brace, there are three problems: 1) I want the (R)est, not the match, right? 2) The ~ needs to be escaped, otherwise it'll get expanded. So what actually works for me in Zsh-3.1.4 and Zsh-3.0.x is: 3) The pattern after the # needs to match the whole word, so it needs a trailing *. echo ${(R)dirs:#\~*} # words that do not start with ~ #or echo ${(M)dirs:#/*} # words that start with / Thanks again for your pointers and suggestions. (And thanks to Peter Stephenson as well!) Greg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15055 invoked from network); 7 Oct 1998 16:55:28 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 16:55:28 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA18428; Wed, 7 Oct 1998 12:44:28 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 12:44:17 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981007094733.ZM14156@candle.brasslantern.com> Date: Wed, 7 Oct 1998 09:47:33 -0700 In-Reply-To: <9810071511.AA34477@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: Null tilde expansions?" (Oct 7, 5:11pm) References: <9810071511.AA34477@ibmth.df.unipi.it> <981006205428.ZM10148@candle.brasslantern.com> <981007082641.ZM12497@candle.brasslantern.com> In-Reply-To: Comments: In reply to Greg Badros "Re: Null tilde expansions?" (Oct 7, 8:41am) X-Mailer: Z-Mail (4.0b.820 20aug96) To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"64uz.0.EV4.Wfv6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1842 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 7, 5:11pm, Peter Stephenson wrote: } Subject: Re: Null tilde expansions? } } I think the appropriate option is 'nomatch'. (Sounds OK to me, it's a } match that's failing rather than a pattern that's been typed wrongly.) I first tried it with just no_nomatch, and got an error. However, now that I fool with it again, I must have mistyped something else, because it is indeed only no_nomatch that's required. On Oct 7, 8:41am, Greg Badros wrote: } Subject: Re: Null tilde expansions? } } > dirs=(${(M)dirs:#~) } } Besides the obvious typo of a closing paren for a closing brace, there } are three problems: } } 1) I want the (R)est, not the match, right? } 2) The ~ needs to be escaped, otherwise it'll get expanded. } 3) The pattern after the # needs to match the whole word, so it needs a } trailing *. Bleah. This is what I get for testing stuff on a machine where the only home directory is my own, so the expansion of the only valid username "accidentally" matches the expansion of ~. Yes, you're right. Or just ${dirs##~*}, in which the ~ is not expanded in the first place. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15721 invoked from network); 7 Oct 1998 17:59:03 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 17:59:03 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA21189; Wed, 7 Oct 1998 13:47:19 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 13:47:09 -0400 (EDT) To: "Bart Schaefer" Cc: zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? References: <9810071511.AA34477@ibmth.df.unipi.it> <981006205428.ZM10148@candle.brasslantern.com> <981007082641.ZM12497@candle.brasslantern.com> <981007094733.ZM14156@candle.brasslantern.com> From: Greg Badros Date: 07 Oct 1998 10:50:30 -0700 In-Reply-To: "Bart Schaefer"'s message of "Wed, 7 Oct 1998 09:47:33 -0700" Message-ID: X-Mailer: Gnus v5.4.65/XEmacs 20.4 - "Emerald" Resent-Message-ID: <"_9Orh2.0.bA5.Taw6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1843 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Bart Schaefer" writes: > On Oct 7, 8:41am, Greg Badros wrote: > } Subject: Re: Null tilde expansions? > } > } > dirs=(${(M)dirs:#~) > } > } Besides the obvious typo of a closing paren for a closing brace, there > } are three problems: > } > } 1) I want the (R)est, not the match, right? > } 2) The ~ needs to be escaped, otherwise it'll get expanded. > } 3) The pattern after the # needs to match the whole word, so it needs a > } trailing *. > > Bleah. This is what I get for testing stuff on a machine where the only > home directory is my own, so the expansion of the only valid username > "accidentally" matches the expansion of ~. > > Yes, you're right. Or just ${dirs##~*}, in which the ~ is not expanded > in the first place. Why does the ~ not get expanded? This doesn't work in 3.1.4 or 3.0.x for me. I need to escape the ~ with a backslash here, too. Greg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16115 invoked from network); 7 Oct 1998 18:46:03 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 18:46:03 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id OAA22368; Wed, 7 Oct 1998 14:33:45 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 14:33:37 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981007113639.ZM15544@candle.brasslantern.com> Date: Wed, 7 Oct 1998 11:36:39 -0700 In-Reply-To: Comments: In reply to Greg Badros "Re: Null tilde expansions?" (Oct 7, 10:50am) References: <9810071511.AA34477@ibmth.df.unipi.it> <981006205428.ZM10148@candle.brasslantern.com> <981007082641.ZM12497@candle.brasslantern.com> <981007094733.ZM14156@candle.brasslantern.com> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"qjPES1.0.0T5.0Gx6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1844 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 7, 10:50am, Greg Badros wrote: } Subject: Re: Null tilde expansions? } } > Yes, you're right. Or just ${dirs##~*}, in which the ~ is not expanded } > in the first place. } } Why does the ~ not get expanded? This doesn't work in 3.1.4 or 3.0.x } for me. I need to escape the ~ with a backslash here, too. I dunno, but: aztec[26] gunk=(schaefer glorb bobg flarn fox) aztec[27] dirs=(~$^gunk) zsh: no such user or named directory: glorb aztec[28] setopt nonomatch aztec[29] dirs=(~$^gunk) aztec[30] echo ${dirs##~*} /home/schaefer /home/bobg /home/fox aztec[31] echo $dirs /home/schaefer ~glorb /home/bobg ~flarn /home/fox aztec[32] echo $ZSH_VERSION 3.0.5-extended (3.0.5-extended is 3.0.5 plus my patch collection, available on ftp.brasslantern.com.) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12553 invoked from network); 8 Oct 1998 07:46:22 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 8 Oct 1998 07:46:22 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id DAA07021; Thu, 8 Oct 1998 03:39:05 -0400 (EDT) Resent-Date: Thu, 8 Oct 1998 03:38:54 -0400 (EDT) Message-Id: <9810080729.AA21255@ibmth.df.unipi.it> To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? In-Reply-To: ""Bart Schaefer""'s message of "Wed, 07 Oct 1998 11:36:39 DFT." <981007113639.ZM15544@candle.brasslantern.com> Date: Thu, 08 Oct 1998 09:29:29 +0200 From: Peter Stephenson Resent-Message-ID: <"Sc9V22.0.Gj1.Em67s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1845 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 7, 10:50am, Greg Badros wrote: } Subject: Re: Null tilde expansions? } } > Yes, you're right. Or just ${dirs##~*}, in which the ~ is not expanded } > in the first place. } } Why does the ~ not get expanded? This doesn't work in 3.1.4 or 3.0.x } for me. I need to escape the ~ with a backslash here, too. % echo $dirs /home/user2/pws ~foobar % unsetopt extendedglob % echo ${dirs##~*} /home/user2/pws % setopt extendedglob % echo ${dirs##~*} /home/user2/pws ~foobar -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy