‹ BackHN Continuity

Thread

Small programming tricks

681 points · 294 comments · signa11

  1. GNOMES · · focus · HN ↗
    Simple trick I use almost daily for navigating backwards to an exact directory:

    <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;GNOMES&#x2F;6bf65926648e260d8023aebb9ede9573" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;GNOMES&#x2F;6bf65926648e260d8023aebb9ede9...

    I use this often instead of chaining together multiple &#x27;..&#x2F;..&#x27;.

    Also nice for when I use Zoxide to CD into a deep nested directory. I quickly found out unless you manually CD each hop, the different parent directories aren&#x27;t added to your Zoxide DB. (I have come across snippits to recursively CD into all directories in a path to &quot;prepopulate&quot; Zoxide).

    I made this to jump directly from say `&#x2F;foo&#x2F;bar&#x2F;batz&#x2F;abc&#x2F;123` to `&#x2F;foo&#x2F;bar&#x2F;batz`.

    1. urxvtcd · · focus · HN ↗
      For fish shell users, you get chronological directory traversal with Alt-Left Arrow and Alt-Right Arrow.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.