#!/bin/bash if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then emacs --eval "(progn (magit-status \"$(pwd)\") (delete-other-windows))" & else echo "Current directory is not a git repository" exit 1 fi