Alt+d should delete word after cursor

Resolved 💬 11 comments Opened Oct 9, 2025 by verhovsky Closed Feb 22, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Alt+d should delete until the end of the current word. For example if ^ is the cursor, pressing it on this line

first second third
      ^

results in this:

first  third
      ^

Additional information

This is a standard readline shortcut supported everywhere else in the terminal, documented as "M-d" here:

https://www.gnu.org/software/bash/manual/html_node/Readline-Killing-Commands.html

View original on GitHub ↗

11 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #3640
  • #5017

Powered by Codex Action

etraut-openai contributor · 8 months ago

Closing in favor of #2387

verhovsky · 8 months ago

@etraut-openai that issue is unrelated. Alt-d should work in the normal, current editing mode. It works in every other command line tool, you can try it in your terminal right now, in the regular command prompt. It's because you decided to re-implement readline and forgot to re-implement one of the shortcuts.

sxlijin · 5 months ago

@etraut-openai sorry about filing #9577 without checking on this issue first! I assumed that since this was a pretty simple FR and already open, it would be straightforward to just put up a PR for it.

Since it seems that I was wrong, can I ask what codex team's decision on this FR is, or what blockers there are around making a decision?

To be clear, as a user, I actually find this to be a major usability issue for codex.

etraut-openai contributor · 5 months ago

@sxlijin, we generally prioritize features based on upvotes. This feature hasn't received many upvotes yet. We're focused on higher-priority work.

sxlijin · 5 months ago

I guess here's the part I'm confused by: it would make sense to me to reject #9577 (implementing M-d) if it would cause a conflict with some other (hypothetical) feature request. But that's not the case, it's just simply because there aren't enough other people who think of this as an issue?

I appreciate the quick responses, but... when I tell my coworkers I want to use codex, and they shrug me off, this is the kind of issue that makes it hard for me to justify using it.

nehresma · 5 months ago

100% agree here. Long time users of standard linux terminals and cli tools do expect this sort of thing. It's not just Alt+d, but other libreadline commands (Alt+a, Alt+e, etc). FWIW, it's a severe pain point for me and seems like something that could be added to make things smoother for users.

verhovsky · 5 months ago

I don't understand why you need to wait for this issue to get enough thumbs up until someone asks codex to implement it. If you make a command line application it should support all movement keys of the command line.

mpolden · 5 months ago

M-D should just work when editing text in the terminal. It works everywhere else, including Claude Code.

dougEfresh contributor · 4 months ago

open pr at #12455 ... upvote!

etraut-openai contributor · 4 months ago

Thanks @dougEfresh. This will be included in the next release.