Live data from Hacker News

Quickly navigate your filesystem from the command line

jeroenjanssens.com

41–50 of 148 posts

Re: Quickly navigate your filesystem from the command line

#43

I'm too lazy to type "jump" so I've modified it to automatically add a Bash alias for each one as well. https://github.com/davejamesmiller/dotfiles/blob/master/.bas...

Unless I'm missing something you also need a function to create all aliases when the shell session starts?

That's what the for loop at the bottom does.

Re: Quickly navigate your filesystem from the command line

#45
Cool!, I usually want to open a new terminal window and move to the same directory I am working in, I use these handy aliases :

alias here='pwd | pbcopy'

alias there='cd $(pbpaste)'

So now type `here` in current terminal window and type `there` in new terminal window to move to same directory!

[This works on Mac on other OS you could use xcopy or equivalent clipboard copy program]

Re: Quickly navigate your filesystem from the command line

#46
post #7

You might want to check out z: https://github.com/rupa/z

https://github.com/clvv/fasd

I used to use z, but I've since switched to fasd. It's much like z, but also so much better. In addition to being able to do "z " you can do "f ". So, for example, if I've got a rails project I've worked on a lot recently I know its config.ru is high on frecency, so I'll just do "vim `f config`" to edit that file. If I want a file that's not so recent I can always do "vim `f -i config`" to pick from a list of files.

fasd is leaps and bounds above z in functionality, and I've thoroughly enjoyed using it.

Post reply on HN