Fixed a pid-checking bug in get-ssh-agent and added journal.

main
Emily Frost 3 years ago
parent 7b8580be9c
commit 5cc5a5f563
Signed by: Emily
GPG Key ID: AA5D42849F1CBDC9

@ -24,7 +24,7 @@ function _start_new_ssh_agent () {
if [[ -e "$ssh_agent_env_file" ]]; then
# determine if the pid in the env file is still alive
if [[ "$(source "$ssh_agent_env_file"; ps -ef | grep "$SSH_AGENT_PID")" ]]; then
if [[ -n "$(source "$ssh_agent_env_file"; ps -p "$SSH_AGENT_PID")" ]]; then
source "$ssh_agent_env_file"
echo "Existing ssh-agent environment configured with pid ${SSH_AGENT_PID}."
else

@ -0,0 +1,6 @@
## journal
# A simple function to automatically select the correct journal file.
journal_file="$(xdg-user-dir DOCUMENTS)/journal/$(date +%F).md"
"$EDITOR" "$journal_file"
Loading…
Cancel
Save