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 05-17-2010, 06:12 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Rep: Reputation: 49
auto-completion in gnome-terminal


TIP for all
Code:
Currently I have added following line to ~/.inputrc
set completion-ignore-case On
So that I don't have to worry about case of file name as my file names are different irrespective of case.
(Question1)
i am using ubuntu 8.04
say I have following files in a folder
Code:
2GB ddr3 sdram
AN3940_Hardware and Layout Design.pdf
AN4039_PowerQUICC and QorIQ.pdf
bdgm_final.doc
clock.xls
MPC8569 Core and IO power - design estima.pdf
_MPC8569E_Device_Errata_update_October_29.pdf
MPC8569EFS-2 page.pdf
MPC8569EPB.pdf
MPC8569E_Reference_Manual_(RevD).pdf
MPC8569E_Schematics.pdf
mpc 8569 features.doc
MPC8569_H_W_spec_Rev_F.pdf
MPC8569MDSFS.pdf
MPC8569-MDS-PB_HWGS_v3[1].1.pdf
naits
QEIWRM.pdf
sgmii.pdf
and I want to copy MPC8569E_Schematics.pdf to another folder.But I don't want to type whole name or a part of it but just press tab to get various options (like in DOS command prompt).
Is that possible ?

Currently If I run
Code:
$ cp /data/sumeet/gpon/mpc8569/MPC8569E_then I pressed tab
MPC8569E_Reference_Manual_(RevD).pdf  MPC8569E_Schematics.pdf
$ cp /data/sumeet/gpon/mpc8569/MPC8569E_here I have to make my file choice clear by pressing 's'
Example:Say I have two files named qwertyu15 & qwertyu25 & rest files & sub-folders don't start with q.It would be better if I just press 'q' then tab to get both of them alternately instead of typing atleast 'qwertyu1' or 'qwertyu2' ?


(Question2)Please see last post at http://www.linuxquestions.org/questi...rminal-792484/ (No response since few days)

Thank You

Last edited by sumeet inani; 05-17-2010 at 06:22 AM. Reason: making my query more clear
 
Old 05-17-2010, 06:47 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,496

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Well i must say I am not sure how exactly to solve your problem, but it seems you would just like to be as lazy as possible as typing an 's' to get the
file you want is hard work.

Let me put it to you a different way, what do you expect the default action to be if you wish to tab-complete a command?
With your method, instead of being presented the alternatives and simply choosing the next letter to get what you want you would have to
keep tabbing through all the alternatives. Here is an example:

Code:
c[tab][tab]
If you perform this action on my linux box I am asked:
Code:
Display all 133 possibilities? (y or n)
Your solution would have me tab through all 133 until i see the one i need/want.

Maybe you should consider what happens here before trying to alter the current scenario.
 
Old 05-17-2010, 09:19 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Original Poster
Rep: Reputation: 49
to grail
Quote:
Example:Say I have two files named qwertyu15 & qwertyu25 & rest hundreds of files & sub-folders don't start with q.It would be better if I just press 'q' then tab to get both of them alternately instead of typing atleast 'qwertyu1' or 'qwertyu2' ?
 
Old 05-17-2010, 09:31 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Why on earth would you want bash not to be case sensitive?

From the computer's point of view, 'A' and 'a' are completely unrelated, separate letters with different ASCII codes.

Also, the Linux filesystem is case sensitive. What if you have two files, test and Test, in the same folder. How do you choose one if the command line is case insensitive?
 
Old 05-18-2010, 05:17 AM   #5
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Original Poster
Rep: Reputation: 49
to mtk358
Quote:
So that I don't have to worry about case of file name as my file names are different irrespective of case.
Though I know that file names with only case difference are valid & possible.
 
  


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
vim: auto-completion in ex chexmix Solaris / OpenSolaris 1 08-28-2008 02:26 PM
GNOME or GTK text auto-completion in file name boxes FSHero Linux - Newbie 3 02-26-2008 04:03 AM
TAB Auto Completion rsmccain Linux - Software 6 11-20-2007 09:47 PM
auto-completion - how does it work & can my script args auto-complete? BrianK Programming 1 06-11-2004 04:51 PM
Terminal auto-completion - stopping speaker noise bb_matt Linux - General 3 01-06-2004 10:15 PM


All times are GMT -5. The time now is 01:20 AM.

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