add a fish config and git modules
This commit is contained in:
parent
0495d974c3
commit
fd24c0d182
4 changed files with 47 additions and 0 deletions
39
.config/fish/functions/fish_prompt.fish
Normal file
39
.config/fish/functions/fish_prompt.fish
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
function fish_prompt --description 'Write out the prompt'
|
||||
|
||||
# Just calculate these once, to save a few cycles when displaying the prompt
|
||||
if not set -q __fish_prompt_hostname
|
||||
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
|
||||
end
|
||||
|
||||
if not set -q __fish_prompt_normal
|
||||
set -g __fish_prompt_normal (set_color normal)
|
||||
end
|
||||
|
||||
switch $USER
|
||||
|
||||
case root
|
||||
|
||||
if not set -q __fish_prompt_cwd
|
||||
if set -q fish_color_cwd_root
|
||||
set -g __fish_prompt_cwd (set_color $fish_color_cwd_root)
|
||||
else
|
||||
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
||||
end
|
||||
end
|
||||
|
||||
echo -n -s (set_color red) "$USER" (set_color normal) @ (set_color green) "$__fish_prompt_hostname" (set_color normal) ':[' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ']'
|
||||
echo
|
||||
echo -n '# '
|
||||
|
||||
case '*'
|
||||
|
||||
if not set -q __fish_prompt_cwd
|
||||
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
||||
end
|
||||
|
||||
echo -n -s (set_color green) "$USER" (set_color normal) @ (set_color green) "$__fish_prompt_hostname" (set_color normal) ':[' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ']'
|
||||
echo
|
||||
echo -n '> '
|
||||
|
||||
end
|
||||
end
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
|
|
@ -52,3 +52,9 @@
|
|||
[submodule ".vim/bundle/DrawIt"]
|
||||
path = .vim/bundle/DrawIt
|
||||
url = https://github.com/vim-scripts/DrawIt.git
|
||||
[submodule ".vim/bundle/vim-multiple-cursors"]
|
||||
path = .vim/bundle/vim-multiple-cursors
|
||||
url = https://github.com/terryma/vim-multiple-cursors
|
||||
[submodule ".vim/bundle/fish-syntax"]
|
||||
path = .vim/bundle/fish-syntax
|
||||
url = https://github.com/vim-scripts/fish-syntax
|
||||
|
|
|
|||
1
.vim/bundle/fish-syntax
Submodule
1
.vim/bundle/fish-syntax
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 34883e28bbc021eae07d85f259150c4d5797457e
|
||||
1
.vim/bundle/vim-multiple-cursors
Submodule
1
.vim/bundle/vim-multiple-cursors
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 714e92bef48386ad1a42e22decfaca1f379b4716
|
||||
Loading…
Add table
Add a link
Reference in a new issue