Skip to content

Instantly share code, notes, and snippets.

@denis-soundcloud
Last active August 29, 2016 08:01
Show Gist options
  • Save denis-soundcloud/47c4d4716abf6aa6ff2af9da8233b6a0 to your computer and use it in GitHub Desktop.
Save denis-soundcloud/47c4d4716abf6aa6ff2af9da8233b6a0 to your computer and use it in GitHub Desktop.
fish prompts
function fish_prompt
# Hostname
set_color --background $computer_color
set_color 000
set_color --bold
echo -n ' '$computer_name' '
set_color --background normal
echo -n ' '
end
function fish_right_prompt
# Git branch
if test -e .git
set -l current_branch (git rev-parse --abbrev-ref HEAD)
set_color --background f80
set_color 000
set_color --bold
echo -n ' '$current_branch' '
set_color --background normal
echo -n ' '
end
# Working directory
set_color --background f60
set_color 000
set_color --bold
echo -n ' '(prompt_pwd)' '
set_color --background normal
echo -n ' '
# Time
set -l current_time (date "+%H:%M")
set_color --background f40
set_color 000
set_color --bold
echo -n ' '$current_time' '
set_color --background normal
echo -n ' '
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment