LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to define TAB key at terminal... (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-define-tab-key-at-terminal-818416/)

DoME69 07-07-2010 12:14 AM

How to define TAB key at terminal...
 
Hi...


I want to define TAB key at terminal.
When i press TAB key i want all files shows like "ls -ltrh -color"
how can i do it?

Thanks.

sem007 07-07-2010 02:15 AM

Quote:

Originally Posted by DoME69 (Post 4025828)
Hi...


I want to define TAB key at terminal.
When i press TAB key i want all files shows like "ls -ltrh -color"
how can i do it?

Thanks.

Same question here.
how can i trap TAB key ???

DoME69 07-07-2010 05:15 AM

Quote:

Originally Posted by sem007 (Post 4025899)
Same question here.
how can i trap TAB key ???

???

DavidMcCann 07-07-2010 12:32 PM

Are we taking about a terminal emulator running in a GUI, or a terminal without a GUI? And if it's a terminal emulator, we need to know which GUI you have: Gnome/Metacity, ICE, etc?

Bratmon 07-07-2010 01:42 PM

Perhaps you want *?

Tinkster 07-07-2010 01:49 PM

Quote:

Originally Posted by DoME69 (Post 4025828)
Hi...


I want to define TAB key at terminal.
When i press TAB key i want all files shows like "ls -ltrh -color"
how can i do it?

Thanks.


You are aware that this will cripple bash?


Cheers,
Tink

DoME69 07-07-2010 11:31 PM

Quote:

Originally Posted by DavidMcCann (Post 4026504)
Are we taking about a terminal emulator running in a GUI, or a terminal without a GUI? And if it's a terminal emulator, we need to know which GUI you have: Gnome/Metacity, ICE, etc?

gnome-terminal

trist007 07-08-2010 07:08 AM

I remember going over how to set TAB spots in a terminal in 'The Unix Book.' I will post how as soon as I get home from work.

Bratmon 07-08-2010 09:23 AM

Here's an analogy:

OP:I need to attach two planks of wood without using any glue. Can you suggest another adhesive?

People in this thread: <Debate on tree sap, etc.>

So, my "hammer and nails" solution is this,

*

Tinkster 07-08-2010 01:27 PM

Quote:

Originally Posted by Bratmon (Post 4027342)
Here's an analogy:

OP:I need to attach two planks of wood without using any glue. Can you suggest another adhesive?

People in this thread: <Debate on tree sap, etc.>

So, my "hammer and nails" solution is this,

*


While this has an oversized asterisk it has no point.
No, I don't mean periods that finish your sentences.

You're trying to point out that others aren't helping
while not helping yourself?


Cheers,
Tink

DavidMcCann 07-09-2010 12:16 PM

It is not a good idea to re-assign TAB, because sooner or later you'll want to use it. There are other keys (like PAUSE) that can be sacrificed, and you can use combinations with Super (aka the Windows key).

With the gnome terminal, consider using keyboard shortcuts created in metacity or with xbindkeys.

DoME69: What you want is alias. Insert in ~/.bashrc the line
alias ll='ls -ltrh -color'
You can then enter 'll' and get the result you want.

DoME69 07-10-2010 11:06 AM

Quote:

Originally Posted by DavidMcCann (Post 4028496)
It is not a good idea to re-assign TAB, because sooner or later you'll want to use it. There are other keys (like PAUSE) that can be sacrificed, and you can use combinations with Super (aka the Windows key).

With the gnome terminal, consider using keyboard shortcuts created in metacity or with xbindkeys.

DoME69: What you want is alias. Insert in ~/.bashrc the line
alias ll='ls -ltrh -color'
You can then enter 'll' and get the result you want.

Hi David...

i don't want to use alias
what i want is expand the possibility of TAB.
What i want is that key use color at terminal.

jkirchner 07-10-2010 01:40 PM

Tab is already used by Bash for tab completion. The alias method is the best to use. Not sure why you would want to cripple it from using tab completion....


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