35 points · by verdverm · 6y ago · 34 comments
This project looks like it is streamlining and organizing-per-project this kind of workflow / preference for short aliases, with helpful conventions like "?" that act sort of like a tab-completion hint.
In any folder, you put all your favorite One-liners for that folder into a file called “.ok”.
Then you can run them command with “ok 1” for the first command, or “ok 2” for the second command, etc. Use “ok” by itself to pretty-print all the available commands in that folder.
I started the project but my friend @doekeman took it waaay further than I ever dreamed.
It’s really helpful if you have a bunch of different projects that you work on, and need a way to remember all their different commands and incantations.
There’s a Powershell version too (ok-ps).
For there bit where I jump around from one project to another I use a system called markjump. It’s great too.
$ alias shortcut='common command'
> jump around the filesystem $ r='/long/complicated/dir'
$ cd $r
$ pwd
/long/complicated/dir
> chain them together $ a=echo
$ b=hello
$ $a $b
hello
So what exactly is the added value here? Is it a manager for shortcuts? Persistence?Another nice thing is you environment bar secrets are only exposed during command execution when they are needed. (See how the .jumpfiles.secrets.sh is used) It's also largely an experimentation ground for some upcoming Hof features.
Jumpfiles got ephemeral VMs and k8s last night, so if you want to enable consistent dev envs and debugging, there are some options. Email me if you'd like to know more about what we are planning and some of the more leading edge capabilities.
- direnv (https://direnv.net) for project-specific environment variable management and more
- fzf (https://github.com/junegunn/fzf) for rifling through history and finding files quickly.
- z (https://github.com/agkozak/zsh-z) to partial-match on a frequency-weighted directory switch (eg, `z Proj <RET>` will move me to `$HOME/Code/Projects/`.
CDPATH The search path for the cd command. This is a colon-separated list of directories in which the shell looks for destination directories specified by the cd command. A sample value is ".:~:/usr".
This works with tab completion.
Take. A look at the Hof leap, there are some examples of jumping to a dir, found something, and then hopping back to where you were. Super useful for building tools you are working on but don't need the extra shell session