From any terminal
ncmd opens Northern Commander from any terminal. Each command acts on the application if it is
running, starts it if it is not, and hands the shell back at once. Its longer name,
northern-commander, does the same.
| Command | What it does |
|---|---|
ncmd |
Brings the application to the front |
ncmd ~/work |
Shows that folder in the active pane; Back returns |
ncmd notes.txt |
Shows the folder it is in, with the cursor on it |
ncmd view notes.txt |
Opens it in the viewer |
ncmd edit notes.txt |
Opens it in the editor |
ncmd help |
Lists them all; ncmd help edit explains one |
If a dialog is open in the application, what was asked for waits until it closes, and the command says so.
Waiting for the viewer or editor
ncmd edit --wait notes.txt returns only when the editor closes, and ncmd view --wait only when the
viewer does. That is what a program asking for an editor needs:
git config --global core.editor "ncmd edit --wait"
Help for each command
ncmd help edit, or ncmd edit --help, shows that command’s usage and options. Anything ncmd does not
understand is answered with the usage line. Command line lists every command with its help,
and grows as the application can do more from a terminal.
Installing it
Installed with Homebrew, it is already there. Otherwise, Install command-line tool… in the Options menu, also offered once as the application starts, adds both names to a folder your shell looks in. No password is needed where your account can write to one, as it can if Homebrew is installed. Where it cannot, you are given a line to run, and Open in terminal types it into the built-in terminal, where you press Return and give your password.