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