Live data from Hacker News

Quickly navigate your filesystem from the command line

jeroenjanssens.com

131–140 of 148 posts

Re: Quickly navigate your filesystem from the command line

#131

Earlier quoted context omitted.

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`" t…

I put z and fasd through their paces, and out of the box z works very intuitively. I like it. fasd takes a little more to get used to, but I'm going to put it through a full try out. Let's see if the additional features make it worth the while. In either case, thanks all for a great thread.

fasd is z on steroids. Fantastic tool.

Re: Quickly navigate your filesystem from the command line

#132
post #56

Earlier quoted context omitted.

z is absolutely wonderful. Even my boss has become a convert, and he's been hacking unix since the 1970s, when he worked at AT&T, and is very set in his ways. [Disclaimer: rupa's a good friend of mine]

I've converted a few people to the z side. And yes, it is wonderful. [Disclaimer: rupa is a good friend of mine, as well]

I was pretty excited about original link in this HN submission, but now I'm roughly twice as excited to learn about z. Love it.

[Disclaimer: I don't know rupa at all]

Re: Quickly navigate your filesystem from the command line

#133

I set my version up with a -f on the unmark rm so that I don't need to be prompted to remove it. Also added some basic completion for both jump and unmark export MARKPATH=$HOME/.marks function jump { cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" } function mark { mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 } function unmark { rm -if $MARKPATH/$1 } function marks { ls -l $MARKPATH | sed 's/ / /g' | cut -…

nice additions. For OSX I had to modify the local wordlist part of the auto complete function to read:

local wordlist=$(ls $MARKPATH)

Re: Quickly navigate your filesystem from the command line

#134

Earlier quoted context omitted.

I recommend avoiding -f on rm if you can. Make one mistake and it can be painful. In this case think removing the -i from the unmark function will accomplish what you want. I made something to the OP's system for the same reason of disdain for super deep trees at work. I'll make a gist and edit this post with it in a few minutes. Edit: https://gist.github.com/desertmonad/6258429 I like the OP's idea of using symbolic…

Why not use unlink?

What's the advantage?

Re: Quickly navigate your filesystem from the command line

#136

This is great, but I don't see why this is better than autojump. * Autojump automatically saves marks, ~~~ cd Downloads # And you are done. ~~~ * You don't have to think about mark names, ~~~ cd Projects/Python # It will be called `python`. ~~~ * You don't need to remember mark names, ~~~ j haskell # If you want `Projects/Haskell`, odds are the mark is auto-named `haskell`. ~~~ * You can specify only some part of mar…

Why on Earth would you want to save every directory you change to?!

Re: Quickly navigate your filesystem from the command line

#137

I set my version up with a -f on the unmark rm so that I don't need to be prompted to remove it. Also added some basic completion for both jump and unmark export MARKPATH=$HOME/.marks function jump { cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" } function mark { mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 } function unmark { rm -if $MARKPATH/$1 } function marks { ls -l $MARKPATH | sed 's/ / /g' | cut -…

find: blah-printf: unknown primary or operator

Any idea why this is happening? I'm on OS X.

Re: Quickly navigate your filesystem from the command line

#139

Earlier quoted context omitted.

I've converted a few people to the z side. And yes, it is wonderful. [Disclaimer: rupa is a good friend of mine, as well]

I was pretty excited about original link in this HN submission, but now I'm roughly twice as excited to learn about z. Love it. [Disclaimer: I don't know rupa at all]

I have developed a very similar scheme for myself independently (haven't heard of z before, but thanks). A further idea is another command e, which is used like: e reg1 reg2..., and it will query z's database to see if there is a file in z's directory which matches the regs, and if found, open that file in Emacs. A similar command f will only print the path, so that firefox $(f reg1 reg2) will open the found file using firefox.
Post reply on HN