Replies: 4 comments 1 reply
-
You should just be able to create a basic shell script that does the cd
and ls, then run it as a variable setting:
result = $ scripts/myscript.sh
Then ${result} would contain the result of the ls command.
…-Brett
On 13 Feb 2024, at 10:39, Don Voltz wrote:
I am just getting started with Bunch and trying to automate the
creation of a new virtual environment for python using Bunch. I would
like to Open, Create or Remove a virtual environment. Is there a way
to cd into a path (my main python project folder) and return the value
of ls for the dir currently active in terminal? I would like to use
the filename return to be able to select the one I want to open.
Thanks in advance for help on this if it is possible?
Don
--
Reply to this email directly or view it on GitHub:
#323
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Sequential execution of scripts and dialogs is a little wonky, as Bunch wants to resolve all dialogs before processing (which I should probably fix). You might try using “from script” frontmatter, where it returns the variable in YAML format. That should always execute before dialogs.
Side note, the |raw should be inside the curly brackets.
Thanks!
Brett
…On Feb 15, 2024 at 6:06 AM -0600, Don Voltz ***@***.***>, wrote:
Thank you, this did work well, but it raise another question. How can I wait for this result to return before I move onto running a snippet?
For example, I open Terminal and pass in the script as follows, but the Choice Dialog appears before the Terminal script ran. I have added sequence: sequential to Frontmatter but still seems to run the snippet before the app. I have also tried adding a delay to the Terminal as well as the scripts line (using ~5) but this does not work either. Sorry if this is a basic question but I can not seem to figure out how to 'await' the result of the script running.
Thanks in advance, I am really enjoying working with Bunch!
Thanks for the help
Don
Example Bunch:
Terminal
files = $ scripts/myscript.sh
<<#Open File
[Open File]
?[${files}|raw] "Select File to Open"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
… On Feb 15, 2024 at 6:06 AM -0600, Don Voltz ***@***.***>, wrote:
Thank you, this did work well, but it raise another question. How can I wait for this result to return before I move onto running a snippet?
For example, I open Terminal and pass in the script as follows, but the Choice Dialog appears before the Terminal script ran. I have added sequence: sequential to Frontmatter but still seems to run the snippet before the app. I have also tried adding a delay to the Terminal as well as the scripts line (using ~5) but this does not work either. Sorry if this is a basic question but I can not seem to figure out how to 'await' the result of the script running.
Thanks in advance, I am really enjoying working with Bunch!
Thanks for the help
Don
Example Bunch:
Terminal
files = $ scripts/myscript.sh
<<#Open File
[Open File]
?[${files}|raw] "Select File to Open"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks so much, I will try adding this in frontmatter Also, thanks about 'raw'! Don |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am just getting started with Bunch and trying to automate the creation of a new virtual environment for python using Bunch. I would like to Open, Create or Remove a virtual environment. Is there a way to cd into a path (my main python project folder) and return the value of ls for the dir currently active in terminal? I would like to use the filename return to be able to select the one I want to open. Thanks in advance for help on this if it is possible?
Don
Beta Was this translation helpful? Give feedback.
All reactions