From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21106 invoked from network); 10 Oct 2006 02:38:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Oct 2006 02:38:24 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99708 invoked from network); 10 Oct 2006 02:38:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Oct 2006 02:38:17 -0000 Received: (qmail 24638 invoked by alias); 10 Oct 2006 02:38:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10821 Received: (qmail 24628 invoked from network); 10 Oct 2006 02:38:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Oct 2006 02:38:07 -0000 Received: (qmail 98342 invoked from network); 10 Oct 2006 02:38:07 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 10 Oct 2006 02:38:06 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1GX7VK-0006FU-7X; Tue, 10 Oct 2006 03:38:02 +0100 Date: Tue, 10 Oct 2006 04:38:02 +0200 From: Phil Pennock To: zzapper Cc: zsh-users@sunsite.dk Subject: Re: Why doesn't tab expand . Message-ID: <20061010023802.GA22913@parhelion.globnix.org> Mail-Followup-To: zzapper , zsh-users@sunsite.dk References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Phil Pennock On 2006-10-09 at 19:15 +0000, zzapper wrote: > Why doesn't tab expand . ? To what? "." is a directory, the "self" directory. It's not an alias or special to the shell in any way. It's a directory entry which exists in every directory, provided as part of the filesystem interface by the kernel; on Unix-biased filesystems, it typically actually exists in the filesystem. Without anything else, it's of course interpreted relative to the current working directory. If you view a directory as a file containing mappings from filenames to inodes (the actual file structure on disk), then the filesystem hierarchies exist from some inodes pointed-to also being directories. Every directory contains items called "." and ".."; "." points to the directory itself, ".." to the parent (which is why you can't hardlink a directory to be in two locations (anymore)). /usr/./bin/./foo is valid and the same as /usr/bin/foo but with some extra checks in there. So "." is a valid filename, referencing a directory; since there's no '/' anywhere, it's the '.' which exists in $PWD, and effectively the same as $PWD for most intents and purposes. > > cp /tmp/fred.txt . > > Be useful in a few cases? Try $PWD Regards, -Phil