mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-10-31 23:28:47 +00:00
Merge 838bb32853
into b699a7e01c
This commit is contained in:
commit
bf385f9371
@ -18,7 +18,6 @@ source "$HELPERS_DIR/tmux_utils.sh"
|
||||
display_plugin_update_list() {
|
||||
local plugins="$(tpm_plugins_list_helper)"
|
||||
tmux_echo "Installed plugins:"
|
||||
tmux_echo ""
|
||||
|
||||
for plugin in $plugins; do
|
||||
# displaying only installed plugins
|
||||
|
@ -34,8 +34,10 @@ clean_plugins() {
|
||||
}
|
||||
|
||||
main() {
|
||||
set_long_tmux_display_time
|
||||
ensure_tpm_path_exists
|
||||
clean_plugins
|
||||
tmux set-option -g display-time "$org_display_time" # Restore display-time
|
||||
exit_value_helper
|
||||
}
|
||||
main
|
||||
|
@ -4,6 +4,7 @@ _has_emacs_mode_keys() {
|
||||
|
||||
tmux_echo() {
|
||||
local message="$1"
|
||||
tmux display-message "$message"
|
||||
tmux run-shell "echo '$message'"
|
||||
}
|
||||
|
||||
@ -13,6 +14,7 @@ echo_ok() {
|
||||
|
||||
echo_err() {
|
||||
tmux_echo "$*"
|
||||
sleep 3 # Give some time for error message to be displayed in status bar
|
||||
}
|
||||
|
||||
end_message() {
|
||||
|
@ -15,3 +15,18 @@ exit_value_helper() {
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
set_long_tmux_display_time() {
|
||||
#
|
||||
# Since tmux display is used to indicate progress, save original
|
||||
# display-time and temporarily set it to 2 minutes.
|
||||
# New messages will overwrite previous, so this is not blocking anything.
|
||||
# It is just a random long time to ensure that the messages don't time-out.
|
||||
#
|
||||
# Use this to restore the original display-time before exiting:
|
||||
#
|
||||
# tmux set-option -g display-time "$org_display_time"
|
||||
#
|
||||
org_display_time="$(tmux show-options -g display-time | awk '{print $2}')"
|
||||
tmux set-option -g display-time 120000
|
||||
}
|
||||
|
@ -67,9 +67,11 @@ verify_tpm_path_permissions() {
|
||||
}
|
||||
|
||||
main() {
|
||||
set_long_tmux_display_time
|
||||
ensure_tpm_path_exists
|
||||
verify_tpm_path_permissions
|
||||
install_plugins
|
||||
tmux set-option -g display-time "$org_display_time" # Restore display-time
|
||||
exit_value_helper
|
||||
}
|
||||
main
|
||||
|
@ -34,7 +34,6 @@ update() {
|
||||
|
||||
update_all() {
|
||||
echo_ok "Updating all plugins!"
|
||||
echo_ok ""
|
||||
local plugins="$(tpm_plugins_list_helper)"
|
||||
for plugin in $plugins; do
|
||||
IFS='#' read -ra plugin <<< "$plugin"
|
||||
@ -62,12 +61,14 @@ update_plugins() {
|
||||
}
|
||||
|
||||
main() {
|
||||
set_long_tmux_display_time
|
||||
ensure_tpm_path_exists
|
||||
if [ "$1" == "all" ]; then
|
||||
update_all
|
||||
else
|
||||
update_plugins "$*"
|
||||
fi
|
||||
tmux set-option -g display-time "$org_display_time" # Restore display-time
|
||||
exit_value_helper
|
||||
}
|
||||
main "$*"
|
||||
|
Loading…
Reference in New Issue
Block a user