mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-23 05:55:26 +08:00
Improve Edan theme design & function naming.
- Rename function "edan-remote" and "edan-local" to "edan-set-remote" and "edan-set-local". - Exchange order of "user" & "host" ( xiloºXiloMac => XiloMacˇxilo ) - Change git dirty mark icon ( [edan-update] ★ => [edan-update]× ) Before:  After: 
This commit is contained in:
parent
580f3e1d9d
commit
f982470b1a
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Inspired by idan, a functional, uncluttered fish theme with usability perks for git users and python developers.
|
Inspired by idan, a functional, uncluttered fish theme with usability perks for git users and python developers.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Characteristics
|
#### Characteristics
|
||||||
|
|
||||||
##### Left Prompt
|
##### Left Prompt
|
||||||
|
|
||||||
* User & host (hidden by default, execute `edan-remote` to show, `edan-local` to hide)
|
* User & host (Shown in "remote" mode, hidden by default. Execute `edan-set-remote` or `edan-set-local` to switch.)
|
||||||
* Current python virtualenv (if applicable)
|
* Current python virtualenv (if applicable)
|
||||||
* Truncated CWD (just the current folder name)
|
* Truncated CWD (just the current folder name)
|
||||||
* Git branch and dirty state (if applicable)
|
* Git branch and dirty state (if applicable)
|
||||||
@ -17,3 +17,7 @@ Inspired by idan, a functional, uncluttered fish theme with usability perks for
|
|||||||
|
|
||||||
* Full CWD path
|
* Full CWD path
|
||||||
* Last error code (if applicable)
|
* Last error code (if applicable)
|
||||||
|
|
||||||
|
#### Font
|
||||||
|
|
||||||
|
Check out [Anonymous Pro](http://www.marksimonson.com/fonts/view/anonymous-pro).
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Switch environment to "local" for edan.
|
# Switch environment to "local" for edan.
|
||||||
|
|
||||||
function edan-local
|
function edan-set-local
|
||||||
set -U EDAN_HOST_TYPE "local"
|
set -U EDAN_HOST_TYPE "local"
|
||||||
end
|
end
|
@ -1,5 +1,5 @@
|
|||||||
# Switch environment to "remote" for edan.
|
# Switch environment to "remote" for edan.
|
||||||
|
|
||||||
function edan-remote
|
function edan-set-remote
|
||||||
set -U EDAN_HOST_TYPE 'remote'
|
set -U EDAN_HOST_TYPE 'remote'
|
||||||
end
|
end
|
@ -19,7 +19,7 @@ function _user_host
|
|||||||
else
|
else
|
||||||
echo -n (set_color -o blue)
|
echo -n (set_color -o blue)
|
||||||
end
|
end
|
||||||
echo -n $USER°(hostname|cut -d . -f 1) (set color normal)
|
echo -n (hostname|cut -d . -f 1)ˇ$USER (set color normal)
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
@ -57,7 +57,7 @@ function fish_prompt
|
|||||||
set -l git_branch '[' (_git_branch_name) ']'
|
set -l git_branch '[' (_git_branch_name) ']'
|
||||||
|
|
||||||
if [ (_is_git_dirty) ]
|
if [ (_is_git_dirty) ]
|
||||||
set git_info $red $git_branch " ★"
|
set git_info $red $git_branch "×"
|
||||||
else
|
else
|
||||||
set git_info $green $git_branch
|
set git_info $green $git_branch
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user