Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Whatta fsck is this?



Juhapekka Tolvanen <juhtolv@xxxxxxxxx> wrote:
>Argh! It was b0rken! That does not fscking work, when I am rewt.

Not to answer the larger question, but why don't you "simplify" the
optional root bits in this from:

># {{{ Am I root?
>
>if (( EUID == 0 ))
>then
>#  export ROOTTEXT='=*[ROOT ZSH]*='
>  export ROOTTEXT='-=*[ROOT ZSH]*=-'
>#  ROOTTEXT=''
>  export ROOTPROMPTADD=' '
>  export ROOTTITLEADD=' | '
>
># ADD THIS TO PROMPT:
># %S$ROOTTEXT%s$ROOTPROMPTADD
># AND THIS TO TITLE:
># $ROOTTEXT$ROOTTITLEADD
>
>#PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"
>#export PATH
>
>else
>  ROOTTEXT=''
>  ROOTPROMPTADD=''
>  ROOTTITLEADD=''
>fi

into:

export ROOTTEXT='%(0#.-=*[ROOT ZSH]*=-)'
export ROOTPROMPTADD='%(0#. .)'
export ROOTTITLEADD='%(0#. | .'

etc.?


-philip

-- 
Philip Kizer,
USENIX Liaison to Texas A&M University       <usenix@xxxxxxxx>
Texas A&M CIS Operating Systems Group, Unix <pckizer@xxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author