mirror of
https://github.com/tmux-plugins/tpm.git
synced 2026-11-01 16:20:18 +00:00
67 lines
890 B
Plaintext
67 lines
890 B
Plaintext
#!/usr/bin/env expect
|
|||
|
|
|
||
|
|
# disables script output
|
||
|
|
log_user 0
|
||
|
|
|
||
|
|
spawn tmux
|
||
|
|
|
||
|
|
# Waiting for tmux to attach. If this is not done, next command, `send` will
|
||
|
|
# not work properly.
|
||
|
|
sleep 1
|
||
|
|
|
||
|
|
# this is tmux prefix + U
|
||
|
|
send "U"
|
||
|
|
|
||
|
|
set timeout 5
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"Installed plugins" {
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"\"tmux-example-plugin\"" {
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"\"all\" - updates all plugins" {
|
||
|
|
|
||
|
|
expect { "ENTER - cancels" }
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
timeout {
|
||
|
|
puts "Plugin update prompt timeout";
|
||
|
|
exit 1
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
send "all\r"
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"Updating all plugins!" {
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"Updating \"tmux-example-plugin\"" {
|
||
|
|
|
||
|
|
expect {
|
||
|
|
"\"tmux-example-plugin\" update success" {
|
||
|
|
|
||
|
|
expect { "Done, press ENTER to continue." { exit 0 } }
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
timeout {
|
||
|
|
puts "Update all plugins timeout";
|
||
|
|
exit 1
|
||
|
|
}
|
||
|
|
}
|