tmux-fingers icon indicating copy to clipboard operation
tmux-fingers copied to clipboard

fingers opens in different directory

Open ndsizeif opened this issue 1 month ago • 2 comments

Excellent project!

When tmux-fingers creates a new-window, the path can differ from the original pane. Fingers seems to be using #{session_path}. If there is a repository in the tmux session path, it can be a different repository than the pane current path, which may lead to momentary confusion.

issue

Adding the start directory flag -c #{pane_current_path} keeps the directories consistent. I just threw that escape character in front of the #, I don't know if that's the proper way to do it in the language.

# tmux.cr:163
  def create_window(name, cmd, _pane_width, _pane_height)
    #output = exec("new-window -P -d -n '#{name}' -F '#{WINDOW_FORMAT}' '#{cmd}'").chomp
    output = exec("new-window -c '\#{pane_current_path}' -P -d -n '#{name}' -F '#{WINDOW_FORMAT}' '#{cmd}'").chomp

ndsizeif avatar May 25 '24 19:05 ndsizeif