Autojump, or a "cd" that remembers.
January 22nd, 2009
You are going to love this thing, believe me. You work on the CLI and jump always around from directory to directory? Well, you tried "Ctrl+r" I suppose. Frankly, it sucks. Sure you can cycle through the items but its just to stupid. We all want to save keystrokes so try this instead:
Sh/Bash Shell Users: Autojump j.sh implementation.
Zsh Shell Users: Autojump j.sh zsh port.
Original idea came from here: AutoJump.
So how does it work? Well download the script according to your shell and source it. Meaning either put it directly into your .zshrc or .bashrc or source the file. Then just work normally for some time, cd around like you normally work. Now you can do a j regex instead of cycling through the history with ctrl+r. The script will guess what you want ! Neat..
UPDATE: See the comments for a interesting suggestion from Martin, about WCD (http://www.xs4all.nl/~waterlan/).
3 Responses to “Autojump, or a "cd" that remembers.”
Sorry, comments are closed for this article.
February 24th, 2009 at 07:36 AM Hey Bjoern, awesome Idea, but for me, this thing sounds quite similar to what 'wcd' is capable of doing, maybe you want to have a look at that one as well and add it to your 'autojump' here? Greets from Germany Martin
February 24th, 2009 at 07:38 AM Martin, thanks for that comment. Seems I really missed that one ! Interesting enough though this thing has alot of features "-j" for immediate jump makes it behave similarly like the above scripts. The pattern matching is a bit weird though. It seems to index everything then based on that you can either get selections or jump to the most likely. If I try out this thing it tends to jump to directories where I don't even want to go. Either I am doing something wrong or the weighting of the thing is off. The above implementation is different though. It follows the AutoJump scheme which means that it learns from the usage of the filesystem not from the filesystem structure. This makes it much more userfriendly in my opinion. Anyway thanks for your input !
February 24th, 2009 at 07:39 AM They even wrote a book about this whole reactive keyboard / shell thing. (quite old though) http://books.google.com/books?id=obxCY0wcaTgC&dq=reactive+keyboard&printsec=frontcover&source=bn&hl=en&ei=KlafSYeiM9G3tweeu8iTDQ&sa=X&oi=book_result&resnum=5&ct=result#PPA27,M1