Last active
August 29, 2016 08:01
-
-
Save denis-soundcloud/47c4d4716abf6aa6ff2af9da8233b6a0 to your computer and use it in GitHub Desktop.
fish prompts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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