mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-08 14:43:16 +08:00
![Eivind Uggedal](/assets/img/avatar_default.png)
Displays the $CWD only. If you are connected through ssh the hostname will also be shown. I like my prompt uncluttered. If I need to know if my git repo is dirty I run `git st`. If I get lost and need to know which branch I'm on it takes my fingers 2 seconds to type `git br<C-f>`. The right prompt displays the last commands exit code if it was non-zero. It requires a recent version of fish from git.
8 lines
118 B
Fish
8 lines
118 B
Fish
function fish_prompt
|
|
if test -n "$SSH_CONNECTION"
|
|
printf '%s ' $HOSTNAME
|
|
end
|
|
|
|
printf '%s ' (prompt_pwd)
|
|
end
|