LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-07-2010, 01:14 AM   #1
DoME69
Member
 
Registered: Jan 2008
Posts: 164

Rep: Reputation: 15
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.
 
Old 07-07-2010, 03:15 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by DoME69 View Post
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 ???
 
Old 07-07-2010, 06:15 AM   #3
DoME69
Member
 
Registered: Jan 2008
Posts: 164

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sem007 View Post
Same question here.
how can i trap TAB key ???
???
 
Old 07-07-2010, 01:32 PM   #4
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,269

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
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?
 
Old 07-07-2010, 02:42 PM   #5
Bratmon
Member
 
Registered: Jul 2009
Location: 75.126.162.205:80
Distribution: Arch / Mint 17
Posts: 297
Blog Entries: 3

Rep: Reputation: 50
Perhaps you want *?
 
Old 07-07-2010, 02:49 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by DoME69 View Post
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
 
Old 07-08-2010, 12:31 AM   #7
DoME69
Member
 
Registered: Jan 2008
Posts: 164

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by DavidMcCann View Post
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
 
Old 07-08-2010, 08:08 AM   #8
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
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.
 
Old 07-08-2010, 10:23 AM   #9
Bratmon
Member
 
Registered: Jul 2009
Location: 75.126.162.205:80
Distribution: Arch / Mint 17
Posts: 297
Blog Entries: 3

Rep: Reputation: 50
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,

*
 
Old 07-08-2010, 02:27 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by Bratmon View Post
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

Last edited by Tinkster; 07-08-2010 at 02:28 PM.
 
Old 07-09-2010, 01:16 PM   #11
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,269

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
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.
 
Old 07-10-2010, 12:06 PM   #12
DoME69
Member
 
Registered: Jan 2008
Posts: 164

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by DavidMcCann View Post
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.
 
Old 07-10-2010, 02:40 PM   #13
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Posts: 765

Rep: Reputation: 196Reputation: 196
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....

Last edited by jkirchner; 07-10-2010 at 02:52 PM.
 
  


Reply


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
Cron tab error: No entry for terminal type "unknown"; sing dumb terminal settings. shlomi.s Linux - Software 12 09-06-2011 10:20 AM
Define bind key xeon123 Linux - General 1 03-06-2007 01:28 PM
vim tab key redhax8 Programming 3 09-02-2006 10:44 PM
how to define Fn key for Laptops ??? Delicate_Shadow MEPIS 2 05-14-2006 09:51 AM
Tab Key and arrow key zillah Solaris / OpenSolaris 12 05-26-2005 03:51 PM


All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration