1

I've written a script to handle quick copying of passwords to the clipboard:

#!/usr/bin/expect -f

spawn -noecho zsh
expect "$ "
send "pass show -c "
interact
exit

This script is launched like this:

urxvt -e /home/user/pass_script.sh

The script runs well, but after finishing, the spawned urxvt terminal needs to close. It doesn't do so as of now. How can I make sure it does?

1 Answers1

1

This works:

#!/usr/bin/expect -f
set timeout -1
spawn -noecho bash
expect "$ "
send "pass show -c " 
interact -nobuffer \r return
expect "Copied"
sleep 0.05