3 ms·
My lowtech solution was to make a function with an array of hardcoded paths, it would then present a menu where you could select 0-N and it would jump. It also
by wingerlang 3y ago
My lowtech solution was to make a function with an array of hardcoded paths, it would then present a menu where you could select 0-N and it would jump. It also started with Terminal.
- twic 3y agoMy lowtech solution was just a bunch of aliases for directories i use a lot. Like: alias .a='cd ~/src/autosqueezer' alias .g='cd ~/src/gcc-squeeze-plugin' alias .u='cd ~/src/squeeze-utils' etc. You have to manage them by hand, but that's easy, and makes the result much more predictable than anything based on history. I also have contextual companions to these, defined as functions, like: .r() { local project_root=$(somehow work out the root of the current project) cd $project_root } .b() { .r cd build }
- JNRowe 3y agoA slightly different take is available if you're a zsh user, as you can take advantage of named directories to replace the aliases. If you do this the directories you've added will show up in regular completions and be available as arguments to commands too. For example, `hash -d name=location` allows you to use `~name` for the path. `run-help hash` for the basic interface, or zshexpn(1) for the gory details including fancy dynamic naming.
- notawaytothink 3y agoAre you aware of wd? (https://github.com/quackduck/WarpDrive https://github.com/quackduck/WarpDrive) ``` cd ~/src/autosqueezer wd add a # later, somewhere else wd a ```