omerxx / tmux-sessionx

A Tmux session manager, with preview, fuzzy finding, and MORE
GNU General Public License v3.0
718 stars 63 forks source link

New session not working #11

Closed rgruyters closed 9 months ago

rgruyters commented 9 months ago

I have just updated the tmux-sessionx and noticed the preview window is now horizontally, which I prefer. (nice update) I see it is possible to create a new session with , unfortunately nothing happens when using .

I can create a new session by just typing in a new in the search/command bar, but it remembers the reference path of the last session, not the path where it was located at.

For example, I have a session called "chezmoi" for editing my dotfiles. This session is always pointed to ~/.local/share/chezmoi path. When I (e.g.) go to ~/.config/nvim folder to edit my nvim config. I do a \<prefix>+O, to open the sessionx manager and type "nvim" for my new session. A new session is created, but it points to ~/.local/share/chezmoi folder. And lost referenced to the nvim folder.

omerxx commented 9 months ago

Got it. I see two options here,

  1. Add an option to have the search expand to fd local directories. Maybe prefix+f or something like that.
  2. Check whether the inserted name is a valid directory either locally or an absolute path. (A plugin I was inspired by is using Zoxide for that which is ingenious but doesn't fit my workflow so I didn't bother)

What do you think?

rgruyters commented 9 months ago

Option 1 looks like something I'm looking for. Thanks.

omerxx commented 9 months ago

@rgruyters While option (1) is definitely something I'm going to implement, I just wanted to let you know that I've added set -g @sessionx-zoxide-mode 'on' so if you happen to use Zoxide (or would like to start now 😄 ) you should be able to freely type parts of your desired path and your new session will start there with Zoxide's zupport.

omerxx commented 9 months ago

@rgruyters Added C-e to expand local dir with options for additional sessions. LMK if this addresses the issue. Feel free to reopen

rgruyters commented 9 months ago

Oeh, that is a nice addition to the plugin. Great job! 👍🏻