-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Milestone
Description
It's not super common, but I've found myself wanting these functions to set upper and lower bounds on things.
Obviously this is just a nice tool to have, but as a specific use case, some string commands like pad and repeat will error if you give them negative numbers. Obviously we can't use abs here, so I've been doing test $blah -lt 0 && set $blah 0. This works of course, but it is less elegant and requires setting the value to a variable first.