Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why doesn't tab expand .
- X-seq: zsh-users 10821
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: Why doesn't tab expand .
- Date: Tue, 10 Oct 2006 04:38:02 +0200
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <Xns9857CE0FC8AA4zzappergmailcom@xxxxxxxxxxx>
- Mail-followup-to: zzapper <david@xxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns9857CE0FC8AA4zzappergmailcom@xxxxxxxxxxx>
- Sender: Phil Pennock <phil@xxxxxxxxxxxxx>
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 .<Tab>
>
> Be useful in a few cases?
Try $PWD<tab>
Regards,
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author