mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
20246508ca
--HG-- extra : amend_source : e3eb545150f7c4aa5ccaca80a64649419d154e6d
20 lines
402 B
Fish
20 lines
402 B
Fish
# name: mtahmed
|
|
# Left prompt:
|
|
# - First 10 characters of hostname if ssh'ed
|
|
# - Current directory name
|
|
# - ─╼
|
|
# Right prompt:
|
|
# - Exit code of the previous command
|
|
function fish_prompt
|
|
set_color $fish_color_cwd
|
|
if [ -n "$SSH_CONNECTION" ]
|
|
printf '%s | ' (hostname | head -c 10)
|
|
end
|
|
if [ "$HOME" = (pwd) ]
|
|
printf "~"
|
|
else
|
|
printf (basename (pwd))
|
|
end
|
|
printf " ─╼ "
|
|
end
|