/contrib/tcsh/WishList

https://bitbucket.org/freebsd/freebsd-head/ · #! · 309 lines · 231 code · 78 blank · 0 comment · 0 complexity · edebdb3835dbd103fa3ddfb39a8d4976 MD5 · raw file

  1. [Home] WishList
  2. Home | RecentChanges | Preferences
  3. _________________________________________________________________
  4. Surprised by this behavior...is this a bug?
  5. (Goal: e.g. distinguish between completely numeric args/names and
  6. those containing non-numerics)
  7. % touch 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyssey
  8. % ls -1 *[^0-9]*
  9. 104a
  10. 16a02
  11. 2001_A_Space_Odyssey
  12. pex103
  13. pex103a
  14. z101
  15. # (great, looks good to me. Got everything containing a nonnumeric, no more, n
  16. o less.)
  17. % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss
  18. ey )
  19. foreach? if ( $p !~ *[^0-9]* ) echo $p
  20. foreach? end
  21. # (no output. Huh?)
  22. % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss
  23. ey )
  24. foreach? if ( $p =~ *[^0-9]* ) echo $p
  25. foreach? end
  26. 1023 (!)
  27. pex103
  28. pex103a
  29. 104a
  30. z101
  31. 16a02
  32. 1999 (!)
  33. 2001 (!)
  34. 2001_A_Space_Odyssey
  35. # (Huh?)
  36. The [MAN page description] for =~ and !~ just refer to "(see [Filename
  37. substitution])', but evidently there is a (unexplained) difference.
  38. The actual filename globbing looks correct to me, but the pattern
  39. matching operator behavior is unexpected, if I'm not missing
  40. something.
  41. tcsh 6.09.00
  42. - bhooglan
  43. _________________________________________________________________
  44. Wish "tcsh -l" would accept other flags. At least "-c".
  45. Currently I can't get ssh to have the right environment unless it is a
  46. login shell. The .ssh/environment doesn't work for me because I login
  47. to different machines with different environments. One thing to do
  48. would be to not have the different environment for login compared to
  49. other shells, but what I would really like is something like...
  50. ssh remote_application_server "tcsh -l -c application"
  51. The "ssh -t" doesn't work for me and I don't know why.
  52. Thanks Tim
  53. Fix limit vmemoryuse in Linux
  54. In Linux tcsh is unable to limit vmemoryuse. This is because
  55. RLIMIT_VMEM isn't defined, instead Linux has RLIMIT_AS which means the
  56. same. On Google groups I found patches suggested by Komazaki at
  57. http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&oe=ISO-2022-JP&selm
  58. =m3snmczvfc.wl%40thinkpad.osk.3web.ne.jp.osk.3web.ne.jp and Ogawa
  59. Hirofumi suggests a patch at
  60. http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&selm=87snmba4id.fsf
  61. %40devron.myhome.or.jp None of these patches seems to have been
  62. included in version 6.12 as 6.12 still has this problem.
  63. /Henrik??
  64. New idea: use last line (or n'th line) of output as input to new
  65. command.
  66. I often find myself typing something like:
  67. >locate lshort
  68. /usr/local/stow/share/texmf/doc/latex/general/lshort.dvi . . .
  69. /usr/local/store/share/texmf/doc/latex/general/lshort.dvi
  70. >xdvi /usr/local/store/share/texmf/doc/latex/general/lshort.dvi
  71. Now the way I accomplish writing the last line, is by moving the mouse
  72. over the last line, and the copy paste it. It would be very nice, if
  73. the shell could keep the last n lines of output in a buffer. This way
  74. one could avoid using the mouse by typing something like:
  75. >xdvi <M-1>
  76. which would insert the last line of output, similarly <M-2> could
  77. insert the second last line of output. (the exact commands used is of
  78. course configured via bindkey).
  79. This could save me a couple of times to the mouse everyday -
  80. di010070@diku.dk
  81. The shell does not capture any output from commands it runs, so
  82. this is really more a feature for the terminal (be it hardware
  83. or software). --Kim
  84. Fix memory leak related to aliasrun(). Precmd, Cwdcmd etc. leak
  85. memory.
  86. Fix migrate -site $$... Seems to hang... (aix370)
  87. Fix history in loops.
  88. New idea: sed operations on variables.
  89. Lots of people seem to like the idea to be able to do sed type
  90. operations on shell variables. Maybe we can extend the syntax of the
  91. variable editing to understand string operations. So I would like to
  92. be able to use:
  93. > set a="this is a STRING"
  94. > echo $a:[3-]
  95. is is a STRING
  96. > echo $a:[#]
  97. 16
  98. > echo $a:[6-7]
  99. is
  100. > echo $a:[-2]
  101. ng
  102. > echo $a:[-20]
  103. Subscript out of bounds.
  104. > echo $a:[2-20]
  105. Subscript out of bounds.
  106. > echo $a:[1-1]:u$a:[2-].
  107. This is a string.
  108. </blockquote>
  109. Fix pipelines that contain builtins so that they behave correctly.
  110. I tried to fix that (most of the code is in sh.sem.c, but it works
  111. only for non POSIX machines cause otherwise the setpgid() I added
  112. fails).
  113. Fix the correct code... How to do that involves A.I....
  114. Rewrite the whole thing. It has taken to much beating over the
  115. years...
  116. Add another hook like precmd to be executed after the prompt but
  117. before the command.
  118. Add instructions for using configure in the README file.
  119. Make manual page references links in the HTML version of the manual.
  120. It is possible to match the words with ([0-9]) after them. Links could
  121. be using the manual page CGI at http://www.tac.eu.org/cgi-bin/man-cgi
  122. for content.
  123. Add OpenBSD?? to the Makefile, etc.
  124. A Csh compatability mode would be nice: I know tcsh is supposed to be
  125. fully csh compatible, but csh scripts containing such constructs as
  126. '$<' , 'if ( -d $file ) cd $file' or any of a great number of other
  127. valid csh commands, will produce syntax errors or the like with tcsh,
  128. which is frustrating when writing/maintaining csh scripts which have
  129. to run on systems with only tcsh and systems with only csh. If such a
  130. thing exists, I couldn't find it after searching the man page for two
  131. hours, and it should be better documented
  132. Add hooks for command completion Either for a dynamically loaded
  133. library, or a callback to another program that allows another pass to
  134. complete the command. As a trivial example, the module could duplicate
  135. the functionality of aliases. A tcsh_mud.so could define sigh, groan,
  136. cheer, lol, etc to produce output if they weren't actually valid
  137. commands.
  138. Properly deal with : in filename substitution
  139. Given something like
  140. blah.foo:*.foo
  141. expand it properly to something like
  142. blah.foo:baz.foo:bob.foo:bar.foo
  143. It already does this, if you have a file named like that... --Kim
  144. Directory commands don't handle blanks in filenames. If I have an
  145. environment variable such as:
  146. % setenv TOMCAT '/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0'
  147. and then do the following, setenv complains that it has too many arguments.
  148. % cd /tmp
  149. % cd "$TOMCAT"
  150. setenv: Too many arguments
  151. % dirs
  152. /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp
  153. % pushd "$TOMCAT"
  154. /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0
  155. setenv: Too many arguments.
  156. % pushd /tmp
  157. /tmp /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0
  158. % pushd
  159. /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp
  160. setenv: Too many arguments.
  161. Wish tcsh would feature fc (fix command) as in bash !Wish tcsh would
  162. featuer fc (fix command) as in bash !
  163. i wish for read-only CVS access to the sources (as i am on the
  164. bleeding egde)
  165. Functions would be useful! As would being able to redirect stderr (or
  166. other file descriptors) independently of stdout! -- Rohan Talip
  167. Don't complete commands with non-executable files. For example if I
  168. have a file called README in a directory in the PATH, and I type R TAB
  169. tcsh will complete README as a command. But README does not have the x
  170. bit set, so it's kind of pointless to have that completion.
  171. --> Setting the shell variable "recognize_only_executables" will give
  172. you this behavior. --Waz
  173. If I have in my .tcshrc: complete {cd,pushd} p/1/d/ and I type
  174. "complete cd" at the shell prompt nothing is printed. It would be nice
  175. if {cd,pushd} p/1/d/ was printed.
  176. --> I had programmed this feature a while ago but have not submitted
  177. it because the implementation is not robust enough to keep TCSH from
  178. crashing when special characters are part of the pattern. I'll get
  179. back to it at some point! --Waz
  180. It would be nice if "set autolist" would be on by default.
  181. ---
  182. Unicode (UTF-8) doesn't seem to work. It's not even possible to "make
  183. catalogs" in unicode environment. Also unicode support (and other
  184. multibyte encodings) should depend on environment variables
  185. (LC_CTYPE), not on "set dspmbyte". On unicode terminal translations
  186. show empty characters instead of messages.
  187. In addition to message catalogs, there are more problems:
  188. ipi:~/test/tcsh/bin> ls
  189. tcsh едц
  190. ipi:~/test/tcsh/bin> set dspmbyte utf8
  191. ipi:~/test/tcsh/bin> ls ???
  192. ls: No match.
  193. Unicode is used more and more, and is default on many environments, so
  194. this really should be fixed. --mpaananen
  195. _________________________________________________________________
  196. When I have a script called from complete I would like to have the the
  197. existing text from the command line passed to that script so that it
  198. can look at all existing words to detemine what it should output as
  199. the completion list.
  200. For example:
  201. complete prog 'n/-x/`myscript`'
  202. Then when I do this:
  203. > prog -a A -b B -x <TAB>
  204. The script would get 'prog -a A -b B -x ' which would allow the script
  205. to base its -x completions on the options given for -a and -b (or if
  206. they aren't present give nothing - or a message saying that they are
  207. required). Setting a temporary environment variable before executing
  208. the command would also work and would probably be safer.
  209. Perhaps this info is already available as a special variable that can
  210. be manually passed to the script: complete prog 'n/-x/`myscript
  211. $cmd_line`'?
  212. Update: I looked into this further by actually downloading the code
  213. and looking through it. It doesn't seem that this information is
  214. available anywhere, but I did manage to achieve what I wanted by
  215. adding the following two lines around the call to tw_complete (line
  216. 278, tw.parse.c 6.12.00):
  217. added> tsetenv(STRCURRCMDLINE, (Char *)&qline);
  218. looking = tw_complete(cmd_start, &wordp, &pat, looking, &suf);
  219. added> Unsetenv(STRCURRCMDLINE);
  220. And I added a definition for STRCURRCMDLINE to be "CURRCMDLINE".
  221. This provides the environment variable CURRCMDLINE to any
  222. script/program running under complete. The only issue I see is picking
  223. a sufficiently obscure environment variable that noone else is likely
  224. to use, but have it readable enough to understand what it is for. It
  225. also shouldn't overwrite an existing ENV variable if it is already in
  226. use.
  227. _________________________________________________________________
  228. Home | RecentChanges | Preferences
  229. Edit text of this page | View other revisions
  230. Last edited March 25, 2004 10:27 (diff)
  231. Search: ____________________