All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.
# run command in the foreground
command
# run commend in the background
| #!/bin/sh | |
| # Redirect output to stderr. | |
| exec 1>&2 | |
| # enable user input | |
| exec < /dev/tty | |
| consoleregexp='console.log' | |
| # CHECK | |
| if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
| then |