Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2009, 11:47 PM   #1
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

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

Old 03-03-2009, 01:13 AM   #2
Registered: Oct 2003
Distribution: CentOS 6 and Fedora
Posts: 249

Rep: Reputation: 36

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.


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

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration