Re: tcsh

From: Scott Long (scottl_at_samsco.org)
Date: 04/29/05

  • Next message: M. Warner Losh: "Re: tcsh"
    Date: Thu, 28 Apr 2005 20:27:44 -0600
    To: Chuck Robey <chuckr@chuckr.org>
    
    

    Chuck Robey wrote:
    > The first thing I do, after I've installed a new system (just before I
    > copy over the ssh data) is to copy my .cshrc to my home dir. What's so
    > important? I really like the two statements, which I show below, which
    > give me my prompt:
    >
    > set prompt="%m:%{^[[34m%}`id -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"
    > alias cd 'cd \!*;set prompt="%m%{^[[32m%}:`id
    > -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"'
    >
    > My mailer is adding carriage returns to the cd line, maybe even to the
    > prompt line, live with it.
    >
    > Any chance that something so basic as this, that improves things so
    > awfully much, could be added to the .tcshrc? If the idea is liked well
    > enough, I will edit it enough so that the special use of prompt strings
    > that are specific to tcsh is made conditional.

    Why does 'cd' have to be aliased? Doesn't 'prompt' act as a magic
    variable that gets re-evaluated every time it's printed? Anyways,
    a less colorful version that I use (can't even remember where I got
    it) is:

    set prompt = '[%B%m%b] %B%~%b%# '

    Has the advantage of changing from a > to a # if you are the superuser,
    so it gives approximately the same info as printing the username, but in
    less space and without having to spawn a process every time. For
    extra credit, there are variations that change the xterm title bar and
    icon, too.

    Scott
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: M. Warner Losh: "Re: tcsh"

    Relevant Pages

    • RE: Password prompt & Internal Web site
      ... On the screen with the error, yo will find directions to edit the ... web.config file associated with the website that you are trying to access. ... | name and password" prompt when I click on links "Create", "Site Settings", ...
      (microsoft.public.windows.server.sbs)
    • Re: Where are the passwords kept?
      ... | | Forms/Passwords are stored as encrypted data in the Registry. ... | | from what is stored and prompt to save it. ... | | can't really edit them, but only Right Click a filled in entry to ... | | | fields asking for passwords or addresses, ...
      (microsoft.public.windowsxp.general)
    • Re: [9fans] tab completion and command history in rc
      ... > find the previous command in your rc window, edit it, copy it, paste it ... > to the prompt, and then run it. ... Edit any line in your window, double click at the start or end of the ...
      (comp.os.plan9)
    • Re: cant reboot after messing up my rc.conf file
      ... >>to reboot I get an error and am prompted to drop into shell to fix it. ... >>How can I edit the file while I'm in that prompt? ... This will give you a nice new rc.conf that you can edit once you are up ...
      (freebsd-questions)
    • Re: Where are the passwords kept?
      ... password change, XP will prompt that the password is different ... from what is stored and prompt to save it. ... can't really edit them, but only Right Click a filled in entry to ... Where are the passwords and other field autofill information kept? ...
      (microsoft.public.windowsxp.general)