DELAPARRA
Index
Color
NL
Category: CLI flags

-i, --interactive (Interactive)

Explained by Updated

What is -i, --interactive (Interactive)?

-i, --interactive (Interactive): Prompt for confirmation before each step instead of acting automatically. Interactive mode makes a command ask before each step. rm -i asks before deleting every file. cp -i asks before overwriting. git add -i and git rebase -i open a menu or an editor where you choose what happens to each change or commit.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about -i, --interactive (Interactive)

How is -i, --interactive (Interactive) used in practice?

It is slower on purpose. When you are deleting a handful of files in a folder you do not know well, a prompt per file is a cheap safety net. Some systems alias rm to rm -i for exactly this reason.

What should you keep in mind with -i, --interactive (Interactive)?

In scripts and CI, interactive mode is a problem, because nobody is there to answer. A job that waits for input will hang until it times out. Scripts should either use non-interactive flags such as --yes or make the decision in code. Keep the prompts for the moments a person is at the keyboard.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.