TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Quickly navigate your filesystem from the command line

457 pointsby jeroenjanssensalmost 12 years ago

55 comments

modernerdalmost 12 years ago
I had to modify Jeroen&#x27;s code to get the `marks` shortcut working under Mac OS 10.8:<p><pre><code> export MARKPATH=$HOME&#x2F;.marks function jump { cd -P $MARKPATH&#x2F;$1 2&gt; &#x2F;dev&#x2F;null || echo &quot;No such mark: $1&quot; } function mark { mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH&#x2F;$1 } function unmark { rm -i $MARKPATH&#x2F;$1 } function marks { ls -l $MARKPATH | sed &#x27;s&#x2F; &#x2F; &#x2F;g&#x27; | cut -d&#x27; &#x27; -f9- &amp;&amp; echo }</code></pre>
评论 #6229428 未加载
评论 #6229828 未加载
评论 #6230165 未加载
评论 #6236361 未加载
microcolonelalmost 12 years ago
I set my version up with a -f on the unmark rm so that I don&#x27;t need to be prompted to remove it. Also added some basic completion for both jump and unmark<p><pre><code> export MARKPATH=$HOME&#x2F;.marks function jump { cd -P $MARKPATH&#x2F;$1 2&gt;&#x2F;dev&#x2F;null || echo &quot;No such mark: $1&quot; } function mark { mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH&#x2F;$1 } function unmark { rm -if $MARKPATH&#x2F;$1 } function marks { ls -l $MARKPATH | sed &#x27;s&#x2F; &#x2F; &#x2F;g&#x27; | cut -d&#x27; &#x27; -f9- | sed &#x27;s&#x2F; -&#x2F;\t-&#x2F;g&#x27; &amp;&amp; echo } _completemarks() { local curw=${COMP_WORDS[COMP_CWORD]} local wordlist=$(find $MARKPATH -type l -printf &quot;%f\n&quot;) COMPREPLY=($(compgen -W &#x27;${wordlist[@]}&#x27; -- &quot;$curw&quot;)) return 0 } complete -F _completemarks jump unmark</code></pre>
评论 #6230147 未加载
评论 #6230091 未加载
评论 #6273057 未加载
评论 #6240561 未加载
评论 #6230410 未加载
评论 #6245932 未加载
nkuttleralmost 12 years ago
To have completion with bash you can use this:<p><pre><code> function _jump { local cur=${COMP_WORDS[COMP_CWORD]} local marks=$(find $MARKPATH -type l -printf &quot;%f\n&quot;) COMPREPLY=($(compgen -W &#x27;${marks[@]}&#x27; -- &quot;$cur&quot;)) return 0 } complete -o default -o nospace -F _jump jump </code></pre> Bash completion really needs better docs :-|
评论 #6229700 未加载
评论 #6229330 未加载
sukakaalmost 12 years ago
Reminds me of z, which I use all the time. Anyone else use z? If you have not heard of it, get it now <a href="https://github.com/rupa/z" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z</a>.<p>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].
评论 #6229718 未加载
skrebbelalmost 12 years ago
For Windows users I have a closely related shameless plug:<p><i>cdhere</i> navigates your cmd.exe to wherever the current topmost Explorer window is pointed at.<p>It&#x27;s not the same as the OP&#x27;s trick, of course, but since you&#x27;re voluntarily using Windows, I&#x27;m going to assume you &quot;live&quot; on the command line less than the average UNIX user, and more on GUI tools such as good old Explorer.<p><a href="https://github.com/eteeselink/cdhere" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;eteeselink&#x2F;cdhere</a>
评论 #6231917 未加载
评论 #6230565 未加载
评论 #6230101 未加载
评论 #6229917 未加载
评论 #6230945 未加载
评论 #6230346 未加载
评论 #6229873 未加载
networkedalmost 12 years ago
You can also use ranger [1] to change directories, especially if you want to explore the directory tree quickly when you don&#x27;t know exactly where to jump to. Install it and add the following to ~&#x2F;.bashrc:<p><pre><code> function ranger-cd { tempfile=&#x27;&#x2F;tmp&#x2F;chosendir&#x27; &#x2F;usr&#x2F;bin&#x2F;ranger --choosedir=&quot;$tempfile&quot; &quot;${@:-$(pwd)}&quot; test -f &quot;$tempfile&quot; &amp;&amp; if [ &quot;$(cat -- &quot;$tempfile&quot;)&quot; != &quot;$(echo -n `pwd`)&quot; ]; then cd -- &quot;$(cat &quot;$tempfile&quot;)&quot; fi rm -f -- &quot;$tempfile&quot; } # This binds Ctrl-O to ranger-cd: bind &#x27;&quot;\C-o&quot;:&quot;ranger-cd\C-m&quot;&#x27; </code></pre> (This script comes from the man page for ranger(1).)<p>Edit: Modified the above script for use with zsh (and multiple users):<p><pre><code> ranger-cd() { tempfile=$(mktemp) ranger --choosedir=&quot;$tempfile&quot; &quot;${@:-$(pwd)}&quot; &lt; $TTY test -f &quot;$tempfile&quot; &amp;&amp; if [ &quot;$(cat -- &quot;$tempfile&quot;)&quot; != &quot;$(echo -n `pwd`)&quot; ]; then cd -- &quot;$(cat &quot;$tempfile&quot;)&quot; fi rm -f -- &quot;$tempfile&quot; } # This binds Ctrl-O to ranger-cd: zle -N ranger-cd bindkey &#x27;^o&#x27; ranger-cd </code></pre> [1] <a href="http://ranger.nongnu.org/" rel="nofollow">http:&#x2F;&#x2F;ranger.nongnu.org&#x2F;</a>.
评论 #6229792 未加载
评论 #6231390 未加载
评论 #6229389 未加载
评论 #6229854 未加载
faualmost 12 years ago
You might want to check out z: <a href="https://github.com/rupa/z" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z</a>
评论 #6229572 未加载
评论 #6229320 未加载
评论 #6229386 未加载
评论 #6229493 未加载
mynameisfiberalmost 12 years ago
I found this is a useful addition to his scripts... I can&#x27;t live without my tab completion!<p><pre><code> _jump() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W &quot;$( ls $MARKPATH )&quot; -- $cur) ) } complete -F _jump jump</code></pre>
评论 #6229988 未加载
lazerwalkeralmost 12 years ago
I&#x27;ve been using Bashmarks (<a href="https://github.com/huyng/bashmarks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;huyng&#x2F;bashmarks</a>) for years, which appears to be basically the same thing but with a less verbose interface.
评论 #6229442 未加载
franzbalmost 12 years ago
Here is a fully functional (albeit minimal) Windows version: <a href="http://appleseedhq.net/stuff/marks-v1.zip" rel="nofollow">http:&#x2F;&#x2F;appleseedhq.net&#x2F;stuff&#x2F;marks-v1.zip</a>. Tested on Windows 7 (does not require PowerShell).<p>GitHub: <a href="https://github.com/dictoon/marks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dictoon&#x2F;marks</a><p>Edit: to install, unzip anywhere and add to your path. Then:<p><pre><code> C:\Windows&gt; mark win C:\Windows&gt; marks win =&gt; C:\Windows C:\Windows&gt; cd .. C:\&gt; jump win C:\Windows&gt; </code></pre> Marks will be stored in a marks\ subdirectory (relatively to the mark.bat file).
评论 #6230292 未加载
评论 #6229763 未加载
shaileshalmost 12 years ago
Clever!<p>With fish 2.0, the shell stores a list of &quot;cd&quot; commands issued from a specific directory, so mostly just typing &quot;cd&quot; yields an auto-completion hint out of the box.
anjanbalmost 12 years ago
cool! I&#x27;m a command-line junkie as well. So, I&#x27;ve been doing something similar for quite a while.<p>Here&#x27;s what I have done :<p><pre><code> function ccb () { FOO=`pwd`; echo &gt;&gt; ~&#x2F;shortcuts.sh; echo alias $1=\&#x27;pushd $FOO\&#x27; &gt;&gt; ~&#x2F;shortcuts.sh; echo &gt;&gt; ~&#x2F;shortcuts.sh; . ~&#x2F;shortcuts.sh } </code></pre> simple but quite effective.<p>Now, all I have to do is type ccb and give a shortcut name to register a shortcut. Then whenever i want to jump to that directory, I just have to type the shortcut.<p>Eg :<p><pre><code> foo@bar deeply-nested-dir# ccb deepd foo@bar deeply-nested-dir# cd foo@bar ~# deepd foo@bar deeply-nested-dir# </code></pre> My method lacks the a) delete shortcut and b) list shortcut features that the above solution gives, though.
评论 #6229173 未加载
评论 #6229474 未加载
sam152almost 12 years ago
This is really neat. I have added it to alias.sh for easy inclusion: <a href="http://alias.sh/filesystem-markers-jump" rel="nofollow">http:&#x2F;&#x2F;alias.sh&#x2F;filesystem-markers-jump</a>
georgecalmalmost 12 years ago
Here&#x27;s a `fish 2` shell version, that works on the Mac. You can add it as `~&#x2F;.config&#x2F;fish&#x2F;functions&#x2F;mark.fish`:<p><pre><code> set MARKPATH $HOME&#x2F;.marks function jump cd $MARKPATH&#x2F;$argv; or echo &quot;No such mark: $argv&quot; end function mark mkdir -p $MARKPATH; and ln -s (pwd) $MARKPATH&#x2F;$argv end function unmark rm -i $MARKPATH&#x2F;$argv end function marks ls -l $MARKPATH | cut -d&#x27; &#x27; -f12-; and echo end</code></pre>
评论 #6236374 未加载
tiziano88almost 12 years ago
Cool, simple but very useful!<p>Bonus: if you want autocompletion for the jump and unmark commands, just add the following lines (in zsh):<p><pre><code> function _marks { reply=($(ls $MARKPATH)) } compctl -K _marks jump compctl -K _marks unmark</code></pre>
m-r-rover 11 years ago
I don&#x27;t understand the advantage of using handwritten function instead of the shell builtins. The `mark` function could be replaced by `alias -g`, `jump` could be replaced by `cd` and `unmark` could be replaced by `unalias` :<p><pre><code> % cd ~&#x2F;Dev&#x2F;W3&#x2F;m-r-r.github.io % alias -g :blog=&quot;$PWD&quot; % jekyll build -d &#x2F;tmp&#x2F;out&#x2F; &amp;&amp; cd &#x2F;tmp&#x2F;out % .&#x2F;index.html % cd :blog % pwd &#x2F;home&#x2F;m-r-r&#x2F;Dev&#x2F;W3&#x2F;m-r-r.github.io % alias -g :blog=&#x27;&#x2F;home&#x2F;m-r-r&#x2F;Dev&#x2F;W3&#x2F;m-r-r.github.io&#x27; :dev=&#x27;&#x2F;home&#x2F;m-r-r&#x2F;Dev&#x27; :c=&#x27;&#x2F;home&#x2F;m-r-r&#x2F;Dev&#x2F;C&#x27; :python=&#x27;&#x2F;home&#x2F;m-r-r&#x2F;Dev&#x2F;Python&#x27; :vim=&#x27;&#x2F;home&#x2F;m-r-r&#x2F;.vim&#x27; </code></pre> In addition, this method works with any shell command:<p><pre><code> % pwd &#x2F;tmp&#x2F;out % make -C :blog publish % git clone git:&#x2F;&#x2F;git.complang.org&#x2F;ragel.git `echo :c`&#x2F;ragel % vim `echo :vim`&#x2F;templates&#x2F;\*.rl </code></pre> On the other side, the aliases are not saved at exit unless you write a function to do it:<p><pre><code> % tail -n 15 ~&#x2F;.zshrc function aliases { ( alias -L -r alias -L -g alias -L -s ) | uniq } function save-aliases { aliases &gt; ~&#x2F;.zsh_aliases } if [ -f ~&#x2F;.zsh_aliases ]; then . ~&#x2F;.zsh_aliases fi</code></pre>
roobalmost 12 years ago
I also do something similar but slightly different: <a href="https://github.com/roobert/dotfiles/blob/master/.zsh/robs/functions/bookmarks.zsh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;roobert&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;.zsh&#x2F;robs&#x2F;fu...</a><p>my method involves storing the bookmarks in a file but loading them into zshs directory hash. This means the directories are tab completable and if you have AUTO_CD set then you can change directory with simply: ~dir_name, otherwise: cd ~dir_name.
评论 #6229469 未加载
bakulalmost 12 years ago
I&#x27;ve been using the following in some form for over 3 decades! (now in zsh)<p><pre><code> alias .=cd </code></pre> In &#x2F;bin&#x2F;sh &quot;.&quot; sources a script. While this can be common in a script, one rarely does this interactively so I usurped . for the most common operation!<p><pre><code> alias ,=pushd alias ,,=popd alias ,.=dirs </code></pre> Think of cd as a goto, pushd as a call, popd as a return and dirs as a stack trace!<p><pre><code> ..() { cd ..&#x2F;$* } cdpath=(. .. ~&#x2F;src ~) </code></pre> Use of cdpath can be confusing so it is best to show part of $PWD in the prompt:<p><pre><code> PS1=&quot;%* %5. %h%(#.#.:) &quot; </code></pre> This ends the prompt with a # if you are running as superuser.<p>These aliases&#x2F;functions are enabled in .zshrc (<i>only</i> if run interactively -- that is, they are included below the following test):<p><pre><code> if [[ ! -o interactive ]] ; then return; fi </code></pre> The &quot;benefit&quot; of Jeroen&#x27;s mark&#x2F;unmark is that these paths persist (and can be used from any window running a shell. I have not found much need for that + I can have different $dirs in different windows. Also, given that my shell windows (under screen) persist for a very long time, I don&#x27;t need symlink&#x27;s persistence!<p>Alternatively I define &quot;.&quot; to be a function that does arg specific operation (cd if a dir, acroread if .pdf, vi if text etc.).
daGrevisalmost 12 years ago
This is great, but I don&#x27;t see why this is better than autojump.<p>* Autojump automatically saves marks,<p>~~~ cd Downloads # And you are done. ~~~<p>* You don&#x27;t have to think about mark names,<p>~~~ cd Projects&#x2F;Python # It will be called `python`. ~~~<p>* You don&#x27;t need to remember mark names,<p>~~~ j haskell # If you want `Projects&#x2F;Haskell`, odds are the mark is auto-named `haskell`. ~~~<p>* You can specify only some part of mark name;<p>~~~ j bar # And you are in `Stuff&#x2F;foobar`. ~~~<p>Other than that, this is, as I said before, great! Looking forward to go through the source code to learn more about Bash.
评论 #6245012 未加载
jonkneealmost 12 years ago
I noticed that &#x27;mark&#x27; doesn&#x27;t work if you have spaces in a directory name which you can&#x27;t avoid on the Mac (I tried to mark an interior folder inside the iPhone Simulator which is inside &quot;~&#x2F;Library&#x2F;Application Support&#x2F;iPhone Simulator&#x2F;&quot;. Wrapping in quotes seems to do the trick:<p><pre><code> function mark { mkdir -p $MARKPATH; ln -s &quot;$(pwd)&quot; $MARKPATH&#x2F;$1 }</code></pre>
_mcalmost 12 years ago
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 :<p>alias here=&#x27;pwd | pbcopy&#x27;<p>alias there=&#x27;cd $(pbpaste)&#x27;<p>So now type `here` in current terminal window and type `there` in new terminal window to move to same directory!<p>[This works on Mac on other OS you could use xcopy or equivalent clipboard copy program]
ttomainoalmost 12 years ago
This is a very informative thread for people trying to streamline their daily shell experience. I&#x27;m looking forward to experimenting with the utilities mentioned here. I spend a significant amount of time in, and moving between CVS sandboxes. All my sandboxes have the same internal directory structure, but the root of the path changes. To speed up navigation time I created a tool to replace directory names with aliases. The aliases are persistent. They can also be &quot;stacked&quot;, which allows you to specify a sandbox as an alias, then reuse your existing aliases to navigate within the sandbox. Auto-completion in the shell is an excellent companion as well. More information on &quot;stacked.aliases&quot;, as well as the source can be found here: <a href="https://github.com/ttomaino/stacked_aliases/wiki" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ttomaino&#x2F;stacked_aliases&#x2F;wiki</a>. I include one example to illustrate:<p>As an example, the following two sandboxes contain the Broadcom Ethernet driver:<p>&#x2F;build&#x2F;username&#x2F;sandbox_a&#x2F;software&#x2F;vendors&#x2F;linux&#x2F;linux-2.6.35.7&#x2F;drivers&#x2F;ethernet&#x2F;broadcom &#x2F;build&#x2F;username&#x2F;sandbox_b&#x2F;software&#x2F;vendors&#x2F;linux&#x2F;linux-2.6.35.7&#x2F;drivers&#x2F;ethernet&#x2F;broadcom<p>Use the add alias command aa &lt;alias name&gt; &lt;directory&gt; to create aliases for the sandboxes:<p>aa a &#x2F;build&#x2F;username&#x2F;sandbox_a aa b &#x2F;build&#x2F;username&#x2F;sandbox_b<p>Then create an alias for the Broadcom directory:<p>aa brcm software&#x2F;vendors&#x2F;linux&#x2F;linux-2.6.35.7&#x2F;drivers&#x2F;ethernet&#x2F;broadcom<p>To change to the Broadcom directory in sandbox_a, just stack the appropriate aliases using the ua command. Stacking is done by stringing the aliases together with a period delimiter:<p>ua a.brcm<p>To change to the Broadcom directory in sandbox_b:<p>ua b.brcm
hifialmost 12 years ago
Great idea!<p>I don’t want symlinks to be resolved (&#x2F;var&#x2F;www becomes &#x2F;private&#x2F;var&#x2F;www on os x) so I modified it to store the path in the file:<p><pre><code> export MARKPATH=$HOME&#x2F;.marks function jump { mark=$(head -n 1 &quot;$MARKPATH&#x2F;$1&quot; 2&gt;&#x2F;dev&#x2F;null) if [[ $mark != &#x27;&#x27; ]]; then cd $mark else echo &quot;No such mark: $1&quot; fi } function mark { mkdir -p &quot;$MARKPATH&quot;; echo &quot;$(pwd)&quot; &gt; &quot;$MARKPATH&#x2F;$1&quot; } function unmark { rm -i &quot;$MARKPATH&#x2F;$1&quot; } function marks { find &quot;$MARKPATH&quot; -type f | while read filename do printf &quot;%-12s -&gt; %s\n&quot; $(basename ${filename}) $(head -n 1 ${filename}) done } </code></pre> I think the if syntax is zsh so probably won’t work with bash.
kelviealmost 12 years ago
I just do this (in zsh):<p><pre><code> setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups </code></pre> Which automatically pushes (unique) directories I&#x27;ve visted into $dirstack.<p>Then I have an alias:<p><pre><code> d () { local dir select dir in $dirstack echo $dir break done test &quot;x$dir&quot; != x &amp;&amp; cd $dir } </code></pre> That gives me a list of directories to jump to in my history:<p><pre><code> ~&#x2F;src&#x2F;git&#x2F;emacs-prelude $ d 1) &#x2F;home&#x2F;kelvie&#x2F;tmp&#x2F;typhoon 3) &#x2F;home&#x2F;kelvie&#x2F;src&#x2F;git 2) &#x2F;home&#x2F;kelvie&#x2F;tmp 4) &#x2F;home&#x2F;kelvie ?# </code></pre> So I just type 1-4 to go back to a directory I&#x27;ve previously been in.
davejamesmilleralmost 12 years ago
I&#x27;m too lazy to type &quot;jump&quot; so I&#x27;ve modified it to automatically add a Bash alias for each one as well.<p><a href="https://github.com/davejamesmiller/dotfiles/blob/master/.bash/mark.bash" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;davejamesmiller&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;.bas...</a>
评论 #6229434 未加载
lucaspilleralmost 12 years ago
I have no idea if anyone else does this, but I use tmux a lot for different projects. I usually have vim in one tab, logs in another, and tests in another. However, each tab I open I need to cd into the same directory. As such I came up with this helper for zsh. Every time I change a directory it records it. When I start a new session (new tmux or iTerm tab) it goes straight to that directory:<p><pre><code> # record directory in ~&#x2F;.lastpwd record_pwd() { pwd &gt; ~&#x2F;.lastpwd } chpwd_functions=(record_pwd) # go to last directory when opening a new shell if [[ -d `cat ~&#x2F;.lastpwd` ]]; then cd `cat ~&#x2F;.lastpwd` fi </code></pre> For other shells that don&#x27;t have something like chpwd_functions you could just alias cd.
评论 #6232645 未加载
AlexanderDhoorealmost 12 years ago
A handy alias I use:<p><pre><code> alias ..=&#x27;cd ..&#x27; </code></pre> Moving up the file tree has never been easier!
评论 #6229260 未加载
jeroenjanssensalmost 12 years ago
Thank you all for your kind words and helpful suggestions! I shall adapt both the post and the code accordingly.<p>Jeroen
评论 #6233580 未加载
lambyalmost 12 years ago
I&#x27;ve been doing a very similar thing for a few years: <a href="https://chris-lamb.co.uk/posts/optimising-directory-navigation-multiple-terminals" rel="nofollow">https:&#x2F;&#x2F;chris-lamb.co.uk&#x2F;posts&#x2F;optimising-directory-navigati...</a>
verbatimalmost 12 years ago
Interesting idea. I&#x27;ve the bash built-in &quot;pushd&quot; and &quot;popd&quot; for a long time for similar reasons, but those effectively limit you to treating the history as a stack rather than an arbitrary list.
评论 #6229719 未加载
clumsysmurfalmost 12 years ago
This reminds me of NCD (Norton Change Directory) which then went on to inspire many tools, like the excellent KCD and WCD. These tools index rather than create symlinks, though.
skriticos2almost 12 years ago
&quot;Like many others, I spend most of my day behind a computer.&quot;<p>I tend to spend my time in front of one. Is there an advantage to being behind it?<p>But jokes aside, I added this to my bashrc, looks useful.
BinRooalmost 12 years ago
I use CDargs <a href="http://www.skamphausen.de/cgi-bin/ska/CDargs" rel="nofollow">http:&#x2F;&#x2F;www.skamphausen.de&#x2F;cgi-bin&#x2F;ska&#x2F;CDargs</a>
jijjialmost 12 years ago
Not sure if the author knows or not, but there exists a BASH environment variable called CDPATH which does the same thing, and is a lot easier to use.
评论 #6229663 未加载
gosukiwialmost 12 years ago
Watching all the comments, I think the author should create a repo so people can fork or contribute instead of comment different versions :p
ChuckMcMalmost 12 years ago
This is how I know I am old I create a symlinks in my home directory to oft used locations and get there with cd ~&#x2F;linkname Has the added bonus of making my short path be ~&#x2F;linkname rather than ~&#x2F;some&#x2F;very&#x2F;deep&#x2F;pocket&#x2F;in&#x2F;some&#x2F;git&#x2F;repo
wvhalmost 12 years ago
Nice idea, reminds me of ncd from a far away, foggy past. I suggest some escaping on the directory name parameter though. If you&#x27;re not careful, you&#x27;re going to run into trouble with paths that have spaces or risk some nasty security issues with embedded special characters.
nkuttleralmost 12 years ago
That looks clever and useful, I wasn&#x27;t expecting that. I do maintain a few aliases to jump around, but this looks more efficient. Not sure though if I&#x27;ll like &quot;jump foo&quot; better than simply &quot;foo&quot; that I use now, but maintaining those aliases is a pita.
kodangoalmost 12 years ago
I&#x27;ve add a new bash version based on Jeroen&#x27;s code, it&#x27;s more easier to use in a Bash environment.<p>Welcome to use, thanks for Jeroen&#x27;s smart work.<p><a href="https://github.com/dangoakachan/mark-directory" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dangoakachan&#x2F;mark-directory</a>
timtadhalmost 12 years ago
I have a similar tool but it also manages shell environment variables, allowing you to jump around and&#x2F;or switch working projects. You can check it out at: <a href="http://github.com/timtadh/swork" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;timtadh&#x2F;swork</a>
评论 #6229715 未加载
parskialmost 12 years ago
I used some of this code to implement a more orthodox utility using flags instead of different syntax for different commands.<p><a href="https://github.com/parski/Wormhole" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;parski&#x2F;Wormhole</a><p>It works great! Great blog post.
X4almost 12 years ago
My Z-Shell predicts and auto-completes everything I do often perfectly, thus typing 2-3chars not only get&#x27;s me deep into directories, but also do actions I need. But maybe the idea of folder bookmarks can still be useful, idk.
ddoolinalmost 12 years ago
I usually just alias directories I frequent in .bashrc... Easy enough, I guess.
评论 #6230437 未加载
dueyfinsteralmost 12 years ago
I&#x27;ve updated the completion code to work on ubuntu and os x:<p><a href="http://neil.grogan.ie/2013/08/quickly-navigate.html" rel="nofollow">http:&#x2F;&#x2F;neil.grogan.ie&#x2F;2013&#x2F;08&#x2F;quickly-navigate.html</a>
trentmickalmost 12 years ago
<a href="http://code.google.com/p/go-tool/wiki/GettingStarted" rel="nofollow">http:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;go-tool&#x2F;wiki&#x2F;GettingStarted</a> Works on all OSes.
jasminaataalmost 12 years ago
Here is one that works with zsh: <a href="https://github.com/bufordtaylor/swiftcommandline" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bufordtaylor&#x2F;swiftcommandline</a>
straphkaalmost 12 years ago
This does look very similar to the setup I am using (<a href="https://github.com/huyng/bashmarks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;huyng&#x2F;bashmarks</a>)
th0br0almost 12 years ago
Or you might just use ZSH (particularly in combination with oh-my-zsh), keep the marks around as zsh vars and skip all the symbolic linkage.
评论 #6229229 未加载
nawitusalmost 12 years ago
Caps insensitive auto-complete is pretty handy. Add &#x27;set completion-ignore-case on&#x27; to &#x27;&#x2F;etc&#x2F;inputrc&#x27;.
arrowgunzalmost 12 years ago
Try using <a href="https://github.com/rupa/z" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z</a>
srinivasanvalmost 12 years ago
I&#x27;ve been looking for a way to make this less annoying, hanks!
mariusmgalmost 12 years ago
I use powershell aliases for this. Works great.
nXqdalmost 12 years ago
happy guaranteed <a href="https://github.com/clvv/fasd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;clvv&#x2F;fasd</a>
xalalmost 12 years ago
<p><pre><code> brew install fasd </code></pre> Thank me later
kodangoalmost 12 years ago
when mark name contains space, the auto complete doesn&#x27;t work, anyone have solutions?