summaryrefslogtreecommitdiff
path: root/share/switch.muttrc
diff options
context:
space:
mode:
authorAdrien Czerny <adrien.czerny@moo.com>2025-03-31 16:05:56 +0100
committerAdrien Czerny <adrien.czerny@moo.com>2025-03-31 16:41:38 +0100
commitd0dfcc3c27547e62bd55193b91a6a84344873d2c (patch)
tree7a5fdd64eb846cdacc3461f7a4b7ec2c69ff0be8 /share/switch.muttrc
parent943b45340ce6d0249e1e8fc608718a13045584d3 (diff)
Fix unary operator expected error
On my system running any `mw` command after a fresh install from the AUR, I get: ``` /usr/bin/mw: line 37: [: 1.5: unary operator expected ``` Now the script doesn't error per-se but it does set the `master` and `slave` variables to wrong values. I'm also not sure how this wasn't raised before; maybe that's a new bash version thing? I'm on 5.2.37. Anyway I faffed around trying to fix this, in particular with the `-gt` operator but it turned out that properly comparing float numbers is a pain in the butt in bash. I found solutions using `bc` which I thought were weird. To keep things simple I ended up doing a little substitution on the dot `.` character and turned these nasty floats into integers, along with using the `-gt` operator which did the trick on my system. May be unorthodox so feedback is more than welcome. Thank you for the great software by the way, lots of gratitude for your work.
Diffstat (limited to 'share/switch.muttrc')
0 files changed, 0 insertions, 0 deletions