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

fingers opens in different directory #120

Closed
ndsizeif opened this issue May 25, 2024 · 3 comments
Closed

fingers opens in different directory #120

ndsizeif opened this issue May 25, 2024 · 3 comments

Comments

@ndsizeif
Copy link

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
@Morantron
Copy link
Owner

Hey! 👋 what status bar variable are you using to display that path? I want to test the fix and make sure it works properly

@ndsizeif
Copy link
Author

#{pane_current_path}

@Morantron
Copy link
Owner

Fixed in 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants