LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-02-2009, 10:47 PM   #1
glinux
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
is there a genearlization of <TAB> completion


is it possible to rewrite or hook up different functionality to the default <TAB> completion that is available from the commandline?

that is, rather then entering the initial characters of a filename from the command line, i enter a substring of the filename(not necessarily anchored to the beginning) and a list of matching or optional files is displayed?

this would appear to be more useful rather then entering redundant text that fails to quickly narrow done potential matches, as often happens when restricted to typing text that is anchored to the beginning of a filename.

this is somewhat similar to incremental-i-search - functionality like this for <TAB> completion would be useful - in place of navigating history, <TAB> completion would search filename in the current directory and list any matches.

another example is, in place of the default behaviour on hitting <TAB> a list of closely matching filenames is displayed; for example on hitting <TAB> for 123, files such as 1a23 or 12b3, if they existed, would be displayed as they are similar 123 eg

$ cat 123
123standardmatch.txt
another1a23.txt
here12b3.pdf

there is a version of grep that achieves this for processing files, but is there something similar for <TAB> completion?

glinux
 
Old 03-03-2009, 12:13 AM   #2
Galaxy_Stranger
Member
 
Registered: Oct 2003
Distribution: CentOS 6 and Fedora
Posts: 252

Rep: Reputation: 36
asdfasf

Sounds messy. You'd prolly get TONS of results.

Besides, Tab is only for convenience in getting to what you already know is there. If you type in the first few characters, (case-sensitive), and then hit tab 3 times, it will list all matches for you.

You might be able to get "find" to do what you want. I haven't used it for much more than simple searches.
 
  


Reply



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
no tab completion maddocks AIX 2 12-27-2007 01:10 PM
Tab-completion kzr_merchant Programming 2 12-17-2007 04:00 PM
TAB Auto Completion rsmccain Linux - Software 6 11-20-2007 09:47 PM
Tab completion for sudo Zmyrgel Slackware 1 06-02-2007 09:17 AM
Tab completion with sudo extrasolar Slackware 8 08-22-2006 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 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
Open Source Consulting | Domain Registration