How can I include in a (zsh) shell script a command that will minimize one particular window among several windows open in a specified app?
I already know how to include a command that opens an app with one or more documents open in it, e.g.:
open -a textedit.app .profile .zshrc
What command can I use from Terminal to minimize a specified one of those just-opened windows?
I presume that something involving
osascript is involved, such as in Is there a way to minimize open windows from the command line in OS X Lion?. But the method given there in the Edit by the original poster: (i) minimizes all the windows; and (ii) does use
osascript which, as I recall, is not so simple to call from within a shell script.