I've recently started using macOS for work and, coming from Linux, am looking to replicate as much of my setup regarding keyboard shortcuts etc. as possible. I'm currently trialling KM and it seems to have everything I need (and more!).
However, I am having trouble executing some of my scripts within an action. I've narrowed the issue down to the presence of the
choose command in the script which simply provides the ability for the user to choose one of a number of options using a nice UI (similar to Linux's
rofi -dmenu command). (I realize that KM has the "Prompt with List" action but I'm trying to keep everything within the script and just use KM to trigger it.)
As the simplest example, I have the following test script:
#!/usr/bin/env bash echo "Start" ls | choose echo "End"
If I run this in the terminal (and choose
test-script.sh from the displayed list of files), it outputs:
but if I test the action within KM, the list of files is not displayed and the output of the script (as displayed in the results window) is:
Can anyone help me understand why this is happening and whether there's anything I can do to make it work?
Thanks in advance!