Additional features (refresh keyword, better parameter passing, terminal window bug fix) #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi !
I'm really interested in this project, and have added a few features that I needed for a few scripts
Refresh keyword
Adding the keyword
refresh
after the|
adds an action to the menu item. Upon clicking this button, the plugin will be refreshed immediately.Better parameter passing
The logic for parsing the parameter string felt a bit weak and prevented passing path containing spaces (or including small bash scripts inline)
I've refactored the way parameters are scanned using an NSScanner, which should be a bit more legible and robust. The legacy behaviour is kept, but this kind of lines are now possible
Say something | bash="say Hello world"
Say something else | bash:'say Goodbye moon;exit' terminal=true
Terminal window management
Launching a
bash
script by clicking a button failed when the frontmost terminal window was already running. I've changed the AppleScript to make sure to run the script in a new terminal window ifterminal=true
.We might also include a keyword to close this window if the script returned a
no error (0)
status codeLet me know if you'd prefer multiple pull request