Skip to content

Commit

Permalink
Merge pull request #16099 from heller/terminal-manpages-16074
Browse files Browse the repository at this point in the history
Tips-N'-Tricks: homebrew.man.conf for Terminal.app
  • Loading branch information
MikeMcQuaid committed Oct 11, 2023
2 parents b831a4e + c7653f5 commit 43e537a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/Tips-N'-Tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,20 @@ $ brew install --cask --adopt textmate
- [homebrew-mode](https://github.com/dunn/homebrew-mode) provides syntax highlighting for inline patches as well as a number of helper functions for editing formula files.

- [pcmpl-homebrew](https://github.com/hiddenlotus/pcmpl-homebrew) provides completion for emacs shell-mode and eshell-mode.

## macOS Terminal.app: Enable the "Open man Page" contextual menu item

In the macOS Terminal, you can right-click on a command name (like `ls` or `tar`) and pop open its manpage in a new window by selecting "Open man Page".

Terminal needs an extra hint on where to find manpages installed by Homebrew because it doesn't load normal dotfiles like `~/.bash_profile` or `~/.zshrc`.

```sh
sudo mkdir -p /usr/local/etc/man.d
echo "MANPATH /opt/homebrew/share/man" | sudo tee -a /usr/local/etc/man.d/homebrew.man.conf
```

If you're using Homebrew on macOS Intel, you should also fix permissions afterwards with:

```sh
sudo chown -R "${USER}" /usr/local/etc
```

0 comments on commit 43e537a

Please sign in to comment.