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

Panel splitting no longer retains the current directory #522

Closed
aofei opened this issue Oct 6, 2021 · 7 comments
Closed

Panel splitting no longer retains the current directory #522

aofei opened this issue Oct 6, 2021 · 7 comments
Labels

Comments

@aofei
Copy link

aofei commented Oct 6, 2021

My setup

$ uname -a
Linux as-server 5.14.9-arch2-1 #1 SMP PREEMPT Fri, 01 Oct 2021 19:03:20 +0000 x86_64 GNU/Linux

$ tmux -V
tmux 3.2a

$ cd ~/.tmux && git --no-pager log -n 1 --pretty=oneline
f8a5a0886808f7dcef96a87103f726d213d8e237 (HEAD -> master, origin/master, origin/HEAD) worked around Falcon.app agent slowing everything down, fixes #492

The problem

Usually I'm used to splitting multiple panels under the same window for different purposes. Many of them are created temporarily, like for different testing tasks. No matter what I created them for, they belong to the same project directory. But my daily dev workflow ran into problems after updating gpakosz/.tmux. The reason is that whenever I split a new panel, the directory of the new panel will be switched to the home directory, which is definitely not what I expected.

I just checked the latest .tmux.conf.local and didn't find any related configuration items. So, how can I configure it to return to the previous behavior? Looking forward to your help. Thanks! ❤️

@gpakosz
Copy link
Owner

gpakosz commented Oct 6, 2021

Hello @aofei 👋

The setting you're looking for in your ~/.tmux.conf.local copy is tmux_conf_new_pane_retain_current_path

@aofei
Copy link
Author

aofei commented Oct 6, 2021

Ah... can't believe I missed it. 🤦‍♂️

However, my config is:

tmux_conf_new_pane_retain_current_path=true

and it doesn't retain the current path. So it seems that this is a bug?

@aofei
Copy link
Author

aofei commented Oct 6, 2021

BTW, setting tmux_conf_new_window_retain_current_path to true also doesn't work for creating new windows.

@gpakosz
Copy link
Owner

gpakosz commented Oct 6, 2021

Can you please paste the output of $ tmux lsk?

@gpakosz
Copy link
Owner

gpakosz commented Oct 6, 2021

Right the latest commit broke it. Please use commit df46ab2ba97d7022cfe15d16a59baf3156b299b8 in the meantime

@gpakosz gpakosz added bug and removed tmux support labels Oct 6, 2021
@gpakosz
Copy link
Owner

gpakosz commented Oct 6, 2021

Or help me test the gh-522 branch 😉

@aofei
Copy link
Author

aofei commented Oct 6, 2021

The gh-522 works. Thanks for the quick fix!

@gpakosz gpakosz closed this as completed in a976b17 Oct 6, 2021
ulken94 added a commit to ulken94/.tmux that referenced this issue Oct 28, 2021
* improved status line rendering, fixes gpakosz#419 (2)

- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell

* added support for #{hostname_full} and #{hostname_full_ssh}, closes gpakosz#361

* fixed use of invalid 'print' command

* improved status line rendering, fixes gpakosz#419 (3)

fixed spacers

* fixed indentation in _apply_overrides()

* mention 'reattach-no-usernamespace' is not needed for tmux > 2.6

* added support for tpm, resolves gpakosz#61

* fixed BusyBox's tr command compatibility, fixes gpakosz#441

* fixed variable replacement in tmux_conf_theme_status_right and tmux_conf_theme_status_left, fixes gpakosz#356

* fix left status prefix rendering

* fixed variable replacement in tmux_conf_theme_status_right and tmux_conf_theme_status_left (2), fixes gpakosz#442

* fixed #{online} custom variable implementation as ping -t is not portable, fixes gpakosz#451

* remind people to not "uncomment" local functions in .tmux.conf.local

* fixed copy to os clipboard on macOS when xclip or xsel is installed, fixes gpakosz#459

* worked around broken /sys/class/power_supply/<supply_name>/capacity > 100, resolves gpakosz#460

* made version detection more robust in case tmux executable is renamed (2), fixes gpakosz#457

* made version detection more robust in case tmux executable is renamed (3), fixes gpakosz#462

fixed a regression introduced by commit 8aefa1e that breaks
version detection for tmux HEAD for which 'tmux -V' prints e.g. tmux next-3.3

* made _apply_bindings() work with tmux 3.2 stock bindings, fixes gpakosz#472

* replaced printf '\n' calls by echo calls, fixes gpakosz#479

TPM plugins further editing status-left or status-right may alter the content
in such a way that the line feed character becomes a space

* use single quotes for strings containing Unicode escapes, fixes gpakosz#486

* mitigate tmux displaying its "<... not ready>" message, closes gpakosz#496

the "flickering" perceived when the "<... not ready>" message is long won't be
totally eliminated until tmux 3.3 though (commit 38c5788232e0e3abdd08ade55a9d4fbcda637df1)

* revert "mitigate tmux displaying its "<... not ready>" message, closes gpakosz#496"

this reverts commit 67b1d38.

the proposed mitigation causes flickering for some, see followups in gpakosz#496

* check connectivity to github.com before installing and/or updating tpm and plugins, fixes gpakosz#513

* fixed _battery_info() when pmset doesn't report a charge percentage, fixes gpakosz#512

* updated tpm integration

- automatically delete tpm when not used
- automatically delete unused plugins
- install plugins when subsequently enabling then in ~/.tmux.conf.local
- use <prefix> + u to update plugins as <prefix> + U is bound to Urlview, fixes gpakosz#507

* fixed tpm plugins not installing on CentOS 7, fixes gpakosz#520

- drop git clone --shallow-submodules as it requires git >= 2.9.0
- display a message when one of the tpm script fails

* worked around Falcon.app agent slowing everything down, fixes gpakosz#492

it appears the Falcon anti-malware product for end-points slows down ps -t /dev/ttysXXX
commands 🤷

the workaround consists in passing ttysXXX instead of /dev/ttysXXX and is achieved
by removing the /dev/ prefix in #{pane_tty} expansion with the help of formats
substitutions

* worked around Falcon.app agent slowing everything down (2), fixes gpakosz#522

* reworked pane / tty introspection, fixes gpakosz#403, fixes gpakosz#458

- renamed _tty_info() to _pane_info()
- pass both #{pane_pid} and #{pane_tty} to _pane_info()
- when inspecting ps output, walk down from #{pane_pid} to the child-most pid

* made background sleep process exit immediately when exiting tmux, fixes gpakosz#509

* set default-terminal to tmux-256color when available, fixes gpakosz#205, fixes gpakosz#382, closes gpakosz#386

see https://github.com/tmux/tmux/wiki/FAQ#i-dont-see-italics-or-italics-and-reverse-are-the-wrong-way-round

* check connectivity to github.com before installing and/or updating tpm and plugins (2)

Co-authored-by: Gregory Pakosz <gregory.pakosz@gmail.com>
Co-authored-by: Frederick Zhang <frederick888@tsundere.moe>
Co-authored-by: Neil Mahoney <neiljosephmahoney@gmail.com>
Co-authored-by: Haneol Kim <hekim@jmarple.ai>
tunght13488 added a commit to tunght13488/.tmux that referenced this issue Nov 17, 2021
* upstream/master: (46 commits)
  updated _username() in when the ssh client doesn't support %r in ProxyCommand
  updated _ssh_or_mosh_args()
  improved _pane_info() accuracy by excluding ssh proxy connections, tee, and only considering the first child of a process
  updated tpm integration to display a message when one or more plugin(s) fails to run, closes gpakosz#533
  made background sleep process exit immediately when exiting tmux (2)
  worked around Falcon.app agent slowing everything down (3)
  do not unset @tpm-install, @tpm-update, @tpm-clean and @plugin variables after tpm has launched, fixes gpakosz#531
  reworked pane / tty introspection (3)
  added word boundaries when replacing uptime_xxx variables (2)
  reworked pane / tty introspection (2)
  added support for arguments to custom variables defined in ~/.tmux.conf.local
  added word boundaries when replacing uptime_xxx variables
  check connectivity to github.com before installing and/or updating tpm and plugins (2)
  set default-terminal to tmux-256color when available, fixes gpakosz#205, fixes gpakosz#382, closes gpakosz#386
  made background sleep process exit immediately when exiting tmux, fixes gpakosz#509
  reworked pane / tty introspection, fixes gpakosz#403, fixes gpakosz#458
  worked around Falcon.app agent slowing everything down (2), fixes gpakosz#522
  worked around Falcon.app agent slowing everything down, fixes gpakosz#492
  fixed tpm plugins not installing on CentOS 7, fixes gpakosz#520
  updated tpm integration
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants