Some fish shell configuration changes

This commit is contained in:
2018-03-27 10:50:45 +02:00
parent e20ae0c561
commit 147d3d7514
5 changed files with 24 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ function fish_prompt
end
# Hostname with unique color
set_color (hostname -s | md5 | cut -c-6)
set_color (hostname -s | md5sum | cut -c-6)
echo -sn (hostname -s)
# A yellow separator

View File

@@ -0,0 +1,12 @@
function is_ssh_agent_running
if begin; test -f ~/.ssh/env; and test -z "$SSH_AGENT_PID"; end
source ~/.ssh/env > /dev/null
end
if test -z "$SSH_AGENT_PID"
return 1
end
ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent
return $status
end

View File

@@ -0,0 +1,5 @@
function ssh_agent_start
ssh-agent -c | sed 's/^echo/#echo/' > ~/.ssh/env
chmod 600 ~/.ssh/env
source ~/.ssh/env > /dev/null
end