fix(c5): use fish-valid variable concatenation in tmux log filename

Fish does not support bash-style ${var} brace syntax. Build the
log file path in a dedicated variable using quote-splicing instead.
This commit is contained in:
2026-06-16 00:55:53 -04:00
parent 764f2253f6
commit 2e1750b5a4
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ set -q TMUX; or exit
set -l log_dir (set -q SCROLLBACK_HISTORY_DIR; and echo $SCROLLBACK_HISTORY_DIR; or echo "$HOME/.terminal_history")
set -l pane_id (tmux display-message -p '#{session_name}-w#{window_index}-p#{pane_index}' 2>/dev/null)
set -l timestamp (date "+%Y-%m-%d_%H-%M-%S")
set -l log_file "$log_dir/tmux_"$pane_id"_"$timestamp".log"
mkdir -p $log_dir
tmux pipe-pane "cat >> $log_dir/tmux_${pane_id}_${timestamp}.log" 2>/dev/null
tmux pipe-pane "cat >> $log_file" 2>/dev/null
+2 -1
View File
@@ -38,8 +38,9 @@ function __fish_config_sync_logging --description 'Sync C5 logging state: sentin
set -l log_dir (set -q SCROLLBACK_HISTORY_DIR; and echo $SCROLLBACK_HISTORY_DIR; or echo "$HOME/.terminal_history")
set -l pane_id (tmux display-message -p '#{session_name}-w#{window_index}-p#{pane_index}' 2>/dev/null)
set -l timestamp (date "+%Y-%m-%d_%H-%M-%S")
set -l log_file "$log_dir/tmux_"$pane_id"_"$timestamp".log"
mkdir -p $log_dir
tmux pipe-pane "cat >> $log_dir/tmux_${pane_id}_${timestamp}.log" 2>/dev/null
tmux pipe-pane "cat >> $log_file" 2>/dev/null
end
if test -x /usr/bin/paru