tcsh/csh expression alias redone for bash

tcsh/csh expression alias redone for bash

Post by ila.. » Fri, 08 Mar 1996 04:00:00



Hello all,

  I am struggling to recreate the following expression from my
  .cshrc in .bashrc.  This alias prints the name of the current
  directory on the name-line of the xterm.

         alias ftoolheader 'echo  ]2\;"$system":$cwd '    
       alias cwdcmd ftoolheader

  Please help. Thanks,

Igor

 
 
 

tcsh/csh expression alias redone for bash

Post by Dave Bro » Sun, 10 Mar 1996 04:00:00



: Hello all,
:
:   I am struggling to recreate the following expression from my
:   .cshrc in .bashrc.  This alias prints the name of the current
:   directory on the name-line of the xterm.
:
:        alias ftoolheader 'echo ]2\;"$system":$cwd'    
:        alias cwdcmd ftoolheader

PS1="\{^[]2;\h:\w^G\}"

Put the rest of your prompt after the \}.  And the \{ and \} might have
to be \[ and \]--it's been a while since I used bash.  They tell bash to
ignore those bits because they don't show up on the actual terminal.

--Dave
--
http://www.csclub.uwaterloo.ca/~dagbrown/ Dave Brown, Official CSC BOFH

 
 
 

1. Deleting files / useful aliases (was TCSH CSH BASH.....)


| I recently got Linux up and running on my 486/25/200MB HD, w. 8 megs of RAM
| and am quite happy with it except for one problem , I cant delete ANY
| files anywhere, no matter which shell I use it tells me the delete command
| doesnt exist (same with "erase" "del" etc etc)

Try "rm file" for deleting the file.

Remember, you're dealing with Unix now, not DOS...

If you need to, create aliases for your favourite DOS commands.

In my home directory, I have a file called ".aliases", and to load it I type:
. .aliases

The file should have access of "chmod 644 .aliases".

You could also place such a file reference in your .profile, as I do:
. ~/.aliases

Here's a section from my .aliases file:
|phoenix:~$ more .aliases
|alias a=alias
|a h=history
|a dir='ls -al'
|a dirs='ls -a'
|a copy=cp
|a move=mv
|a ren=mv
|a quit=logout
|a exit=logout
|a tn=telnet
|a tnr='telnet renzo'
|a tnp='telnet phoenix'
|a tna='telnet anna'
|a tne='telnet equus.hq'
|a vrfy=finger
|a llm=ls -al /var/spool/mail/bru* /var/spool/mail/.bru*
|a cls=clear

(remember that the syntaxes of some of the commands is different than in DOS)

     If anyone reading this finds it to be useful/creative/helpful/whatever,
pls let me know.  Thanks.

     Please feel free to contact me if you have any questions or
need further assistance!

Virtually,
     Bruce

    //::      //::    Information Systems Coordinator
   //  //    //  //  Universities Space Research Association
  //::      //:::   Goddard Visiting Scientist Program
 //  //    //      7501 Forbes Blvd. #206; Seabrook, MD 20706-2253 USA
//:::  ee //      MC610.3 Bldg26 Rm215; NASA/Goddard; Greenbelt, MD 20771 USA

Two Roads Diverge in a Wood
And I took the One Less Travelled By
And That Has Made All the Difference
     --Robert Frost, "The Road Not Taken"

2. miro CRYSTAL VR2000/4000 with XFree86-3.2 (S3 Virge/VX)?

3. Help to find a good book on csh/tcsh to teach myself csh/tcsh script

4. How to use heredoc in makefile

5. * Quoting that expression as an tcsh-alias ?

6. lbx-extension/low performance (compression)

7. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

8. EISA and 3Com509B - Aarghh

9. specifying back-ticks in an alias (csh/tcsh)

10. alias in csh tcsh

11. Thanks :alias in csh and tcsh

12. limits on env, alias or path in csh /tcsh ?

13. can you alias a complete foreach in csh/tcsh