ambevar-dotfiles/.scripts/einfo

16 lines
285 B
Plaintext
Raw Normal View History

2014-02-10 21:13:02 +01:00
#!/bin/sh
check() {
for i ; do
if ! command -v $i >/dev/null 2>&1; then
echo "'$i' not found in PATH. Exiting." >&2
exit 1
fi
done
2014-02-10 21:13:02 +01:00
}
2014-02-10 21:13:02 +01:00
check emacs realpath
2014-02-12 11:49:24 +01:00
[ -f "$1" ] && node="$(realpath "$1")" || node="$1"
emacs --eval '(progn (info "'"$node"'")(delete-other-windows))'