Is there a way to automaticly complete the command line?

English support forum

Moderators: white, Hacker, petermad, Stefan2

atery
Junior Member
Junior Member
Posts: 21
Joined: 2006-03-13, 11:57 UTC
Location: China

Is there a way to automaticly complete the command line?

Post by *atery »

I like the command line in the bottom very much. If I want to make a new folder, instead of F7, I prefer type "md ***" in the command line. I like use it in the DOS way, it feels good and familiar.

If I want to enter a folder, it would be more difficult to do it in the command line than use the Search dialog. I also like the search dialog, but the problem is I set "Alt + letter" to activate the search dialog because I want everytime I type something in the keyboard it can type in the command line. So I wonder is there a way the command line can automatically complete itself. Let me explain:

Say there are two folders in the driver -- "newfolder" and "newwfolder". When I type "cd newf" the command line should complete itself as the first folder, when I type "cd neww" the command line should show newwfolder. If anyone have used MATLAB, you should know this. In MATLAB, whenever you want to let the software complete it automaticly, you just press Tab in the keyboard, and a small window will show all the possible reults. It is really convenient when you have folders or files with long and complicated names.
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Next version will have some kind of AutoComplete similar to IE autocomplete.
Read http://www.ghisler.ch/board/viewtopic.php?t=8270
______________________
David Jorge
Personal License #117854
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2djorge
Here is a dirty script using Autohotkey:
http://www.ghisler.ch/board/viewtopic.php?p=58569#58569
I didnt put it to the wiki, because i wanted to develop it further first, but then didnt have the time and motivation ;-)
I switched to Linux, bye and thanks for all the fish!
atery
Junior Member
Junior Member
Posts: 21
Joined: 2006-03-13, 11:57 UTC
Location: China

Post by *atery »

djorge wrote:Next version will have some kind of AutoComplete similar to IE autocomplete.
Read http://www.ghisler.ch/board/viewtopic.php?t=8270
Thanks. Looking forward to the new version.

2SanskritFritz
I am using the AHK too. Very interesting script. I found a problem -- after I press Cap+Tab, it will del whatever already in the command line and gives the new result in it. This means if I type "cd " first in the command line and then Cap+Tab, I will have to lead the cursor to the beginning of the command line and type cd again. Besides that, good script :lol:
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2atery
Yeah, it serves only as a starting point. About you comment: i wrote in the thread linked: "Main problem is, it first deletes the command line."

BTW: if you develop the script into a usable one, dont forget to post it to the wiki :-)
I switched to Linux, bye and thanks for all the fish!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I would like to invite everyone who is interested in autocomplete to describe detailed how it should work. This includes:
1. The way auto-complete works (interface)
2. Which auto-complete aspects are important (just full paths or more than that)
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Whos gonna pay us for that ? :lol:

1. When I press a key window is displayed with list of possible words. Every letter I type in advance (not sucessive neccesserly) will shorten the list.
For instance, if I have table, telescope, tabasco, tabular bells , t should display list with all of them, ta should remove telescope tao should leave only tabasco (njam njam)

2. templates (user defined shortcuts)

3. special command hotkeys (user defined shortcuts to templates)


that should be good for start
Last edited by majkinetor ! on 2006-03-23, 15:43 UTC, edited 2 times in total.
Habemus majkam!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Lefteous
I personally would prefer the unix way of autocomplete (so in this case only filenames on tab or some other hotkey), but i hardly ever use the command line, so...
I switched to Linux, bye and thanks for all the fish!
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

I would also prefer to see the unix way of autocomplete for the command line but what would be really useful for me would be to see (unix way of autocomplete or Internet Explorer way of autocomplete or dropdown menu with previous entries) implemented for the path field (above the filelist)

As requested here by Pdavit some time ago
http://www.ghisler.ch/board/viewtopic.php?p=66369#66369
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2majkinetor !
2. templates (user defined shortcuts)

3. special command hotkeys (user defined shortcuts to templates)
You are actually talking about aliases, don't you?

What is a hotkey to a shortcut?

2gbo
I don't think the where is the problem.

The Internet Explorer way is actually the Start/Run behavior. Asked the other way around: Is this a good approach ? If no why not? What could be done better and how?
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

Lefteous wrote: 2gbo
I don't think the where is the problem.
I agree I just pointed out the path field because it will be more useful in my case.
Lefteous wrote: The Internet Explorer way is actually the Start/Run behavior. Ask the other way around: Is this a good approach ? If no why not? What could be done better and how?
About the path field I think dropdown menu with previous entries will be the most convenient but I guess it is very specific to my needs.

About command line I prefer the unix way (up arrow key allows to navigate into previous entries like doskey and tab to guess the next path or propose alternatives if tehre are several possibilities) probably because I am used to it.
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Lefteous wrote:The Internet Explorer way is actually the Start/Run behavior. Asked the other way around: Is this a good approach ? If no why not? What could be done better and how?
Start/Run behavior is really nice. There were roumors that such behavior will be implemented in the next version with path field (above the filelist).
atery
Junior Member
Junior Member
Posts: 21
Joined: 2006-03-13, 11:57 UTC
Location: China

Post by *atery »

:) hey guys, sorry i'm late. About the way TC automatic complete, I think something from MATLAB might interest you. They are from the MATLAB help file, to explain how the Tab completion works. I like the way it works, I don't know if you were talking about this way (haven't read your posts yet), but just try to give our author some feeling :lol:

Here they are:
Page 1: Image: http://i39.photobucket.com/albums/e185/atery/page1.png
Page 2: Image: http://i39.photobucket.com/albums/e185/atery/page2.png
Page 3: Image: http://i39.photobucket.com/albums/e185/atery/page3.png

Lefteous wrote:I would like to invite everyone who is interested in autocomplete to describe detailed how it should work. This includes:
1. The way auto-complete works (interface)
2. Which auto-complete aspects are important (just full paths or more than that)
2Lefteous
1. the picture gives you the auto-complete interface in MATLAB. Simple and usefull.
2. As you can see in the page 1, tab completion can work to nearly all kinds of stuff (paths, files, properties). But in TC I thinks things to do with names are enough.
atery
Junior Member
Junior Member
Posts: 21
Joined: 2006-03-13, 11:57 UTC
Location: China

Post by *atery »

I am such a fool :lol: , I found the on-line help, just see this link:

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/comman11.html
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2atery
Thank you - very interesting! :-)
in TC I thinks things to do with names are enough
Well just names ok but not only files have names. Commands, custom filters and other things also have names.... ;-)
Post Reply