New answers tagged

2

A quick look through the fine manual for tcsh(1) turns up: postcmd Runs before each command gets executed. > alias postcmd 'echo -n "^[]2\;\!#:q^G"' then executing vi foo.c will put the command string in the xterm title bar. Granted, the BEL and ESC characters in that documentation are probably not in a ...


2

You can use the special cwdcmd alias. From tcsh(1): cwdcmd Runs after every change of working directory. For example, if the user is working on an X window system using xterm(1) and a re-parenting window manager that supports title bars such as twm(1) and does > alias cwdcmd 'echo -n ...


0

An alternative is to use pkill on one line either on the command line or in a script. pkill -9 -u $USER '(HAL9000|HALos|HALshell|HALkeyboardDrv||HALdisplayDrive|HALdiskDriver)'


2

You probably meant !~, "does not match regular expression", rather than !=, "is not equal to". For $var =~ regexp and $var !~ regexp, the pattern on the right should not be quoted. For == and !=, you may quote the part on the right (and in fact I'd encourage this). Since != expects a string, "[yY] was not parsed as a regular expression. Rather, the shell ...


1

You need to do: (command > stdout) >& stderr E.g.: (make foo > /dev/tty) >& error.txt The first > redirects the stdout to the tty, then the >& redirects whatever's left into error.txt. In your case, it'd go like this: ~> (make foo > /dev/tty) >& error.txt ~> cat error.txt make: *** No rule to make ...


2

I ended up using precmd I put alias precmd 'source ~/.tcsh/precmd.tcsh' into my .cshrc file and moved my prompt set into that file. Source of the .tcsh set tmpstr = `(git status --untracked-files=no --porcelain >! ~/out ) >&! ~/out1` #echo $tmpstr #for debugging if !( -s ~/out ) then if !( -s ~/out1 ) then set gitstr = ...



Top 50 recent answers are included