1. 8

    I never could get into these jump tools. zsh with auto_cd and cdpath is good enough for me. I just type dotf<Tab><Enter>, it completes to dotfiles/ and cds into ~/src/github.com/myfreeweb/dotfiles (because that …myfreeweb/ directory is on the cdpath).

    1. 4

      Another really useful thing about zsh autocompletion is that it matches on any portion of the directory name. So, for example, when I had multiple projects like project-server, project-hq, and project-mobile, I only needed to type eg -mob<Tab> and it would autocomplete to project-mobile. It was very convenient because I switched between these three directories all the time.

      1. 4

        My favorite is the deep path expansion, e.g. ~/s/g/m/dot to ~/src/github.com/myfreeweb/dotfiles. I really miss that in other applications (e.g. neovim)

        1. 2

          I use that a fair bit as well, it’s a helpful feature.

        2. 1

          Autojump utilities, such as fasd and pazi (mine), do that as well. Some of them (fasd, not pazi) even have shell autocomplete too so z hq would go to project-hq if that were frecent.

          One other cool feature they have which tab-completion sorta mimics is picking from items in a list. With those, z -i project would give an interactive menu of all items with “project”, while with tab completion, double-mashing tab does a similar thing.

          If auto_cd is good enough for you, that’s totally fine, I just want to also explain that autojump utilities also do have tab completion and partial matching of path partial parts too.

        3. 3

          One of my favorite features is auto_pushd. It combines nicely with auto_cd. Zsh is remarkably well polished.

        1. 3

          I’ve been using one or another autojumper for the better part of 8 years, and at this point I’ve come to rely on them as part of my workflow.

          Unfortunately, a lot of them have a lot of problems. Autojump is in python and fairly slow. In addition, it’s less featureful than fasd (really, fasd has tons of cool features).

          Despite fasd being the most featureful, it is some truly terrifying shell and has had some unsafe eval issues in the past.

          Which brings me to what I’m actually commenting about: I wrote my own autojumper called pazi and switched to it a few months back. It still has a ways to go before it’s as featureful as fasd, but it’s already faster than all the others, and it’s in rust so there’s no chance of an accidental “eval” blowing up in my face.

          If you want an autojumper, my biased recommendation is to try pazi :)

          1. 1

            There’s no need to implement the most basic tcp scanning these days. Just use https://github.com/robertdavidgraham/masscan

            That’ll be a damn sight quicker than the code in this blog, and once you have the list of the ips listening on that port at all, a more specialized request (e.g. the RANDOMKEY here) can be done. I assume the author didn’t know about masscan since there’s no reference to it.