@jrf_nl I’m not planning to do anything too crazy. So it should be pretty simple. If you use Bash in WSL, you “should” be fine (fingers crossed). I don’t have access to a Windows box. so I won’t be able test for that. I’m in my planning stage. As I make more progress rewriting Opal, we’ll start to see how things shape up
@awoodsnet Ah, but I don't use WSL. A lot of what I work on are (PHP-based) CLI tools, so I generally need to test in the native environment, aka no WSL 🤷♀️
@awoodsnet no sensible module/packaging
functions don't have named arguments
expressions in if-blocks are baroque
complex datatypes are so bad that you have to use json + jq & keep your data structures out of bash data structures as long as possible
fish & xonsh & powershell are the most interesting alternatives, but they all want to keep backwards compat in some sense & that really keeps them all making bad design choices
I'd like a REPL type editor where I could get the output (or sample output) on each line as I hover. This would allow me to visualize variables or see the expected results and I work my way through the script.
@Crell these are excellent criticisms. i totally agree.
As for scope, its basically the opposite of PHP - bash is global by default, and you need to use the local keyword to confine it to the function. there is no block scope.
@awoodsnet All of it is pretty difficult to find anything. I end up searching the web, and I have to look at multiple blog posts with ads popping up all over and the pages jumping around while loading before I’m able to find information that helps.
That said, I love Bash, and I would consider myself mostly an expert in it, but it’s still difficult to find good quality docs on it.
@ramsey totally agree. i’ve been doing lots of searching fir Bash documentation myself, and finding lots of offline sites, dead projects, and outdated/missing information. it’s pretty annoying.
@awoodsnet Also, the use of brackets, double brackets, and parentheses in conditional statements (along with = vs. ==) always trips me up. I know portability and POSIX compliance is part of the difference, but it’s hard to remember (and, again, difficult to find the information quickly).
@ramsey I’ve heard of POSIX, and know that compliance can be required sometimes. TBH, i’ve never spent one second of scripting time thinking about it. However, it looks like Ive quite a bit of learning ahead of me, if that needs to be an option.
@awoodsnet POSIX is a standard for compatibility across systems. Some Bash features or programs used are defined by POSIX, so using them means you can be certain they’ll run on any POSIX system. Lots of Unix systems (including macOS), many Linux distributions, and Windows (with certain add-ons) are POSIX compliant.
There are Bash features that aren’t POSIX compliant and aren’t guaranteed to work on all systems.
@ramsey i’ll have to do some research determine how much effort POSIX would be to implement, and if i want to care about it. It’s possible that for what I’m considering for development — maybe it won’t be a big deal.
Add comment