22 lines
371 B
Bash
Executable File
22 lines
371 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$1" = "-h" ]; then
|
|
cat <<EOF
|
|
Usage: ${0##*/}
|
|
|
|
Clean various running processes. Run it before exiting a session.
|
|
|
|
EOF
|
|
exit
|
|
fi
|
|
|
|
if command -v emacsclient >/dev/null 2>&1; then
|
|
if emacsclient -e '(kill-emacs)'; then
|
|
echo "Emacs terminated." >&2
|
|
fi
|
|
fi
|
|
|
|
if [ -n "$SSH_AGENT_PID" ]; then
|
|
echo "SSH" >&2
|
|
eval "$(ssh-agent -k)"
|
|
fi |