-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bash functions and global variables #3
Comments
I like that approach. Please submit a PR and I will accept it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, there are three functions
put
,get
, andkeys
in the script.Each of them ends up mutating global state, which probably isn't a good idea in the long term. You can make your functions more "pure" by using command substitution:
The function
keys
is probably the most problematic as you're creating a function and a global variable with the same name.The text was updated successfully, but these errors were encountered: