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

Ability to use functions in bash #28

Closed
akiross opened this issue Sep 5, 2017 · 1 comment
Closed

Ability to use functions in bash #28

akiross opened this issue Sep 5, 2017 · 1 comment

Comments

@akiross
Copy link

akiross commented Sep 5, 2017

It would be nice if functions defined in the script source could be used in the bash action. For example:

#!/bin/bash

function write() {    
    zenity --info
}

echo "Title"
echo "---"
echo "Do something | bash='write'"

this would allow to have more complex, self-contained script. For example, in my case, I would like to use zenity to get some user input, process it and perform some actions with the results. Doing that in functions instead of external script files has the advantage of being easier to maintain.

@p-e-w
Copy link
Owner

p-e-w commented Sep 30, 2017

This is impossible, because there are two entirely separate contexts here: The executable run by Argos (which can be anything, even a binary) and the command passed to a (separate) Bash shell. The fact that the executable happens to be written in Bash as well is purely coincidental.

@p-e-w p-e-w closed this as completed Sep 30, 2017
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

No branches or pull requests

2 participants