Gentoo Archives: gentoo-dev

From: Drake Wyrm <wyrm@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [Fwd: BASH feature: directory jumping w/o 'cd']
Date: Fri, 12 Mar 2004 02:30:37
Message-Id: 20040312023802.GC21609@phaenix.haell.com
In Reply to: [gentoo-dev] [Fwd: BASH feature: directory jumping w/o 'cd'] by Fred Gates
1 On Thu, 2004-03-11, 18:28:34 -0500, in
2 <2591.68.56.194.157.1079047714.squirrel@×××××××××××××××××.org>, Fred
3 Gates <dabozz@××××××××××××.org> wrote:
4
5 [snip]
6 > I was a big fan of the old '4DOS' utility for DOS. One of my favorite
7 > features was where from a command line you could simply type a
8 > directory, and it would go there. I.e., instead of typing
9 >
10 > cd \Windows
11 >
12 > You, in 4DOS could just type
13 >
14 > \Windows
15 >
16 > In BASH, if you try this, it simply complains that "___ is a
17 > directory". In other words, it's a distinct unhandled case. Why not
18 > use this case for something useful?
19 >
20 > So, I made some mods to bash to make this in fact work like it did in
21 > 4DOS. You only have to patch one file, 'execute_cmd.c'
22 [snip]
23
24 Beautiful. It makes so much sense, I wonder why it wasn't included in
25 the original Bourne shell. After all, execute permissions on a directory
26 mean that you can 'cd' to it, right? What better action to take when
27 "executing" a directory?
28
29 --
30 Batou: Hey, Major... You ever hear of "human rights"?
31 Kusanagi: I understand the concept, but I've never seen it in action.
32 --Ghost in the Shell

Replies

Subject Author
Re: [gentoo-dev] [Fwd: BASH feature: directory jumping w/o 'cd'] Jason Rhinelander <jason@××××××××××××××××.com>