mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-24 00:48:46 +00:00
Bugfix: tmux quits if 'reattach-to-user-namespace' is not installed
Fixes #9
This commit is contained in:
parent
9beab4784c
commit
c908b42f2b
@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
### master
|
### master
|
||||||
|
- bugfix: prevent exiting tmux if 'reattach-to-user-namespace' is not installed
|
||||||
|
|
||||||
### v1.1.0, 2014-08-30
|
### v1.1.0, 2014-08-30
|
||||||
- bugfix: determine the default shell from the $SHELL env var on OS X
|
- bugfix: determine the default shell from the $SHELL env var on OS X
|
||||||
|
@ -7,6 +7,11 @@ is_osx() {
|
|||||||
[ "$platform" == "Darwin" ]
|
[ "$platform" == "Darwin" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command_exists() {
|
||||||
|
local command="$1"
|
||||||
|
type "$command" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
# returns prefix key, e.g. 'C-a'
|
# returns prefix key, e.g. 'C-a'
|
||||||
prefix() {
|
prefix() {
|
||||||
tmux show-option -gv prefix
|
tmux show-option -gv prefix
|
||||||
@ -82,7 +87,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# required (only) on OS X
|
# required (only) on OS X
|
||||||
if is_osx && option_value_not_changed "default-command" ""; then
|
if is_osx && command_exists "reattach-to-user-namespace" && option_value_not_changed "default-command" ""; then
|
||||||
tmux set-option -g default-command "reattach-to-user-namespace -l $SHELL"
|
tmux set-option -g default-command "reattach-to-user-namespace -l $SHELL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user