Created
May 28, 2016 17:13
-
-
Save mnewt/3e67565f182dda51d6032df57d6cce36 to your computer and use it in GitHub Desktop.
add numerical value to variable, like +=
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plus_equals --no-scope-shadowing | |
set -l __fish_value $$argv[1] | |
set $argv[1] (math $__fish_value + $argv[2]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment