feat(shell): add scrollback history capture on shell exit
- Add smart_exit function: captures Kitty scrollback to a timestamped log file on exit; --no-log/-n skips capture; auto-prunes oldest logs once count exceeds SCROLLBACK_HISTORY_MAX_FILES - Wire exit → smart_exit in config.fish for interactive sessions; export SCROLLBACK_HISTORY_DIR and SCROLLBACK_HISTORY_MAX_FILES with sane defaults (~/.terminal_history and 100 respectively) - Update cat to detect files in SCROLLBACK_HISTORY_DIR or containing raw ANSI escape sequences and pass them through command cat instead of bat, preserving color output - Remove redundant alias rm="rm -i" from tricks.fish (superseded by functions/rm.fish trash-aware wrapper) - Sync README: new Scrollback History integration section, smart_exit added to System functions table, cat description updated, stale rm Safety Wrapper entry and note removed
This commit is contained in:
@@ -96,7 +96,6 @@ alias egrep='egrep --color=auto'
|
||||
# Safety aliases (Confirmation before overwriting/deleting)
|
||||
alias cp="cp -i"
|
||||
alias mv="mv -i"
|
||||
alias rm="rm -i"
|
||||
|
||||
# Archives and networking short-hands
|
||||
alias tarnow='tar -acf '
|
||||
|
||||
Reference in New Issue
Block a user