Printing Shell Script's Stdout
Kevinlearynet opened this issue · 1 comments
I have a shortcut setup that will run a fish script in my bin, and the script has execute permissions. When I test the shortcut I see the correct [stdout]
value I'm expecting, but when I use the shortcut the output isn't input/printed. I expected stdout
to be dropped in as text, but maybe I'm missing something?
Switching the script to pipe to pbcopy
works: the password is added to the clipboard and I can paste it into any app. So the nuts and bolts are there, but I'm missing something about how to get a shell script printing text. Maybe it's not stdout
?
If I understood you correctly, you want to see the output of the command you execute with a shortcut. Well, iCHS doesn't support that directly, it simply executes the desired command and leaves it running, it doesn't care what the command outputs and why. The stdout/stderr output in test run added only for convenience and debug purposes, so you can check if the command actually works.
If you want to get a visual feedback of some sort, you can use applescript inside your fish script, see here for example:
https://blog.sapegin.me/all/show-gui-dialog-from-shell/
If you simply want a notification of some sort, you can use terminal-notifier (can be installed by simply calling brew install terminal-notifier
if you use brew).