Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using sesh and trigger from zsh it always make a strange file #217

Open
2 tasks done
chianyungcode opened this issue Jan 28, 2025 · 4 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@chianyungcode
Copy link

What happened?

Image

It always creates a strange file called command list-panes/ too many arguments (need at most 0) after triggering some text editor from inside the tmux session.

Reproduce Steps:

  1. Press <alt+s> from the zsh shell.
  2. When you are already in the tmux session, please press nvim . (for Neovim) or code . (for VSCode).
  3. The new file with the name command list-panes/ too many arguments (need at most 0) will be created automatically.

Version

2.9.0

Relevant log output

i don't know how to run this already tried sesh connect ~/code/project/src

Reviewed

  • Reviewed existing issues and made sure this bug has not already been submitted.
  • I have read the documentation and understand how sesh works before submitting this bug
@chianyungcode chianyungcode added the bug Something isn't working label Jan 28, 2025
@joshmedeski
Copy link
Owner

  1. Where does this file go?
  2. Can you share your tmux.conf file? I'm not sure yet if Sesh is the cause for this behavior

@chianyungcode
Copy link
Author

chianyungcode commented Feb 3, 2025


# === KEYBINDINGS ===
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix

# Changing keybind for splitting horizontal & vertical split view
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v

# Changing keybind for reload tmux configuration
bind r source-file ~/.dotfiles/tmux/tmux.conf \; display-message "Config reloaded"

# Set arrow to move between panes to hjkl because it's similar to vim navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key "T" run-shell "sesh connect \"$(
  sesh list --icons | fzf-tmux -p 80%,70% \
    --no-sort --ansi --border-label ' sesh ' --prompt '⚡  ' \
    --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
    --bind 'tab:down,btab:up' \
    --bind 'ctrl-a:change-prompt(⚡  )+reload(sesh list --icons)' \
    --bind 'ctrl-t:change-prompt(🪟  )+reload(sesh list -t --icons)' \
    --bind 'ctrl-g:change-prompt(⚙️  )+reload(sesh list -c --icons)' \
    --bind 'ctrl-x:change-prompt(📁  )+reload(sesh list -z --icons)' \
    --bind 'ctrl-f:change-prompt(🔎  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
    --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡  )+reload(sesh list --icons)' \
    --preview-window 'right:55%' \
    --preview 'sesh preview {}'
)\""

# === BASIC SETTINGS ===
set -g base-index 1 # Set base index for windows
set -g pane-base-index 1 # Set base index for panes
set -g mouse on # Enable mouse support
set -g default-terminal "xterm-256color" # Enable 24-bit color
# set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -g allow-rename off # Allow renaming of windows
set-option -g status-position top

# === PLUGINS ===
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @plugin 'omerxx/tmux-sessionx'
set -gq allow-passthrough on
# set -g @plugin 'kylepeeler/tmux-nightowl'


# -> Related to omerxx/tmux-sessionx <-
# I recommend using `o` if not already in use, for least key strokes when launching
set -g @sessionx-bind 'o'


# -> Related to 'olimorris/tmux-pomodoro-plus' <-
set -g @pomodoro_granularity 'on' # This will countdown in realtime
set -g status-interval 1                       # Refresh the status line every second

# Related to tmux-resurrect and tmux-continuum
# set -g @resurrect-processes 'lazygit'
# set -g @resurrect-processes-debug 'on' # Debugging resurrect 
# set -g @continuum-restore 'on' # Auto restore when starting tmux without pressing <prefix>+<C+r>


# == CATPUCCIN PLUGINS SETTINGS ==
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_window_status_style "rounded"
# So when renaming a window, the renamed window name appears in the window's tab bar. This only relates to catppuccin's behavior
set -g @catppuccin_window_default_text " #W"
set -g @catppuccin_window_current_text " #W"
set -g @catppuccin_window_text " #W"

# Load catppuccin
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# For TPM, instead use `run ~/.config/tmux/plugins/tmux/catppuccin.tmux`

# Make the status line pretty and add some modules
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#{E:@catppuccin_status_uptime}"
set -agF status-right "#{E:@catppuccin_status_battery}"
# set -agF status-right "#{E:@catppuccin_status_pomodoro_plus}" # To showing pomodoro timer

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

This is my tmux.conf

This file is appears, in your current working directory . For example if you on ~/Code/Projects/project-1 and you go with nvim and you quit the neovim, the strange file will appears.

@chianyungcode
Copy link
Author

@joshmedeski Does using the zsh shell affect this? Because zsh has a slow start-up time, I don't know if I should use another shell like fish.

@joshmedeski
Copy link
Owner

My main concern is tmux-continuum and tmux-resurrect. Can you disable all your tmux plugins and see if the same problem persists? My guess is a plugin is attempting to run a command on start and sesh isn't understanding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants