When using the a-shell action in iOS Shortcuts to execute shell commands or Python scripts, it is often necessary to wait for the execution to finish before continuing to execute other actions.
This can be achieved by using the open shortcuts://
command as the last step in the a-shell action and adding a Wait for Return
action afterwards. This combination allows for waiting until a-shell finishes executing a long-running process before proceeding with other actions.