159243Sobrien 283098Smp [Home] WishList 359243Sobrien 483098Smp Home | RecentChanges | Preferences 583098Smp _________________________________________________________________ 659243Sobrien 7131962Smp Surprised by this behavior...is this a bug? 8131962Smp 9131962Smp (Goal: e.g. distinguish between completely numeric args/names and 10131962Smp those containing non-numerics) 11131962Smp 12131962Smp % touch 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyssey 13131962Smp % ls -1 *[^0-9]* 14131962Smp 104a 15131962Smp 16a02 16131962Smp 2001_A_Space_Odyssey 17131962Smp pex103 18131962Smp pex103a 19131962Smp z101 20131962Smp # (great, looks good to me. Got everything containing a nonnumeric, no more, n 21131962Smpo less.) 22131962Smp 23131962Smp % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss 24131962Smpey ) 25131962Smp foreach? if ( $p !~ *[^0-9]* ) echo $p 26131962Smp foreach? end 27131962Smp # (no output. Huh?) 28131962Smp 29131962Smp % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss 30131962Smpey ) 31131962Smp foreach? if ( $p =~ *[^0-9]* ) echo $p 32131962Smp foreach? end 33131962Smp 1023 (!) 34131962Smp pex103 35131962Smp pex103a 36131962Smp 104a 37131962Smp z101 38131962Smp 16a02 39131962Smp 1999 (!) 40131962Smp 2001 (!) 41131962Smp 2001_A_Space_Odyssey 42131962Smp # (Huh?) 43131962Smp 44131962Smp The [MAN page description] for =~ and !~ just refer to "(see [Filename 45131962Smp substitution])', but evidently there is a (unexplained) difference. 46131962Smp The actual filename globbing looks correct to me, but the pattern 47131962Smp matching operator behavior is unexpected, if I'm not missing 48131962Smp something. 49131962Smp 50131962Smp tcsh 6.09.00 51131962Smp 52131962Smp - bhooglan 53131962Smp _________________________________________________________________ 54131962Smp 55131962Smp Wish "tcsh -l" would accept other flags. At least "-c". 56131962Smp 57131962Smp Currently I can't get ssh to have the right environment unless it is a 58131962Smp login shell. The .ssh/environment doesn't work for me because I login 59131962Smp to different machines with different environments. One thing to do 60131962Smp would be to not have the different environment for login compared to 61131962Smp other shells, but what I would really like is something like... 62131962Smp 63131962Smp ssh remote_application_server "tcsh -l -c application" 64131962Smp 65131962Smp The "ssh -t" doesn't work for me and I don't know why. 66131962Smp 67131962Smp Thanks Tim 68131962Smp 69131962Smp Fix limit vmemoryuse in Linux 70131962Smp 71131962Smp In Linux tcsh is unable to limit vmemoryuse. This is because 72131962Smp RLIMIT_VMEM isn't defined, instead Linux has RLIMIT_AS which means the 73131962Smp same. On Google groups I found patches suggested by Komazaki at 74131962Smp http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&oe=ISO-2022-JP&selm 75131962Smp =m3snmczvfc.wl%40thinkpad.osk.3web.ne.jp.osk.3web.ne.jp and Ogawa 76131962Smp Hirofumi suggests a patch at 77131962Smp http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&selm=87snmba4id.fsf 78131962Smp %40devron.myhome.or.jp None of these patches seems to have been 79131962Smp included in version 6.12 as 6.12 still has this problem. 80131962Smp 81131962Smp /Henrik?? 82131962Smp 83131962Smp New idea: use last line (or n'th line) of output as input to new 84131962Smp command. 85131962Smp 86131962Smp I often find myself typing something like: 87131962Smp 88131962Smp >locate lshort 89131962Smp /usr/local/stow/share/texmf/doc/latex/general/lshort.dvi . . . 90131962Smp /usr/local/store/share/texmf/doc/latex/general/lshort.dvi 91131962Smp 92131962Smp >xdvi /usr/local/store/share/texmf/doc/latex/general/lshort.dvi 93131962Smp 94131962Smp Now the way I accomplish writing the last line, is by moving the mouse 95131962Smp over the last line, and the copy paste it. It would be very nice, if 96131962Smp the shell could keep the last n lines of output in a buffer. This way 97131962Smp one could avoid using the mouse by typing something like: 98131962Smp 99131962Smp >xdvi <M-1> 100131962Smp 101131962Smp which would insert the last line of output, similarly <M-2> could 102131962Smp insert the second last line of output. (the exact commands used is of 103131962Smp course configured via bindkey). 104131962Smp 105131962Smp This could save me a couple of times to the mouse everyday - 106131962Smp di010070@diku.dk 107131962Smp 108131962Smp The shell does not capture any output from commands it runs, so 109131962Smp this is really more a feature for the terminal (be it hardware 110131962Smp or software). --Kim 111131962Smp 11283098Smp Fix memory leak related to aliasrun(). Precmd, Cwdcmd etc. leak 11383098Smp memory. 11459243Sobrien 11583098Smp Fix migrate -site $$... Seems to hang... (aix370) 11659243Sobrien 11783098Smp Fix history in loops. 11859243Sobrien 11983098Smp New idea: sed operations on variables. 12059243Sobrien 12183098Smp Lots of people seem to like the idea to be able to do sed type 12283098Smp operations on shell variables. Maybe we can extend the syntax of the 12383098Smp variable editing to understand string operations. So I would like to 12483098Smp be able to use: 12559243Sobrien 126131962Smp> set a="this is a STRING" 127131962Smp> echo $a:[3-] 128131962Smpis is a STRING 129131962Smp> echo $a:[#] 130131962Smp16 131131962Smp> echo $a:[6-7] 132131962Smpis 133131962Smp> echo $a:[-2] 134131962Smpng 135131962Smp> echo $a:[-20] 136131962SmpSubscript out of bounds. 137131962Smp> echo $a:[2-20] 138131962SmpSubscript out of bounds. 139131962Smp> echo $a:[1-1]:u$a:[2-]. 140131962SmpThis is a string. 14183098Smp 142131962Smp </blockquote> 143131962Smp 14483098Smp Fix pipelines that contain builtins so that they behave correctly. 14583098Smp 14683098Smp I tried to fix that (most of the code is in sh.sem.c, but it works 14783098Smp only for non POSIX machines cause otherwise the setpgid() I added 14883098Smp fails). 14983098Smp 15083098Smp Fix the correct code... How to do that involves A.I.... 15183098Smp 15283098Smp Rewrite the whole thing. It has taken to much beating over the 15383098Smp years... 15483098Smp 15583098Smp Add another hook like precmd to be executed after the prompt but 15683098Smp before the command. 15783098Smp 15883098Smp Add instructions for using configure in the README file. 159131962Smp 160131962Smp Make manual page references links in the HTML version of the manual. 161131962Smp 162131962Smp It is possible to match the words with ([0-9]) after them. Links could 163131962Smp be using the manual page CGI at http://www.tac.eu.org/cgi-bin/man-cgi 164131962Smp for content. 165131962Smp 166131962Smp Add OpenBSD?? to the Makefile, etc. 167131962Smp 168131962Smp A Csh compatability mode would be nice: I know tcsh is supposed to be 169131962Smp fully csh compatible, but csh scripts containing such constructs as 170131962Smp '$<' , 'if ( -d $file ) cd $file' or any of a great number of other 171131962Smp valid csh commands, will produce syntax errors or the like with tcsh, 172131962Smp which is frustrating when writing/maintaining csh scripts which have 173131962Smp to run on systems with only tcsh and systems with only csh. If such a 174131962Smp thing exists, I couldn't find it after searching the man page for two 175131962Smp hours, and it should be better documented 176131962Smp 177131962Smp Add hooks for command completion Either for a dynamically loaded 178131962Smp library, or a callback to another program that allows another pass to 179131962Smp complete the command. As a trivial example, the module could duplicate 180131962Smp the functionality of aliases. A tcsh_mud.so could define sigh, groan, 181131962Smp cheer, lol, etc to produce output if they weren't actually valid 182131962Smp commands. 183131962Smp 184131962Smp Properly deal with : in filename substitution 185131962Smp 186131962Smp Given something like 187131962Smp 188131962Smp blah.foo:*.foo 189131962Smp 190131962Smp expand it properly to something like 191131962Smp 192131962Smp blah.foo:baz.foo:bob.foo:bar.foo 193131962Smp 194131962Smp It already does this, if you have a file named like that... --Kim 195131962Smp 196131962Smp Directory commands don't handle blanks in filenames. If I have an 197131962Smp environment variable such as: 198131962Smp 199131962Smp% setenv TOMCAT '/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0' 200131962Smpand then do the following, setenv complains that it has too many arguments. 201131962Smp% cd /tmp 202131962Smp% cd "$TOMCAT" 203131962Smpsetenv: Too many arguments 204131962Smp% dirs 205131962Smp/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp 206131962Smp% pushd "$TOMCAT" 207131962Smp/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 208131962Smpsetenv: Too many arguments. 209131962Smp% pushd /tmp 210131962Smp/tmp /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 211131962Smp% pushd 212131962Smp/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp 213131962Smpsetenv: Too many arguments. 214131962Smp 215131962Smp Wish tcsh would feature fc (fix command) as in bash !Wish tcsh would 216131962Smp featuer fc (fix command) as in bash ! 217131962Smp 218131962Smp i wish for read-only CVS access to the sources (as i am on the 219131962Smp bleeding egde) 220131962Smp 221131962Smp Functions would be useful! As would being able to redirect stderr (or 222131962Smp other file descriptors) independently of stdout! -- Rohan Talip 223131962Smp 224131962Smp Don't complete commands with non-executable files. For example if I 225131962Smp have a file called README in a directory in the PATH, and I type R TAB 226131962Smp tcsh will complete README as a command. But README does not have the x 227131962Smp bit set, so it's kind of pointless to have that completion. 228131962Smp 229131962Smp --> Setting the shell variable "recognize_only_executables" will give 230131962Smp you this behavior. --Waz 231131962Smp 232131962Smp If I have in my .tcshrc: complete {cd,pushd} p/1/d/ and I type 233131962Smp "complete cd" at the shell prompt nothing is printed. It would be nice 234131962Smp if {cd,pushd} p/1/d/ was printed. 235131962Smp 236131962Smp --> I had programmed this feature a while ago but have not submitted 237131962Smp it because the implementation is not robust enough to keep TCSH from 238131962Smp crashing when special characters are part of the pattern. I'll get 239131962Smp back to it at some point! --Waz 240131962Smp 241131962Smp It would be nice if "set autolist" would be on by default. 242131962Smp 243131962Smp --- 244131962Smp 245131962Smp Unicode (UTF-8) doesn't seem to work. It's not even possible to "make 246131962Smp catalogs" in unicode environment. Also unicode support (and other 247131962Smp multibyte encodings) should depend on environment variables 248131962Smp (LC_CTYPE), not on "set dspmbyte". On unicode terminal translations 249131962Smp show empty characters instead of messages. 250131962Smp 251131962Smp In addition to message catalogs, there are more problems: 252131962Smpipi:~/test/tcsh/bin> ls 253131962Smptcsh ��� 254131962Smpipi:~/test/tcsh/bin> set dspmbyte utf8 255131962Smpipi:~/test/tcsh/bin> ls ??? 256131962Smpls: No match. 257131962Smp 258131962Smp Unicode is used more and more, and is default on many environments, so 259131962Smp this really should be fixed. --mpaananen 26083098Smp _________________________________________________________________ 26183098Smp 262131962Smp When I have a script called from complete I would like to have the the 263131962Smp existing text from the command line passed to that script so that it 264131962Smp can look at all existing words to detemine what it should output as 265131962Smp the completion list. 266131962Smp 267131962Smp For example: 268131962Smp 269131962Smp complete prog 'n/-x/`myscript`' 270131962Smp 271131962Smp Then when I do this: 272131962Smp 273131962Smp > prog -a A -b B -x <TAB> 274131962Smp 275131962Smp The script would get 'prog -a A -b B -x ' which would allow the script 276131962Smp to base its -x completions on the options given for -a and -b (or if 277131962Smp they aren't present give nothing - or a message saying that they are 278131962Smp required). Setting a temporary environment variable before executing 279131962Smp the command would also work and would probably be safer. 280131962Smp 281131962Smp Perhaps this info is already available as a special variable that can 282131962Smp be manually passed to the script: complete prog 'n/-x/`myscript 283131962Smp $cmd_line`'? 284131962Smp 285131962Smp Update: I looked into this further by actually downloading the code 286131962Smp and looking through it. It doesn't seem that this information is 287131962Smp available anywhere, but I did manage to achieve what I wanted by 288131962Smp adding the following two lines around the call to tw_complete (line 289131962Smp 278, tw.parse.c 6.12.00): 290131962Smp 291131962Smp added> tsetenv(STRCURRCMDLINE, (Char *)&qline); 292131962Smp looking = tw_complete(cmd_start, &wordp, &pat, looking, &suf); 293131962Smp 294131962Smp added> Unsetenv(STRCURRCMDLINE); 295131962Smp 296131962Smp And I added a definition for STRCURRCMDLINE to be "CURRCMDLINE". 297131962Smp 298131962Smp This provides the environment variable CURRCMDLINE to any 299131962Smp script/program running under complete. The only issue I see is picking 300131962Smp a sufficiently obscure environment variable that noone else is likely 301131962Smp to use, but have it readable enough to understand what it is for. It 302131962Smp also shouldn't overwrite an existing ENV variable if it is already in 303131962Smp use. 304131962Smp _________________________________________________________________ 305131962Smp 30683098Smp Home | RecentChanges | Preferences 30783098Smp Edit text of this page | View other revisions 308131962Smp Last edited March 25, 2004 10:27 (diff) 30983098Smp Search: ____________________ 310