Compare commits

..
2 Commits
Author SHA1 Message Date
Fabian Ising 711da8058c [MAC] Update pi 2026-10-01 10:43:17 +02:00
Fabian Ising b0853dc5dd [ZSH] No safe wrappers in CODEX/CODE shells 2026-10-01 10:42:54 +02:00
2 changed files with 14 additions and 3 deletions

No files matched your search

+6
View File
@@ -75,6 +75,12 @@ function update_others {
echo "-- CODEX"
codex update
fi
if [ -x "$(command -v pi)" ]; then
echo "-- PI Agent"
pi update
pi update --extensions
fi
}
if [[ $* == *--help* ]]; then
+8 -3
View File
@@ -28,9 +28,14 @@ if (( $+commands[go] )); then
fi
# Use safe wrappers after ~/.local/bin has been added to PATH.
(( $+commands[safecp] )) && alias cp=safecp
(( $+commands[safemv] )) && alias mv=safemv
(( $+commands[safescp] )) && alias scp=safescp
# Agent shells: </dev/null makes the prompt decline (exit 1) instead of blocking.
if [[ -n ${CLAUDECODE:-} || -n ${CODEX_SHELL:-} ]]; then
_safe_redir=' </dev/null'
fi
(( $+commands[safecp] )) && alias cp="safecp${_safe_redir:-}"
(( $+commands[safemv] )) && alias mv="safemv${_safe_redir:-}"
(( $+commands[safescp] )) && alias scp="safescp${_safe_redir:-}"
unset _safe_redir
if [[ -f ~/.ssh/sudo_key ]]; then
[[ -e /tmp/sudo-agent.sock ]] || ssh-agent -a /tmp/sudo-agent.sock &>/dev/null