home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / bash / bug / 599 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.9 KB  |  49 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!fergie.ATl.ge.COM!gthaker
  3. From: gthaker@fergie.ATl.ge.COM (Gautam H Thaker)
  4. Subject: file name completion and # of tabs it takes
  5. Message-ID: <9209091316.AA17858@fergie.ATL.GE.COM>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. References: gthaker@fergie.ATl.ge.COM (Gautam H Thaker)
  9. Distribution: gnu
  10. Date: Wed, 9 Sep 1992 13:16:37 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 35
  13.  
  14. It would be very desirable if bash had the ability to customize how
  15. filename completion works with <tab> keys. (Tcsh allows very flexible
  16. customization.)
  17.  
  18. In situations where bash can not complete to a unique name, it just
  19. beeps and sits there. Right away I hit a second <tab> and get the list
  20. of possible completions. I would like being able to have Bash do what
  21. it does after this second tab as soon as the first tab is hit. For years
  22. I have hacked readline.c on my own to achieve this, but I don't feel my
  23. hack is very general or elegant. Will bash have this feature in future?
  24.  
  25. Aslo, tcsh has context sensitive completion, so that if one does
  26. printenv DIS<tab> it completes from the list of env. variables. Neat.
  27. Can bash have this too?
  28.  
  29. Gautam H. Thaker (gthaker@atl.ge.com) 609-866-6412 (fax x6397. Dialcom 8-777)
  30. GE Adv. Tech. Lab.; Route 38, MS 145-2; Moorestown, NJ 08057.  767-4396 (home)
  31.  
  32. In readline.c:
  33.       /* If there are more matches, ring the bell to indicate.
  34.          If this was the only match, and we are hacking files,
  35.          check the file to see if it was a directory.  If so,
  36.          add a '/' to the name.  If not, and we are at the end
  37.          of the line, then add a space. */
  38.       if (matches[1])
  39.         {
  40. /*          ding (); get rid of noise.  /* There are other matches remaining. */
  41.               rl_possible_completions();  /*GHT  8 May 90 v1.05, 28 May 91 v1.08 */
  42.         }
  43.       else
  44.         {
  45.           char temp_string[2];
  46.  
  47.  
  48.  
  49.