6 ms·
They have powershell on those unix computers nowadays. Just sayin'.
by 13of40 3y ago
They have powershell on those unix computers nowadays. Just sayin'.
- rcme 3y agoI-Don’t-Want-All-My-Commands-To-Be-This-Long
- 13of40 3y agoGet-Alias
- shortrounddev2 3y agoThere's aliases, and you can just hit tab to autocomplete the commands and their argument names. I find Powershell to be far more readable than bash because of its verbosity
- rcme 3y agoAliases aren’t portable
- vips7L 3y agoI don’t think I’ve ever seen a portable posix shell script. They all rely on bash-isms and gnu binary behavior
- shortrounddev2 3y agoPersonally I don't write portable shell scripts. They exist only for my own usage on my desktop. If we rely on any kind of script for deployment purposes at work, we use the scripting lang in the build system or a python script
- Const-me 3y agoInterestingly, I actually do. When I write bash scripts which will go to git and probably stay there for a while, I use long form of the switches, like --long-option-name instead of -lon. They make the script more readable when after a year someone wants to modify it.
- diarrhea 3y agoI use long options always, even going through the pain of typing them out when to tab completion is available. Exceptions are truly trivial things like ls. It allows things like history | fzf to work very well.
- mbwgh 3y agofzf comes with some bash completions (https://wiki.archlinux.org/title/fzf https://wiki.archlinux.org/title/fzf), including Ctrl+r for basically `history | fzf`.
- dspillett 3y agoIt is nice for maintaining scripts though. While short names and options are typing-savers interactively (though sometimes problematical when a single character typo can radically change the meaning of a command in a way that means it is still a valid command so will be executed) in scripts I want long names so people after me (including future me) can understand without reference to man pages or similar. OK, the same could be achieved with copious comments, but then you have lots of pairs of bits of text to keep in sync.