Skip to content

Instantly share code, notes, and snippets.

@cprieto
Last active November 25, 2015 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cprieto/4fa68443b4d305d542ea to your computer and use it in GitHub Desktop.
Save cprieto/4fa68443b4d305d542ea to your computer and use it in GitHub Desktop.
function fish_greeting
# We assume the name is the first element of the full name
switch (uname)
case Darwin
set full_user_name (id -P | cut -d: -f 8 | tr ' ' '\n')
case Linux
set full_user_name (getenv passwd $USER | cut -d: -f 5 | tr ' ' '\n')
case '*'
set full_user_name "Stranger"
end
echo ""
echo -s " /\_/\ "
echo -s " ____/ o o \\"
echo -s " /~____ =ø= /"
echo -s " (______)__m_m)"
echo -s (set_color normal) "Welcome back " (set_color green) $full_user_name[1] (set_color normal) " !"
echo ""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment