z is a wonderful complement to cd. After cd into a folders with z set up, a file stores all folders navigated to sorted by frecency, then simply jump to a folder with z [foldernameregex].
Quickly navigate your filesystem from the command line
51–60 of 148 posts
Re: Quickly navigate your filesystem from the command line
#52You 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`" t…
Re: Quickly navigate your filesystem from the command line
#53GitHub: https://github.com/dictoon/marks
Edit: to install, unzip anywhere and add to your path. Then:
C:\Windows> mark win
C:\Windows> marks
win => C:\Windows
C:\Windows> cd ..
C:\> jump win
C:\Windows>
Marks will be stored in a marks\ subdirectory (relatively to the mark.bat file).Re: Quickly navigate your filesystem from the command line
#54To have completion with bash you can use this: function _jump { local cur=${COMP_WORDS[COMP_CWORD]} local marks=$(find $MARKPATH -type l -printf "%f\n") COMPREPLY=($(compgen -W '${marks[@]}' -- "$cur")) return 0 } complete -o default -o nospace -F _jump jump Bash completion really needs better docs :-|
Does anyone here know offhand how autocompletion in `zsh` works?
Re: Quickly navigate your filesystem from the command line
#55I have a similar tool but it also manages shell environment variables, allowing you to jump around and/or switch working projects. You can check it out at: http://github.com/timtadh/swork
Re: Quickly navigate your filesystem from the command line
#56Reminds me of z, which I use all the time. Anyone else use z? If you have not heard of it, get it now https://github.com/rupa/z . z is a wonderful complement to cd. After cd into a folders with z set up, a file stores all folders navigated to sorted by frecency, then simply jump to a folder with z [foldernameregex].
[Disclaimer: rupa's a good friend of mine]
Re: Quickly navigate your filesystem from the command line
#57Interesting idea. I've the bash built-in "pushd" and "popd" for a long time for similar reasons, but those effectively limit you to treating the history as a stack rather than an arbitrary list.
e.g., a command like "tar cfz bak.tgz ~3 ~2/subdirectory ~1" would mean something else once you've "pushd +3".
I always find it hard to undo my sequence changes to get the stack in the same order as before, so usually end up typing "dirs -v" a lot (or its alias) and renumbering my ~N references.
Re: Quickly navigate your filesystem from the command line
#58With fish 2.0, the shell stores a list of "cd" commands issued from a specific directory, so mostly just typing "cd" yields an auto-completion hint out of the box.