Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I mean when the cursor is on the left side of the words ,I would like to remove the words on the immediate right side of it . CTR+k remove everything on the right side, i only want one word to be removed.

share|improve this question

Many keyboards will work with Alt as Meta so you can press Alt-d.

share|improve this answer

In my bash shells, I hit ESC and 'd'.

share|improve this answer

Bash tends to use libreadline for commandline input, so you can create an inputrc file that lets you control what keystrokes do what. man readline 3 should explain the format, you can also find this in the READLINE section of bash's manpage (the specific command you want is kill-word)

zsh doesn't use libreadline apparently, but it seems they've mimicked a lot of the functionality. It looks like there are some options to mimic bash's word matching, but you'll need to bind them to a key.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.