Last active
February 7, 2025 19:32
-
-
Save toonetown/bb6bc9e8476b1a591dd25faa7e180acb to your computer and use it in GitHub Desktop.
A script which wraps around `mate -w` or `rmate -w` for use in EDITOR variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PFX="$(which brew &>/dev/null && brew --prefix || echo "/usr/local")" | |
if [ -n "${SSH_CONNECTION}" ]; then | |
exec "$(brew --prefix)/bin/rmate" -w "$@" | |
else | |
exec "$(brew --prefix)/bin/mate" -w "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment