fix(dtach): wire resume menu into ~/.bashrc for non-login VS Code shells
VS Code Remote-SSH integrated terminals are non-login interactive shells: they source ~/.bashrc but never ~/.profile, where the resume menu was wired (login-scope, BDR-007). The auto-check therefore never fired in the user's actual environment, even after install.sh. Source dtach-router from bashrc-linux (every interactive shell) instead, and turn install.sh's wire_dtach_profile() into unwire_dtach_profile(): it now strips any stale ~/.profile block so a plain SSH login (which reads ~/.bashrc via ~/.profile) does not prompt twice. README updated to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CN1KSmsuLG6TxSeN5m8xvM
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4f03d87a86
commit
e37eb77ed5
+6
-1
@@ -117,5 +117,10 @@ PROMPT_COMMAND='set_prompt'
|
||||
dtach_claude() { dtach -c "$HOME/.dtach/${1:-claude-$(date +%H%M%S)}" -e '^\' claude; }
|
||||
alias cc='dtach_claude'
|
||||
|
||||
# Rappeler a la demande le menu de reprise (sinon il s'affiche seul au login SSH).
|
||||
# Rappeler a la demande le menu de reprise.
|
||||
alias d='source ~/.local/bin/dtach-router'
|
||||
|
||||
# Au demarrage d'un shell interactif, proposer de reprendre une session dtach existante
|
||||
# (silencieux si aucune). Place ici plutot que dans ~/.profile car les terminaux VS Code
|
||||
# Remote-SSH sont non-login et ne lisent pas ~/.profile ; ~/.bashrc, lui, est toujours lu.
|
||||
case $- in *i*) [ -x "$HOME/.local/bin/dtach-router" ] && . "$HOME/.local/bin/dtach-router" ;; esac
|
||||
|
||||
Reference in New Issue
Block a user