मैं व्यक्तिगत रूप से साझा/डिफ़ॉल्ट को छूना पसंद नहीं करता हूं। मछली के पास एक महान कार्य डिजाइन है, इसलिए इसका लाभ उठाना।
सामग्री के साथ ~/.config/fish/functions/prompt_long_pwd.fish
बनाएँ:
function prompt_long_pwd --description 'Print the current working directory'
echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/private||'
end
इसके बाद अपने ~/.config/fish/functions/fish_prompt.fish
prompt_long_pwd
उपयोग करने के लिए संपादित करें।
~/.config/मछली/config.fish:: यहाँ है कि मैं का उपयोग कस्टम शीघ्र है
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_color_branch magenta bold
set -g __fish_git_prompt_showupstream "informative"
set -g __fish_git_prompt_char_upstream_ahead "↑"
set -g __fish_git_prompt_char_upstream_behind "↓"
set -g __fish_git_prompt_char_upstream_prefix ""
set -g __fish_git_prompt_char_stagedstate "●"
set -g __fish_git_prompt_char_dirtystate "✚"
set -g __fish_git_prompt_char_untrackedfiles "…"
set -g __fish_git_prompt_char_conflictedstate "✖"
set -g __fish_git_prompt_char_cleanstate "✔"
set -g __fish_git_prompt_color_dirtystate blue
set -g __fish_git_prompt_color_stagedstate yellow
set -g __fish_git_prompt_color_invalidstate red
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
set -g __fish_git_prompt_color_cleanstate green bold
~/.config/मछली/कार्य/fish_prompt.fish
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
# PWD
set_color $fish_color_cwd
echo -n (prompt_long_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
if not test $last_status -eq 0
set_color $fish_color_error
end
echo -n '$ '
end
'मछली, संस्करण 2.3.0' – Daniel
काम नहीं करता है यह मेरे लिए काम करता है। मेरे पास v2.3 –
है मुझे यह जोड़ना चाहिए था कि मैं डार्टफ़िश थीम का उपयोग करता हूं। शायद यह विषय का हिस्सा है? –