shell-cli: add flow control