1 |
Hi all, |
2 |
|
3 |
Try zsh "setopt auto_cd" ;) |
4 |
|
5 |
-- |
6 |
Mamoru KOMACHI <usata@g.o> |
7 |
|
8 |
|
9 |
At Thu, 11 Mar 2004 18:28:34 -0500 (EST), |
10 |
Fred Gates wrote: |
11 |
> |
12 |
> [1 <text/plain; iso-8859-1 (8bit)>] |
13 |
> this might qualify to be added to the bash ebuild. might want to vote and |
14 |
> see if enough people like it first. unless its already implemented in |
15 |
> gentoo? |
16 |
> |
17 |
> ---------------------------- Original Message ---------------------------- |
18 |
> Subject: BASH feature: directory jumping w/o 'cd' |
19 |
> From: "Walsh, Matt" <matt.walsh@×××××.com> |
20 |
> Date: Tue, March 9, 2004 6:59 pm |
21 |
> To: bug-bash@×××.org |
22 |
> -------------------------------------------------------------------------- |
23 |
> |
24 |
> This improvement will save you three keystrokes, but they're 3 |
25 |
> keystrokes you type a whole lot for no reason at all. Yes, I'm talking |
26 |
> about the keystrokes 'c-d-(space)' |
27 |
> |
28 |
> I was a big fan of the old '4DOS' utility for DOS. One of my favorite |
29 |
> features was where from a command line you could simply type a |
30 |
> directory, and it would go there. I.e., instead of typing |
31 |
> |
32 |
> cd \Windows |
33 |
> |
34 |
> You, in 4DOS could just type |
35 |
> |
36 |
> \Windows |
37 |
> |
38 |
> In BASH, if you try this, it simply complains that "___ is a directory". |
39 |
> In other words, it's a distinct unhandled case. Why not use this case for |
40 |
> something useful? |
41 |
> |
42 |
> So, I made some mods to bash to make this in fact work like it did in |
43 |
> 4DOS. You only have to patch one file, 'execute_cmd.c' |
44 |
> |
45 |
> I threw together this web page with more details. |
46 |
> http://www.mattwalsh.com/twiki/bin/view/Main/BashDirectoryJumpPatch |
47 |
> |
48 |
> I think users will find it addictive; I did with 4DOS and now it's like |
49 |
> falling in love again. |
50 |
> |
51 |
> If it you find a hole in this scheme please let me know. The only thing I |
52 |
> can think of is that some scripts might be sloppy and simply check to see |
53 |
> if a directory exists in this really backwards way. The code |
54 |
> changes were actually very simple. If it looks ok I'll submit a patch to |
55 |
> the BASH mailing list. |
56 |
> |
57 |
> --matt Walsh |
58 |
> |
59 |
> |
60 |
> <<bash_dirchange.patch>> |
61 |
> _______________________________________________ |
62 |
> Bug-bash mailing list |
63 |
> Bug-bash@×××.org |
64 |
> http://mail.gnu.org/mailman/listinfo/bug-bash |
65 |
> |
66 |
> |
67 |
> |
68 |
> -- |
69 |
> dabozz@××××××××××××.org |
70 |
> [2 bash_dirchange.patch <application/octet-stream (base64)>] |
71 |
> |
72 |
> [3 <text/plain; us-ascii (7bit)>] |
73 |
> -- |
74 |
> gentoo-dev@g.o mailing list |
75 |
|
76 |
-- |
77 |
gentoo-dev@g.o mailing list |