Skip to content

Instantly share code, notes, and snippets.

@jspiewak
Last active July 14, 2022 15:17
Show Gist options
  • Save jspiewak/77f2fb3c321b396efe72 to your computer and use it in GitHub Desktop.
Save jspiewak/77f2fb3c321b396efe72 to your computer and use it in GitHub Desktop.
Configure iTerm2 to handle x-man-page URLs
- Create a new profile, e.g. Man Page Viewer
- Set the command to `bash -c "echo $$HOST$$ | sed -E 's/(.*)\/(.*)/\1 \2/' | xargs man"`
- Select x-man-page from the "Schemes handled" drop down
@jspiewak
Copy link
Author

The bash -c was necessary
Had to change from $$HOST$$$$PATH$$ to just $$HOST$$ because iTerm2 was not substituting and only sending $$HOST to the echo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment