KM removes tab from beginning of shell output

The results from this script should have a tab at the beginning of the first line.

When run in the shell, this works. When run through KM, this tab is missing.

Am I overlooking something?

Keyboard Maestro Actions.kmactions (2.0 KB)

Hey Jack,

I guess "display results in a window" filter tabs, spaces, etc at the beginning of the string to be displayed, to optimize (in general) the window size :wink:


-- Alain

Hi Alain,

It does it also when KM outputs the results to the clipboard.

So KM shell does with variable.

A workaround can be to prepend with an arbitrary visible character and truncate

In an effort to simplify some of the more complex actions, I added the "Action" gear menu at the top right corner of the action.

Some options for some action moved in there.

In an effort to ensure folks had some chance of knowing whether there were extra options, the action icon appears slightly different depending on the available options. If there are a timeout configuration, then there are clock hands on the icon, and if a timeout has actually be configured, then the clock hands change somewhat. But more pertinent to this question, if there are action-specific options, then the icon is coloured light blue.

which it is for the Execute Shell Script action because it has the additional options:

Trim results removes white space from the start and end of the resulting text (not the start and end of each line, just the start and end of the entire returned text).

Turn it off if you want to ensure you get the tabs and returns at the start and end of the result.


You are a genius! Thanks