Script shortcuts
See original GitHub issueHi,
Script shortcuts are great and very helpful in project. But they are too simple and stupid for now. There are some features which will be great to implement to my mind:
- Multi-line commands. For now there are no simple way to specify multiple commands, e.g.:
[scripts]
cmd = [
"echo 1",
"echo 2"
]
Of course as workaround I can use bash -c "echo 1 && echo 2"
, but if I want to write something complex with two more command it will be like a mess.
- Positional arguments in commands. Would be great to implement something like implemented in
tox
(http://tox.readthedocs.io/en/latest/config.html#substitutions-for-positional-arguments-in-commands). It’s very useful for example in case of tests:
[scripts]
test = py.test {posargs:tests/unit/}
And pyenv run test
to run all tests or pyenv run test -- tests/unit/test_utils.py
to run subset of tests.
This is just a proposal and I’m interesting in what you think about that.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Getting started with scripting for Shortcuts | iMore
One of the most powerful sections at your disposal in the Shortcuts app is called Scripting. This menu lets you work with device...
Read more >Shortcuts User Guide - Apple Support
A shortcut is a quick way to get one or more tasks done with your apps. The Shortcuts app lets you create your...
Read more >How To Format A Script With Keyboard Shortcuts
Screenwriting Keyboard Shortcuts For Running Scripts · CTRL + S – Saves your script · CTRL + A – Selects everything · CTRL...
Read more >Beginner's Guide to Siri Shortcuts - Part 4: Scripting - YouTube
Welcome to part four of my Beginner's Guide to Siri Shortcuts. In this fourth part we'll learn about how to use scripting actions...
Read more >How to Allow Running Script in Shortcuts App on iPhone and ...
Do you need to run JavaScript on web page in Apple Shortcuts ? Here is how you can allow running script in Shortcuts...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@stevenhair that unfortunately isn’t how it works. We are happy to maintain it the way it is. We are not interested in building an entire new application to support endless use cases around it. The current tooling provides a helper suite to supplement
pipenv run
, but it’s a little odd to tell us we need to either build more features into it or remove it entirely, isn’t it?Maybe we can introduce optional Invoke integration like this
Pipenv will not bundle Invoke, but simply converts the
{ task = "..." }
construct into ainvoke ...
call, and show and error message if Invoke is not installed (either globally or in the virtualenv).Thoughts @techalchemy?