Reputation: 14018
Consider the following hardcoded value of default-shell
:
set -g default-shell /usr/local/bin/bash
Does Tmux support any form of command substitution for settings options, e.g.:
set -g default-shell "$(which bash)"
?
I've considered both if-shell
and run-shell
, but neither suit the purpose of something like command substituion.
Upvotes: 2
Views: 527
Reputation:
You can use run-shell
, for example:
run 'tmux set -g default-shell "$(which bash)"'
Or for default-shell
you could possibly use SHELL
. In .tmux.conf
you can use $SHELL
, or use a format like set -gF default-shell "#{SHELL}"
.
Upvotes: 1