[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: cd to the user's home dir
From: |
Drew Adams |
Subject: |
RE: cd to the user's home dir |
Date: |
Sun, 18 May 2014 18:27:06 -0700 (PDT) |
> But playing with it I find that it doesn't work exactly the same as
> find-file completion. If I have "~/" and I try "~/~rooTAB" it will
> not complete to ~root/. I must backup first. "~rooTAB" works. This
> is slightly different than find-file. In find-file a slash or tilde
> immediately starts a new path. In the graphical client it greys out
> the preceding path. I think cd is enough different from find-file
> that it would classify as a bug against cd because of the
> inconsistency.
Emacs command `cd' tries to act like UNIX/Linux command `cd'.
In particular, it uses environment var `CDPATH' to look things up.
The `find-file' (and related commands) behavior you refer to
is something different. What it does is recognize `~/' as your
home directory (env var `HOME'). And it does so also when it
comes immediately after a slash (`/`) - Emacs then ignores that
slash and whatever precedes it. (And in recent Emacs versions
it dims that ignored text.)
Message not available