Live data from Hacker News

Teleportation on the command line

thecakeisalie.in

11–20 of 39 posts

Re: Teleportation on the command line

#11
I use a similar method, which I based on a previous HN post:

https://github.com/akerl/dotfiles/blob/master/.bundles/marks

I'm addicted to one/two-letter aliases, and between that and ZSH completion (https://github.com/akerl/dotfiles/blob/master/.completions/_...), the mark functions get me super-simple bookmarks

I also wish people would stop providing "curl this into .bashrc" as the primarily installation method. That's a really bad habit to get into, especially with a file like .bashrc. It's a bit less risky than piping the curl into bash, but still not a great plan.

Re: Teleportation on the command line

#13
> Nobody types an entire URL like https://example.com/example-page?input=sample&another-input=.... We bookmark it and give it a keyword like ex or something. From then, we just type ex and hit return to access the website.

I don't wanna sound negative, but just being realistic.

I don't rely on bookmarks primarily. I rely on "most frequently visited gets auto-completed first" and fuzzy search of Chrome Omnibox. If I do bookmark something, it's to indicate to the algorithm "I care about this, make it easier to fuzzy find it later".

But it's a good step in the right direction, good job!

Edit: From the description, it sounds like autojump does something close.

Re: Teleportation on the command line

#14
post #3

I'm quite happy with https://github.com/huyng/bashmarks Also, the built-in pushd and popd commands are enough sometimes.

Also, the built-in pushd and popd commands are enough sometimes.

I came here to say this. A small wrapper around these commands would make for a sufficient script.

Re: Teleportation on the command line

#15
post #12

Does any flavor of this functionality exist for Windows command prompt?

Windows makes this a little easier than bash does.

batch scripts in windows behave like scripts on unix do when you source them. That means that you can write a batch script called "foo.bat" with the contents of "cd \whatever\directory\you\please" and it will change your current directory when run.

From there, it would not be difficult to write a batch script that in turn wrote batch scripts like "foo.bat" above.

With bash, you would have to create functions or aliases to get the same effect.

Re: Teleportation on the command line

#17
It looks like no one has posted what, in my opinion, is the most powerful of the "jump" programs: fasd.

My workflow for getting around is just to type "z " and I almost always end up where I want. If I just want to edit a file, not a project, I do vim `f ` and likewise get the file I want typically.

The readme makes it pretty clear how awesome it is and I've stuck with it after using autojump, z, and others.

https://github.com/clvv/fasd

Re: Teleportation on the command line

#19
I made a tool a year ago to do the same thing, Metis: https://github.com/srcoley/metis

I like a solution that goes where ever your dotfiles go, instead of having to install a fuzzy search on each system.

Metis will list all of your currently saved Metis aliases as well, just by typing "metis". You can also tell Metis which dotfile you want to save your aliases.

Post reply on HN