Shell tab-completion and other helpful command-line tricks
Paul Rumelhart
godshatter at yahoo.com
Fri Jan 30 06:30:06 UTC 2009
Jonas Norlander wrote:
> 2009/1/23 Paul Rumelhart <godshatter at yahoo.com>:
>
>> I hope you find this helpful, and if you know of any cute tab-completion
>> tricks please let us know. If you use the command-line a lot, you'll
>> find that pressing the tab key becomes instinctive and you'll really
>> miss it when you are in a program that doesn't use it.
>>
>> Paul
>>
>>
>
> One thing i use all the time with bash is the command history and the
> readline shortcuts. So here is some of my most used shortcuts.
> Arrow up or CTRL+P will fetch the previous command from the history.
> Arrow down or CTRL+N will fetch the next command from the history.
> CTRL+R will reverse search history for what ever you enter. Greate for
> fetching that complicated command you wrote some days ago but dont
> remember.
> CTRL+A move to beginning of line.
> CTRL+E move to end of line.
> ALT+F move forward a word.
> ALT+B move back a word.
> CTRL+L clear screen.
> CTRL+k remove the text from the cursor to the end of the line.
> CTRL+X BACKSPACE remove text from the cursor to the beginning of the line.
> ALT+D delete a word forward.
> ALT+BACKSPACE delete a word backwards.
>
> And there is more shortcuts in the readline library like copy and
> paste that could help a lot when working in the shell.
>
> / Jonas
>
>
I didn't know about most of those. I'd used arrow up and down before,
but not the others. Thank you.
Paul
More information about the kubuntu-users
mailing list