Skip to content

Instantly share code, notes, and snippets.

@gugod
Created April 2, 2020 10:21
Show Gist options
  • Save gugod/42b372d5d62ac426eae8d9cdfa6e9400 to your computer and use it in GitHub Desktop.
Save gugod/42b372d5d62ac426eae8d9cdfa6e9400 to your computer and use it in GitHub Desktop.
function e {
local file="$1"
if [[ ! -f $file ]]; then
if [[ ${file[0,2]} == "a/" || ${file[0,2]} == "b/" ]]; then
file=${file[3,$#file]}
fi
fi
if [[ ! -f $file ]]; then
echo "No such file: $1";
return;
fi
emacsclient -n $file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment