Skip to content

Instantly share code, notes, and snippets.

@nilbus
Last active December 22, 2015 18:59
Show Gist options
  • Select an option

  • Save nilbus/d8de18e0aedf5c54058a to your computer and use it in GitHub Desktop.

Select an option

Save nilbus/d8de18e0aedf5c54058a to your computer and use it in GitHub Desktop.
Pause after running a command
#!/bin/bash
$* # Run the program passed in the args
EXIT=$? # Preserve the exit status
read -p "Press ENTER to exit."
exit $EXIT
  1. Create a file /usr/local/bin/pause_after_exit with the content of this script.

  2. Make the file executble:

     sudo chmod +x /usr/local/bin/pause_after_exit
    
  3. Test in your app directory.

     pause_after_exit rake routes
    
  4. Bind this command to a key in tmux.

@staycreativedesign

Copy link
Copy Markdown

nice~!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment