how to delete a whole word on the right in Linux Bash Shell command line [duplicate]












0
















This question already has an answer here:




  • On the bash command-line, how do you cut the word immediately after the cursor? [closed]

    1 answer




how to delete a whole word on the right in Linux Bash Shell command line



such as this:



CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left


I want to know a shortcut to delete a whole word on the right, no matter where the cursor in the word, it just like in vim opt is:



daw


and I want to the same result in bash command line.










share|improve this question















marked as duplicate by Benjamin W. bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 29 '18 at 7:00


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • Please take a look at: What should I do when someone answers my question?

    – Cyrus
    Dec 29 '18 at 8:43
















0
















This question already has an answer here:




  • On the bash command-line, how do you cut the word immediately after the cursor? [closed]

    1 answer




how to delete a whole word on the right in Linux Bash Shell command line



such as this:



CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left


I want to know a shortcut to delete a whole word on the right, no matter where the cursor in the word, it just like in vim opt is:



daw


and I want to the same result in bash command line.










share|improve this question















marked as duplicate by Benjamin W. bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 29 '18 at 7:00


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















  • Please take a look at: What should I do when someone answers my question?

    – Cyrus
    Dec 29 '18 at 8:43














0












0








0


2







This question already has an answer here:




  • On the bash command-line, how do you cut the word immediately after the cursor? [closed]

    1 answer




how to delete a whole word on the right in Linux Bash Shell command line



such as this:



CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left


I want to know a shortcut to delete a whole word on the right, no matter where the cursor in the word, it just like in vim opt is:



daw


and I want to the same result in bash command line.










share|improve this question

















This question already has an answer here:




  • On the bash command-line, how do you cut the word immediately after the cursor? [closed]

    1 answer




how to delete a whole word on the right in Linux Bash Shell command line



such as this:



CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left


I want to know a shortcut to delete a whole word on the right, no matter where the cursor in the word, it just like in vim opt is:



daw


and I want to the same result in bash command line.





This question already has an answer here:




  • On the bash command-line, how do you cut the word immediately after the cursor? [closed]

    1 answer








bash shortcut readline






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 13:50







VictorLee

















asked Dec 29 '18 at 6:22









VictorLeeVictorLee

235




235




marked as duplicate by Benjamin W. bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 29 '18 at 7:00


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Benjamin W. bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 29 '18 at 7:00


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Please take a look at: What should I do when someone answers my question?

    – Cyrus
    Dec 29 '18 at 8:43



















  • Please take a look at: What should I do when someone answers my question?

    – Cyrus
    Dec 29 '18 at 8:43

















Please take a look at: What should I do when someone answers my question?

– Cyrus
Dec 29 '18 at 8:43





Please take a look at: What should I do when someone answers my question?

– Cyrus
Dec 29 '18 at 8:43












2 Answers
2






active

oldest

votes


















1














Try: Esc+D or Alt+D to delete word on the right.






share|improve this answer


























  • This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

    – Cyrus
    Dec 29 '18 at 7:22



















0














You can try Ctrl + k to delete from cursor to end of the line (all left side of the cursor), and Ctrl + u to delete from cursor to start of the line (all right side of the cursor).



Also, I find this nice blog post covering a handful of bash shortcut, you may want to give it a read skorks.com






share|improve this answer



















  • 1





    These two are already listed in the question itself, and the question is about deleting just a single word.

    – Benjamin W.
    Dec 29 '18 at 6:56


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Try: Esc+D or Alt+D to delete word on the right.






share|improve this answer


























  • This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

    – Cyrus
    Dec 29 '18 at 7:22
















1














Try: Esc+D or Alt+D to delete word on the right.






share|improve this answer


























  • This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

    – Cyrus
    Dec 29 '18 at 7:22














1












1








1







Try: Esc+D or Alt+D to delete word on the right.






share|improve this answer















Try: Esc+D or Alt+D to delete word on the right.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 29 '18 at 10:15









double-beep

1,7032724




1,7032724










answered Dec 29 '18 at 6:38









tshionotshiono

2,022234




2,022234













  • This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

    – Cyrus
    Dec 29 '18 at 7:22



















  • This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

    – Cyrus
    Dec 29 '18 at 7:22

















This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

– Cyrus
Dec 29 '18 at 7:22





This moves the word to the right of the cursor into a ring buffer. The last added element can be accessed via Ctrl+y. The possibly existing further elements in the ring buffer can then be called up via repeated Esc+y.

– Cyrus
Dec 29 '18 at 7:22













0














You can try Ctrl + k to delete from cursor to end of the line (all left side of the cursor), and Ctrl + u to delete from cursor to start of the line (all right side of the cursor).



Also, I find this nice blog post covering a handful of bash shortcut, you may want to give it a read skorks.com






share|improve this answer



















  • 1





    These two are already listed in the question itself, and the question is about deleting just a single word.

    – Benjamin W.
    Dec 29 '18 at 6:56
















0














You can try Ctrl + k to delete from cursor to end of the line (all left side of the cursor), and Ctrl + u to delete from cursor to start of the line (all right side of the cursor).



Also, I find this nice blog post covering a handful of bash shortcut, you may want to give it a read skorks.com






share|improve this answer



















  • 1





    These two are already listed in the question itself, and the question is about deleting just a single word.

    – Benjamin W.
    Dec 29 '18 at 6:56














0












0








0







You can try Ctrl + k to delete from cursor to end of the line (all left side of the cursor), and Ctrl + u to delete from cursor to start of the line (all right side of the cursor).



Also, I find this nice blog post covering a handful of bash shortcut, you may want to give it a read skorks.com






share|improve this answer













You can try Ctrl + k to delete from cursor to end of the line (all left side of the cursor), and Ctrl + u to delete from cursor to start of the line (all right side of the cursor).



Also, I find this nice blog post covering a handful of bash shortcut, you may want to give it a read skorks.com







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 29 '18 at 6:53









Ahmad F. IksanAhmad F. Iksan

1




1








  • 1





    These two are already listed in the question itself, and the question is about deleting just a single word.

    – Benjamin W.
    Dec 29 '18 at 6:56














  • 1





    These two are already listed in the question itself, and the question is about deleting just a single word.

    – Benjamin W.
    Dec 29 '18 at 6:56








1




1





These two are already listed in the question itself, and the question is about deleting just a single word.

– Benjamin W.
Dec 29 '18 at 6:56





These two are already listed in the question itself, and the question is about deleting just a single word.

– Benjamin W.
Dec 29 '18 at 6:56



Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas