Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/utils: Add an asynchronous cancellable way to discard input
A subsequent commit will use this to ensure that the user can still interact with the image download prompt while 'skopeo inspect' fetches the image size from the remote registry. Initially, the prompt will be shown without the image size. Once the size has been fetched, the older prompt will be cancelled and a new one will be shown that includes the size. While the prompt is getting updated, the terminal device will be put into non-canonical mode input and the echoing of input characters will be disabled to retain full control of the cursor position. Once the new prompt is in place, the previous state of the terminal will be restored. However, anything that was typed in the interim will be discarded to avoid surprising the user with invisible input. #752 #1263
- Loading branch information