TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Quickly navigate your filesystem from the command line

457 点作者 jeroenjanssens将近 12 年前

55 条评论

modernerd将近 12 年前
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 未加载
microcolonel将近 12 年前
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 未加载
nkuttler将近 12 年前
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 未加载
sukaka将近 12 年前
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 未加载
skrebbel将近 12 年前
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 未加载
networked将近 12 年前
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 未加载
fau将近 12 年前
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 未加载
mynameisfiber将近 12 年前
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 未加载
lazerwalker将近 12 年前
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 未加载
franzb将近 12 年前
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 未加载
shailesh将近 12 年前
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.
anjanb将近 12 年前
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 未加载
sam152将近 12 年前
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>
georgecalm将近 12 年前
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 未加载
tiziano88将近 12 年前
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-r超过 11 年前
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>
roob将近 12 年前
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 未加载
bakul将近 12 年前
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.).
daGrevis将近 12 年前
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 未加载
jonknee将近 12 年前
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>
_mc将近 12 年前
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]
ttomaino将近 12 年前
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
hifi将近 12 年前
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.
kelvie将近 12 年前
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.
davejamesmiller将近 12 年前
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 未加载
lucaspiller将近 12 年前
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 未加载
AlexanderDhoore将近 12 年前
A handy alias I use:<p><pre><code> alias ..=&#x27;cd ..&#x27; </code></pre> Moving up the file tree has never been easier!
评论 #6229260 未加载
jeroenjanssens将近 12 年前
Thank you all for your kind words and helpful suggestions! I shall adapt both the post and the code accordingly.<p>Jeroen
评论 #6233580 未加载
lamby将近 12 年前
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>
verbatim将近 12 年前
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 未加载
clumsysmurf将近 12 年前
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.
skriticos2将近 12 年前
&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.
BinRoo将近 12 年前
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>
jijji将近 12 年前
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 未加载
gosukiwi将近 12 年前
Watching all the comments, I think the author should create a repo so people can fork or contribute instead of comment different versions :p
ChuckMcM将近 12 年前
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
wvh将近 12 年前
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.
nkuttler将近 12 年前
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.
kodango将近 12 年前
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>
timtadh将近 12 年前
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 未加载
parski将近 12 年前
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.
X4将近 12 年前
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.
ddoolin将近 12 年前
I usually just alias directories I frequent in .bashrc... Easy enough, I guess.
评论 #6230437 未加载
dueyfinster将近 12 年前
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>
trentmick将近 12 年前
<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.
jasminaata将近 12 年前
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>
straphka将近 12 年前
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>)
th0br0将近 12 年前
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 未加载
nawitus将近 12 年前
Caps insensitive auto-complete is pretty handy. Add &#x27;set completion-ignore-case on&#x27; to &#x27;&#x2F;etc&#x2F;inputrc&#x27;.
arrowgunz将近 12 年前
Try using <a href="https://github.com/rupa/z" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z</a>
srinivasanv将近 12 年前
I&#x27;ve been looking for a way to make this less annoying, hanks!
mariusmg将近 12 年前
I use powershell aliases for this. Works great.
nXqd将近 12 年前
happy guaranteed <a href="https://github.com/clvv/fasd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;clvv&#x2F;fasd</a>
xal将近 12 年前
<p><pre><code> brew install fasd </code></pre> Thank me later
kodango将近 12 年前
when mark name contains space, the auto complete doesn&#x27;t work, anyone have solutions?