Files
ubuntu-fish-dotfiles/fish/theme-t31m/t31m_prompt_right.fish
2020-10-10 10:10:52 +02:00

22 lines
605 B
Fish

# moved original theme right prompt to left as we are working with a new line promt now.
function t31m_prompt_right
if test "$theme_complete_path" = "yes"
set cwd (prompt_pwd)
else
set cwd (basename (prompt_pwd))
if git::is_repo
set root_folder (command git rev-parse --show-toplevel ^/dev/null)
set parent_root_folder (dirname $root_folder)
set cwd (echo $PWD | sed -e "s|$parent_root_folder/||")
end
end
printf '%s' \U231A
printf (yellow)"("(off)(date +%H(yellow):(off)%M(yellow):(off)%S)(yellow)")"(off)
printf '%s' \U1F4C1
printf (yellow)"("(off)$cwd(yellow)")"(off)
end