EndPointCorp / end-point-blog

End Point Dev blog
https://www.endpointdev.com/blog/
17 stars 65 forks source link

Comments for Update Your (Gnu) Screen Config on the Fly #734

Open phinjensen opened 6 years ago

phinjensen commented 6 years ago

Comments for https://www.endpointdev.com/blog/2012/12/update-your-gnu-screen-config-on-fly/ By Greg Davidson

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
phinjensen commented 6 years ago
original author: Jon Jensen
date: 2012-12-15T02:27:37-05:00

I'll have to remember the ability to source configs in all windows!

One correction: In tmux the default-path if not otherwise configured comes from the current working directory of the window you're in when you spawn a new window! When you first start it that seems the same as screen but as you cd around your filesystem and open new windows you can see the difference. (This assumes your OS, tmux package, or something else didn't change the default.)

From the tmux man page section on default-path:

If empty (the default), the working directory is determined from the process running in the active pane, from the command line environment or from the working directory where the session was created. If path is "$HOME" or "~", the value of the HOME environment variable is used. If path is ".", the working directory when tmux was started is used.

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2012-12-15T02:49:05-05:00

Thanks Jon, that's good to note. It could be my terminal emulator (iTerm2) but new windows and panes open in the directory tmux was started in. Unless I use :set-option default-path /some/path to change that.

phinjensen commented 6 years ago
original author: Jon Jensen
date: 2012-12-15T02:54:42-05:00

Are you sure? What version of tmux? (Try tmux -V.) I'm running 1.6. Is anything about default-path shown when you run:

:show-options -s

Based on my experience and the docs for version 1.6, you should be able to open tmux, cd /tmp, then ^B c to start a new window and find it's started in /tmp. Does that not work for you?

I don't want to belabor the point, but it'd be nice to get to the bottom of any differences out there!

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2012-12-15T03:06:29-05:00

I have tmux 1.6 and there is nothing about the default-path when I view :show-options -s. I cd'ed into /tmp and from there created a window and a pane. Both were using the directory I started tmux in (not /tmp)!

Not sure why but that's been my experience.

phinjensen commented 6 years ago
original author: Jon Jensen
date: 2012-12-15T13:52:10-05:00

Greg, does your tmux manpage not spell out the functionality like mine? "If empty (the default), the working directory is determined from the process running in the active pane" is pretty clear, and yours is not behaving that way, so if it's documented that way it seems like a bug or undocumented patch in the Mac OS X build of tmux.

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2012-12-17T00:29:29-05:00

Jon, I upgraded to tmux 1.7 today and it behaves the way you and the manpage describe.

phinjensen commented 6 years ago
original author: Jon Jensen
date: 2012-12-17T12:34:00-05:00

Strange, but good to hear at least that new version is consistent with the docs!