MNU now supports Mac terminal emulator iTerm2

MNU, my macOS menu bar utility that lets you call up regularly used command line operations and more, now supports iTerm2, the popular alternative to macOS’ own Terminal app.

MNU in action
MNU in action

I’ve had a couple of requests that MNU work with iTerm2, and it has been on my to do list for a while. It got put onto the agenda last month when a user reported a bug — which was fixed in version 1.5.2 — and the screen shot they posted in the issue on GitHub showed them using iTerm2. At that point, scripts and commands triggered by MNU would run in Terminal. Now they can run in iTerm2 instead.

To select iTerm2 as your preferred terminal emulator, just head to MNU’s Preferences: click on MNU, then click the actions button at the bottom (shown in the picture above). Now click in the Preferences tab:

MNU preferences
MNU’s Preferences — select iTerm2 here

Just check iTerm2 as your terminal choice.

MNU looks for iTerm2 in the standard macOS app and utility locations, so if you have the terminal installed elsewhere — or not at all — MNU will default to Terminal.

MNU 1.6.0 deals with a couple of other issues too. Its ability to handle escaped characters within your commands is improved, and I’ve made a small but far-reaching change to how MNU hands direct commands.

Direct commands are those which are processed by the operating system itself, not by way of a terminal. Like a shell, MNU uses spaces to separate the command and its arguments. This is fine until any of these references a path that contains a space too, such as /usr/local/share/Desktop Pictures.

Previously, the presence of the space would cause the command to fail or lead to an unexpected result. Now you can escape the space to ensure that it’s treated as part of the path, file name or whatever: just put the \ character before each such space character. For example:

You can now escape spaces in direct commands
You can now escape spaces in direct commands

You can install or update MNU directly or via Homebrew. You can find full instructions on the MNU web page.