LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   auto-completion in gnome-terminal (https://www.linuxquestions.org/questions/linux-newbie-8/auto-completion-in-gnome-terminal-808308/)

sumeet inani 05-17-2010 06:12 AM

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

grail 05-17-2010 06:47 AM

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.

sumeet inani 05-17-2010 09:19 AM

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' ?

MTK358 05-17-2010 09:31 AM

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?

sumeet inani 05-18-2010 05:17 AM

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.


All times are GMT -5. The time now is 07:52 AM.