Created
August 4, 2021 17:33
-
-
Save sdilts/c4c591b2e4b7086ea2941297d8a70be3 to your computer and use it in GitHub Desktop.
Script to open magit buffer in current project
This file contains 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/sh | |
if [ -z "$1" ] | |
then | |
OPEN_DIR=$(PWD) | |
else | |
OPEN_DIR=$1 | |
fi | |
cd $OPEN_DIR | |
emacs --eval="(progn (magit-status (if-let ((cur-project (project-current))) (cdr cur-project) default-directory)) (delete-other-windows))" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment