Random useful MacOS shortcut keys

Finder shortcuts:

Cmd-down – navigate into folder (down)

Cmd-up – navigate up from current folder

Spacebar – preview a file

Shift-Cmd . – toggles display of hidden files

Other tips:

When using multiple monitors, if you pull the mouse cursor down on a screen you can move the Dock to that monitor.

MacOS Catalina, npm global installs and zsh

As MacOS switched to zsh replacing bash a while back (you may have noticed the prompt to change to zsh in your Terminal), I keep coming across a few issues that I need to work around. My latest was that I noticed apps I’d installed globally with ‘npm install -g’ were no longer in my path.

Following a combination of suggestions from answers to this question, I added the following line to ~/.zshrc to add the npm global install dir to my path:

export PATH="$PATH:$HOME/.npm-global/bin"