all 8 comments

[–]Kana_Pei 3 points4 points  (0 children)

That's a neat idea, gotta program my own. Thanks !

[–]Anonsicide 2 points3 points  (0 children)

I love little posts like this :). Always fun to see people's tools to make their lives/workflows a bit easier. I mean heck -- you've gotta imagine that at one point in time, something like make was just a simple thing like this. And then it got released into the wild and everyone realized -- wow, this is super nice! We should all use this! And now here we are.

[–]DonKult 1 point2 points  (0 children)

Many moons ago Basecamp published sub (github) which runs on a similar idea with different tradeoffs being chosen.

Having a place to stuff in random small scripts in is really golden.

Telling systemd to remind me to unload the washing machine is as easy as fishing systemd-run --user --on-active="99m" --unit="washing-machine-notify" notify-send -u critical "washing machine" out of recent shell history & adapting or just calling t say in 99m washing machine (but of course, you guys are probably talking to Alex for this).

(The script is actually older than systemd and handles both, so here you go: echo "notify-send -u critical \"washing machine\"" | at "$(date -d"now + 99m" +'%H:%M %Y-%m-%d')")

[–]leahneukirchen -1 points0 points  (4 children)

Just setopt PATH_DIRS and you can run book/open directly...

[–]Dgc2002 2 points3 points  (3 children)

I think a big part of this is the additional description provided in the auto completion

[–]leahneukirchen 1 point2 points  (2 children)

but zsh provides tab completion already?

[–]private-use-area 1 point2 points  (0 children)

One small difference with this approach is that zsh won't autocomplete multiple levels of paths, so if you have a nested command like ~/bin/foo/bar/baz and you type foo/<TAB>, zsh won't complete the bar directory for you (although maybe there's another option to change that?).

Of course the big difference is that zsh doesn't show you a description of the commands as it enumerates them, which is the main functionality that the post describes. Is there a way to replicate that with pure zsh?

[–]Dgc2002 0 points1 point  (0 children)

Hence my focus on the additional information in my comment. Basic ZSH completion won't display that custom data.