Improve git prompt performance

This commit is contained in:
Justin Hileman
2026-05-15 02:33:01 -04:00
parent 72a89d4246
commit 5f9fa8e3ab
9 changed files with 752 additions and 238 deletions

View File

@@ -0,0 +1,13 @@
function __bobthefish_prompt_git_pwd -S -a git_root_dir -a real_pwd -d 'Display the in-project path segment'
set -l project_pwd (__bobthefish_project_pwd $git_root_dir $real_pwd)
[ "$project_pwd" ]
or return
if [ -w "$real_pwd" ]
__bobthefish_start_segment $color_path
else
__bobthefish_start_segment $color_path_nowrite
end
echo -ns $project_pwd ' '
end