Skip to content

Commit 80e4125

Browse files
committed
codex
1 parent 5303368 commit 80e4125

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

‎dot_gitconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@
4646
[credential "https://gist.github.com"]
4747
helper =
4848
helper = !/opt/homebrew/bin/gh auth git-credential
49+
[url "https://github.com/"]
50+
insteadOf = git@github.com:

‎dot_zshrc‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@ if [[ -z "$ZPROFILE_SOURCED" ]]; then
33
source ~/.zprofile
44
fi
55

6+
function should_use_minimal_shell() {
7+
if [[ -n "$CODEX_HOME" || "$TERM_PROGRAM" == "Codex" ]]; then
8+
return 0
9+
fi
10+
11+
local pid="$PPID"
12+
local comm=''
13+
local args=''
14+
15+
while [[ -n "$pid" && "$pid" != "1" ]]; do
16+
comm="$(ps -o comm= -p "$pid" 2>/dev/null)"
17+
args="$(ps -o args= -p "$pid" 2>/dev/null)"
18+
19+
if [[ "$comm" == *"Codex.app"* ]] || [[ "$args" == *"/Applications/Codex.app/"* ]] || \
20+
[[ "$args" == *"Resources/codex"* ]] || [[ "$args" == *"Codex Helper"* ]]; then
21+
return 0
22+
fi
23+
24+
pid="$(ps -o ppid= -p "$pid" 2>/dev/null | tr -d ' ')"
25+
done
26+
27+
return 1
28+
}
29+
30+
if should_use_minimal_shell; then
31+
export START_TMUX=false
32+
PS1='%~ %# '
33+
return 0
34+
fi
35+
636
export LS_COLORS="$(vivid generate gruvbox-dark)"
737

838
export BAT_THEME="gruvbox-dark"

0 commit comments

Comments
 (0)