Skip to content
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

Add shell variables #348

Merged
merged 8 commits into from
Jun 8, 2022
Merged

Add shell variables #348

merged 8 commits into from
Jun 8, 2022

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jun 7, 2022

  • Add access to the the pathname of the script or the shell via $0
  • Add access to script arguments via $1, $2, $3, and so on
  • Add access to environment variables like $HOME
  • Allow setting a shell variable with test = 42 to access it via $test

@vinc
Copy link
Owner Author

vinc commented Jun 7, 2022

The shell will create a var for each env var at launch but a subsequent call to env test=42 for example will not make a $test available like test = 42 would because env is not a built-in command at the moment.

@vinc
Copy link
Owner Author

vinc commented Jun 7, 2022

Should we transform test = 42 into set test = 42 (or let test = 42) and add unset test?

@vinc vinc marked this pull request as ready for review June 8, 2022 07:05
@vinc vinc merged commit 0831045 into trunk Jun 8, 2022
@vinc vinc deleted the feature/shell-env-vars branch June 8, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant