Describe the bug
When using the -i flag, it creates every window in a session twice.
Smug config
Example session file with five windows:
session: dotfiles
root: ~/.dotfiles
windows:
- name: info
root: ~
commands:
- fastfetch
- name: processes
root: .
commands:
- btm
- name: nvim/tmux
root: nvim/.config/nvim
layout: main-horizontal
commands:
- nvim .
panes:
- type: horizontal
root: /Users/phausken/.dotfiles/tmux
commands:
- nvim .
- name: wezterm/zsh
layout: main-horizontal
root: wezterm/.config/wezterm
commands:
- nvim .
panes:
- type: horizontal
root: /Users/phausken/.dotfiles/zsh
commands:
- nvim .
- name: aerospace/sketchybar
layout: main-horizontal
root: aerospace/.config/aerospace
commands:
- nvim .
panes:
- type: horizontal
root: /Users/phausken/.dotfiles/sketchybar/.config/sketchybar
commands:
- nvim .
Expected behavior
Expect smug start dotfiles -i to add four windows to current session. Instead, it adds ten -- two for each window in the session config. This behavior is consistent across all session config files. Was previously working, so this is a regression.
Output of cat ~/.config/smug/smug.log
tmux display-message -p #S
tmux has-session -t 0:
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles -F #{window_id} -n info
tmux send-keys -t @1 fastfetch Enter
tmux select-layout -t @1 even-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles -F #{window_id} -n processes
tmux send-keys -t @2 btm Enter
tmux select-layout -t @2 even-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/nvim/.config/nvim -F #{window_id} -n nvim/tmux
tmux send-keys -t @3 nvim . Enter
tmux split-window -Pd -h -t @3 -c /Users/phausken/.dotfiles/tmux -F #{pane_id}
tmux select-layout -t @3 tiled
tmux send-keys -t @3.%4 nvim . Enter
tmux select-layout -t @3 main-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/wezterm/.config/wezterm -F #{window_id} -n wezterm/zsh
tmux send-keys -t @4 nvim . Enter
tmux split-window -Pd -h -t @4 -c /Users/phausken/.dotfiles/zsh -F #{pane_id}
tmux select-layout -t @4 tiled
tmux send-keys -t @4.%6 nvim . Enter
tmux select-layout -t @4 main-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/aerospace/.config/aerospace -F #{window_id} -n aerospace/sketchybar
tmux send-keys -t @5 nvim . Enter
tmux split-window -Pd -h -t @5 -c /Users/phausken/.dotfiles/sketchybar/.config/sketchybar -F #{pane_id}
tmux select-layout -t @5 tiled
tmux send-keys -t @5.%8 nvim . Enter
tmux select-layout -t @5 main-horizontal
tmux display-message -p #S
tmux has-session -t 0:
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles -F #{window_id} -n info
tmux send-keys -t @6 fastfetch Enter
tmux select-layout -t @6 even-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles -F #{window_id} -n processes
tmux send-keys -t @7 btm Enter
tmux select-layout -t @7 even-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/nvim/.config/nvim -F #{window_id} -n nvim/tmux
tmux send-keys -t @8 nvim . Enter
tmux split-window -Pd -h -t @8 -c /Users/phausken/.dotfiles/tmux -F #{pane_id}
tmux select-layout -t @8 tiled
tmux send-keys -t @8.%12 nvim . Enter
tmux select-layout -t @8 main-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/wezterm/.config/wezterm -F #{window_id} -n wezterm/zsh
tmux send-keys -t @9 nvim . Enter
tmux split-window -Pd -h -t @9 -c /Users/phausken/.dotfiles/zsh -F #{pane_id}
tmux select-layout -t @9 tiled
tmux send-keys -t @9.%14 nvim . Enter
tmux select-layout -t @9 main-horizontal
tmux neww -Pd -t 0: -c /Users/phausken/.dotfiles/aerospace/.config/aerospace -F #{window_id} -n aerospace/sketchybar
tmux send-keys -t @10 nvim . Enter
tmux split-window -Pd -h -t @10 -c /Users/phausken/.dotfiles/sketchybar/.config/sketchybar -F #{pane_id}
tmux select-layout -t @10 tiled
tmux send-keys -t @10.%16 nvim . Enter
tmux select-layout -t @10 main-horizontal
Smug version
0.3.6
Switching back to 0.3.5 fixes the issue.
OS you're using
Mac OSX Sequoia 15.1.1
Initially installed via homebrew, but uninstalling and re-installing with go install did not fix issue.
Describe the bug
When using the
-iflag, it creates every window in a session twice.Smug config
Example session file with five windows:
Expected behavior
Expect
smug start dotfiles -ito add four windows to current session. Instead, it adds ten -- two for each window in the session config. This behavior is consistent across all session config files. Was previously working, so this is a regression.Output of
cat ~/.config/smug/smug.logSmug version
0.3.6
Switching back to 0.3.5 fixes the issue.
OS you're using
Mac OSX Sequoia 15.1.1
Initially installed via homebrew, but uninstalling and re-installing with
go installdid not fix issue.