T05: fish search path, PowerShell policy and load failure, encoded OSC 7 paths, kept exit status, install read errors
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 9m9s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 12:39:47 -04:00
1 parent dfaf378418
commit c2da9dd667
6 files changed
+230 -110

No files matched your search

+11 -1
View File
@@ -13,6 +13,16 @@ else
[ -r ~/.bashrc ] && builtin source ~/.bashrc
fi
_ely_prompt() {
builtin printf '\e]7;file://%s\a\e]2;%s\a' "${PWD//\%/%25}" "${PWD##*/}"
builtin local ret=$? LC_ALL=C char url= i title
for (( i = 0; i < ${#PWD}; i++ )); do
char=${PWD:i:1}
case $char in
[[:cntrl:]]|%) builtin printf -v char '%%%02X' "'$char" ;;
esac
url+=$char
done
title=${PWD##*/}
builtin printf '\e]7;file://%s\a\e]2;%s\a' "$url" "${title//[[:cntrl:]]/}"
builtin return $ret
}
PROMPT_COMMAND="_ely_prompt${PROMPT_COMMAND:+;$PROMPT_COMMAND}"