This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log
There's so many code examples that hint at running your code on the terminal prompt, and that hint is a $
character at the start.
I've written about how I run my blog in a way that this character isn't actually part of the content (it's an non-selectable CSS pseudo element), but this doesn't help when taking code from other sites.
Mikkel's tiny, tiny script is so elegant I pinched it right away. The script, called $
consists entirely of:
#!/bin/zsh
$@
Now whenever I paste a line starting with $ ...
the command runs as I would intend. Perfect!
Source: github.com
Originally published on Remy Sharp's b:log
This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log

remy sharp's b:log | Sciencx (2020-11-17T04:58:02+00:00) Make an executable script called $ your PATH [link]. Retrieved from https://www.scien.cx/2020/11/17/make-an-executable-script-called-your-path-link/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.