3 ms·
Most instances of the organising principle I find here are amazing. I think "I would never have done it that way" followed almost immediately by "but damn: its
by ggm 6y ago
Most instances of the organising principle I find here are amazing. I think "I would never have done it that way" followed almost immediately by "but damn: its good"
for comparison: I have ~/bin and I don't distinguish between compiled and scripted personal commands.
- calvinmorrison 6y ago- having it in PATH is important. - most of us are programmers, spend a few minutes writing scripts! c@host:~$ ls ~/bin | wc- l 97
- garrepi 6y ago+1. Really love the organization of this
- dheera 6y agoI just have ~/bin/ and ~/bin/scripts/ and both are in my $PATH so I get autocompletion automatically. I usually don't create "--help" options for personal scripts. Most of my personal scripts are mostly designed to be extremely specific and be so damn obvious how to use them because the --help's of other commands are too complicated. Some examples of my scripts in ~/bin/scripts/: ffmpeg-extract-sound ffmpeg-jpegs-to-video ffmpeg-video-to-jpegs ffmpeg-ogv-to-mp4 convert-png-rgb24-to-grey8 iptables-ignore-rst-packets jabra-stop-changing-volume-goddamnit apt-remove-arm64-shit-that-nvidias-tx2-installer-installed-onto-my-x86-system ipv6-on ipv6-off ros-install-this etc.
- lars_francke 6y agoAsking for a friend: What does your "jabra-stop-changing-volume-goddamnit" script look like?
- smichel17 6y agohelp-script(){ "${EDITOR:?vi}" "$(which "$1")"; } I don't actually use that but the point stands -- If the script is simple enough, you don't need a --help; comments in the source work just as well.
- OMGWTF 6y agozsh has `= expansion`: > If a word begins with an unquoted `=' and the EQUALS option is set, the remainder of the word is taken as the name of a command. If a command exists by that name, the word is replaced by the full pathname of the command. To edit the source of `myscript` I can then use vim =myscript
- ianthehenry 6y agoThat's really neat! I'd never heard of that. I think you just saved my future self many many keystrokes.