Yeda AI Tips · #210

Español

Write Terminal Commands In Plain English

Nobody remembers every flag. You know exactly what you want the shell to do — list the images in a directory, rename a batch of files, find the biggest thing on disk — and then you lose four minutes to a search result that half-answers it. Cursor's terminal removes that detour: hit the inline-edit shortcut, type the request in ordinary English, and it writes the shell command in place. The part that matters most comes after: you read the command before you press enter.

What it actually does

Cursor's terminal has an inline-edit prompt — the same idea as inline edit in the editor, wired up to the shell instead of a file. Trigger it and you get a text box sitting on the command line. Type what you want in the language you'd use to explain it to a colleague, like "list all the images in the public directory", and Cursor replaces your sentence with a real command, ready to run.

In the source walkthrough this is exactly the flow: the request is typed as a plain sentence, the command appears, enter runs it, and the images in the public directory are listed. No syntax lookup, no flag hunting.

The shortcut itself is worth a note on precision. The walkthrough describes it only as "pressing control" — in Cursor and VS Code-family editors the inline-edit binding is conventionally Ctrl-K on Windows and Linux and Cmd-K on macOS, but the source doesn't spell the letter out, and keybindings drift between versions and custom keymaps. If the combination doesn't open a prompt for you, check your editor's keyboard shortcuts for the inline-edit / generate command action rather than assuming the feature is missing.

It tolerates typos

You do not have to type the request carefully. The source is explicit about this: a spelling mistake in the plain-English request still produced the right command. That sounds like a small thing, but it changes how the feature feels in practice — you can type at speed, mid-thought, without proofreading a sentence that is only ever going to be read by a model. The intent survives the typo.

This is also why it works well for the commands you use rarely. You don't need to remember whether the flag was -name or --name; you just need to be able to describe the outcome.

When it writes a command for the wrong shell

Generated commands are not shell-agnostic, and this is the failure mode you will actually hit. bash and zsh share most of their surface. PowerShell does not: different piping semantics, different command names, different quoting. A command that is perfectly correct for a Unix shell simply errors out in a Windows terminal.

That happened in the source walkthrough — the generated commands failed in Windows Terminal, and the commands had to be modified to work with PowerShell, after which they ran. The practical recipe:

  1. Run the command and let it fail — or, better, spot the mismatch before running it.
  2. Copy the error text.
  3. Reopen the inline prompt and paste the error back, or state the shell outright: "this is PowerShell, rewrite it."
  4. Read the new command and run it.

Telling it your shell up front is the cheaper version of the same loop. "In PowerShell, list every image in the public directory" avoids the round trip entirely.

Read the command before you run it

This is the non-negotiable part. A shell command is not a suggestion you can undo — it executes with your permissions, against your filesystem, immediately. Text generation is very good at producing something that looks right, and "looks right" and "does what I meant" are different properties. A generated rm with a slightly wrong glob, a mv that flattens a directory tree, a command that reaches past the folder you were thinking about — all of these are plausible-looking output.

The source makes the same point bluntly: you should understand what you are doing, and at the end of the day how much you know matters. Treat the generated command as a draft written by someone fast and confident who has never seen your machine. Specifically, before pressing enter:

If you can't tell what a command does, that's the signal to ask for an explanation — in the same prompt box — rather than to run it and find out.

Where this pays off

Building an AI feature? Yeda AI designs, audits, and ships production LLM systems.

Talk to us · Read the blog