The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to create a custom GUI hirosima High Level Programming 2 01-13-2006 05:03 AM
Auto Complete cordobapablo UNIX for Dummies Questions & Answers 4 10-18-2005 02:53 PM
Auto complete Tom_Zamani UNIX Desktop for Dummies Questions & Answers 4 07-28-2005 06:30 AM
Custom ftp settings blp001 UNIX for Dummies Questions & Answers 1 05-24-2002 09:37 PM
Auto Complete under AIX truma1 UNIX for Advanced & Expert Users 7 10-11-2001 12:08 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-20-2008
madiyaan madiyaan is offline
Registered User
  
 

Join Date: May 2008
Posts: 2
Question Custom auto-complete

Hello:

I am using csh, and am a complete noob when it comes to shell scripting.

I want the following:

1) Ignore case when doing auto-complete.

2) If there are multiple matches (example: I have files abc.txt abc.txt.1, abc.txt.2 and type abc<tab>), count the number of matches.

If the number of matches is less than a set amount, say 5, then cycle through them upon tab. Meaning when I press abc<tab> it first completes abc.txt, then when I press <tab> again, it completes it to abc.txt.1, then abc.txt.2, and then my original uncompleted word, abc.

If the number of matches is more than 5 and less than 20, it should show me all possibilities upon pressing tab.

If the number of matches is more than 20, it should ask me whether I want a full listing. Upon pressing y or n, it should do the appropriate action (i.e. show me all possible matches, or not show any match).

3) When the number of matches is less than 5, shift-tab should cycle backwards in the list of matched filenames/dir-names.

I want to write a script in .cshrc to do the above, but don't know how/where to start. Can anyone help me write this?

Regards,

[Bump]

Last edited by madiyaan; 05-23-2008 at 03:06 PM.. Reason: Added shift-tab
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0