Rather then maintain a separate script like "tspace", it seems cleaner to me to add this directly to your .tmux.conf via a bind-key assignment to run-shell. For the (second part of) the "tspace" script you can use:
bind-key S run-shell "tmux rename-session $(basename $(pwd))
Rather then maintain a separate script like "tspace", it seems cleaner to me to add this directly to your .tmux.conf via a bind-key assignment to run-shell. For the (second part of) the "tspace" script you can use:
bind-key S run-shell "tmux rename-session $(basename $(pwd))