Live data from Hacker News

Teleportation on the command line

thecakeisalie.in

31–39 of 39 posts

Re: Teleportation on the command line

#32
Why not just use a symlink?

    ln -s ~/super/long/nested/directory/name ~/short
If you don't want to dump them in your home directory, just make a directory with a single-letter name for your links:

    ln -s ~/super/long/nested/directory/name ~/l/short

Re: Teleportation on the command line

#35
post #32

Why not just use a symlink? ln -s ~/super/long/nested/directory/name ~/short If you don't want to dump them in your home directory, just make a directory with a single-letter name for your links: ln -s ~/super/long/nested/directory/name ~/l/short

Personally I do something similar. I set up an alias in .zshrc from project names to commands. This allows me to do things like source environments as well.

    alias proj="cd /this/that/foo/projects/myproject/ && source .hsenv/bin/activate"

Re: Teleportation on the command line

#37
Nice. This quick and dirty trick has been in my .bashrc forever and I still use it:

    function md(){
        pwd > /tmp/md_tmp

    function gomd(){
        cd `cat /tmp/md_tmp`
so `md` marks the current directory and `gomd`go to the marked directory. Unlike bash builtins like pushd and popd, it uses the file system to store the marked directory so you can pop up a new terminal and just do gomd. (you can't with pushd/popd since the bash processes of the old and the new terminal are not related)

Edit: I see that your script uses links, I'll check this out.

Re: Teleportation on the command line

#38
post #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://…

It seems to behave really good, thanks!
Post reply on HN