LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-28-2010, 06:20 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Rep: Reputation: 46
Erasing from home up to first blank as I type at the prompt.


GNU bash 3.1.17

Hi:
I say there must be, in bash, a keystroke combination that does this: I type say, two words at the prompt. Then I press HOME. And now, holding down some control key, I press a key that erases from current cursor position up to the first blank (the space between the two words). If I am right, which is the key combination? You could as well refer me to the bash manual section where the different combinations, one of them a control key are listed. Thanks in advance.
 
Old 11-28-2010, 06:53 AM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,455

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
It depends on what you think a word is. M-d (ALT+d or ESC d) will do kill-word but a word is defined as a sequence of [a-zA-Z_] so (! represents the cursor)
Code:
$ !command-one command-two
# press M-d, now you have
$ !-one command-two
There isn't a forwards equivalent to C-w (unix-word-rubout).
See Commands for Killing.
 
1 members found this post helpful.
Old 11-28-2010, 07:31 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Yours has been a most useful post to me. I see what you meant by "my definition":
Code:
aaa bbbbbbbbb     two M-d to erase all
aaa/bbbbbb        two M-d to erase all
To bash, <space> and '/' both of them are separators, I see. Thanks a lot.
 
  


Reply

Tags
blank, delete, keystroke_combination, prompt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub command prompt during install - what do I have to type? snowweb Linux - Newbie 1 09-08-2009 02:24 PM
Unable to type password at terminal prompt.. bilko9070 Linux - Software 5 05-06-2009 11:52 AM
no command prompt, just blank screen installing slack 12 richcricketz Slackware - Installation 3 12-17-2007 02:58 PM
Boot CD is not working. I got a blank screen after prompt. BEYAZITTOSUN Linux - Laptop and Netbook 2 02-18-2005 03:37 AM
Getting to Lilo prompt to type commands Old Hat Linux Linux - Newbie 1 02-11-2004 05:17 AM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration