Skip to content

Instantly share code, notes, and snippets.

@devinschumacher
Last active October 9, 2024 18:27
Show Gist options
  • Select an option

  • Save devinschumacher/a240db1dd3d5515a72ea737e59e69e41 to your computer and use it in GitHub Desktop.

Select an option

Save devinschumacher/a240db1dd3d5515a72ea737e59e69e41 to your computer and use it in GitHub Desktop.
How to Print (keep / retain) Interactive CLI Prompt Information in Your Terminal
title tags
How to Print (keep / retain) Interactive CLI Prompt Information in Your Terminal
linux
cli
less

How to Print (keep / retain) Interactive CLI Prompt Information in Your Terminal

Let's say there are commands that you need to run that bring up interactive prompts and if you're like me, you forget what you were looking at within three seconds of it disappearing.

Clicking on the "Leave Group" button will present you with a series of prompts. Speed through them like this:

For example, you run a gh issue list to see a list of the issues that you could work on:

gh issue list

You will be presented with a temporary interactive prompt that looks something like this

Screenshot 2024-10-09 at 11 25 29

And disappears as soon as you (END) it.

The solution? Use | less -F

gh issue list | less -F

Now the information is printed out to your terminal!

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