Directory stack size shouldn't use a PID.

Use in-shell array size counting.
This commit is contained in:
2025-03-07 23:13:16 -05:00
parent fe472e09cb
commit 88bb192ca3

View File

@ -364,7 +364,8 @@ if( ! $?CSHENV_DISABLE_PROMPT_PATH ) then
set path_prompt_view="%{${path_color_seq}%}${path_prompt}%{${sgr_reset}%}" set path_prompt_view="%{${path_color_seq}%}${path_prompt}%{${sgr_reset}%}"
endif endif
if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then
set dirs_prompt=`dirs -v | wc -l` set dir_list=`dirs`
set dirs_prompt="${#dir_list}"
if( ${dirs_prompt} > 1 ) then if( ${dirs_prompt} > 1 ) then
set dirs_prompt_view=" {%{${dirs_color_seq}%}${dirs_prompt}%{${sgr_reset}%}}" set dirs_prompt_view=" {%{${dirs_color_seq}%}${dirs_prompt}%{${sgr_reset}%}}"
endif endif