fish funcs
This commit is contained in:
@@ -45,7 +45,6 @@
|
|||||||
|
|
||||||
functions.fish_greeting = "";
|
functions.fish_greeting = "";
|
||||||
functions.fish_prompt = ''
|
functions.fish_prompt = ''
|
||||||
function fish_prompt --description 'Write out the prompt'
|
|
||||||
set -l last_pipestatus $pipestatus
|
set -l last_pipestatus $pipestatus
|
||||||
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
|
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
|
||||||
set -l normal (set_color normal)
|
set -l normal (set_color normal)
|
||||||
@@ -75,9 +74,9 @@
|
|||||||
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
||||||
|
|
||||||
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
|
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
|
||||||
end
|
'';
|
||||||
|
|
||||||
function prompt_pwd --description 'short CWD for the prompt'
|
functions.prompt_pwd = ''
|
||||||
set -l options h/help d/dir-length= D/full-length-dirs=
|
set -l options h/help d/dir-length= D/full-length-dirs=
|
||||||
argparse -n prompt_pwd $options -- $argv
|
argparse -n prompt_pwd $options -- $argv
|
||||||
or return
|
or return
|
||||||
@@ -127,9 +126,7 @@
|
|||||||
string join / -- (string replace -ar -- '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full
|
string join / -- (string replace -ar -- '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|||||||
Reference in New Issue
Block a user