mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-30 20:54:21 +08:00
Add mtahmed theme.
--HG-- extra : amend_source : e3eb545150f7c4aa5ccaca80a64649419d154e6d
This commit is contained in:
parent
62928f9aa5
commit
20246508ca
15
themes/mtahmed/README.md
Normal file
15
themes/mtahmed/README.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
## mtahmed
|
||||||
|
|
||||||
|
Minimal theme.
|
||||||
|
|
||||||
|
![mtahmed theme](http://csclub.uwaterloo.ca/~mtahmed/media/images/fish.png)
|
||||||
|
|
||||||
|
#### Left prompt
|
||||||
|
|
||||||
|
- First 10 characters of hostname if `ssh`'ed
|
||||||
|
- Current directory name (not path)
|
||||||
|
- ─╼ (cute little unicode characters)
|
||||||
|
|
||||||
|
#### Right prompt
|
||||||
|
|
||||||
|
- Exit code of the previous command
|
19
themes/mtahmed/fish_prompt.fish
Normal file
19
themes/mtahmed/fish_prompt.fish
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# 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
|
12
themes/mtahmed/fish_right_prompt.fish
Normal file
12
themes/mtahmed/fish_right_prompt.fish
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# 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_right_prompt
|
||||||
|
set -l last_status $status
|
||||||
|
set_color $fish_color_cwd
|
||||||
|
printf $last_status
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user