4 ms·
Cool repo, but the example is lame because a shell, or a git alias would do just fine. A shell script that consists of a one-line exec isn't what people concer
by kohtatsu 7y ago
Cool repo, but the example is lame because a shell, or a git alias would do just fine.
A shell script that consists of a one-line exec isn't what people concerned about.
FWIW I'm a 99.9% POSIX masochist (probably closer to 4N)
- kohtatsu 7y agoLooks like a lot of your scripts couldbe aliases, I store mine in ~/.aliases, and slightly more complicated things (e.g. take arguments) in ~/.functions, and source both those files from bashrc. I have maybe 3 standalone shell scripts in my PATH, despite writing thousands of lines of shell.
- ben509 7y agoI had a mess of shell functions. It is nice that they run more quickly, but I don't have any shell commands that need to run that often. What moved me to putting them in a bin directory was that it's just easier to edit a standalone script.
- kohtatsu 7y agoWrite a shell script to concat them into a single file to source ;)
- mfontani 7y agoI've moved from aliases to scripts as I can't seem to have found the (if any exists...) way to ensure aliases can be used from within vim's ":!..." or ":'<,'>!...", and as I often find myself wanting to either execute something while I'm amending code, or wanting to filter text with a purpose-built command, I end up writing (sometimes very short!) shell scripts.