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

Re: Whatta fsck is this?



On Mon, 23 Oct 2000, +08:29:46 EEST (UTC +0300),
Juhapekka Tolvanen <juhtolv@xxxxxxxxx> pressed these keys:

> 
> http://www.zsh.org/mla/users/2000/msg00570.html
> 
> >Juhapekka Tolvanen wrote:
> 
> writetitle()
> {
>   export TITLETEXT="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d | ${COLUMNS}x${LINES} | %l"
> }
> 
> writeexectitle()
> {
>   export EXECTEXT1="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d : "
>   export EXECTEXT2="$*"
> }
> 
> # TERMINAL TYPES
> 
> case "$TERM" in
> 
> *xterm*|rxvt|(dt|k|E)term)
> precmd()
>   {
>     writetitle
>     print -Pn "\e]0;${TITLETEXT}\a"
>   }
> 
>   preexec()
>   {
>     writeexectitle $*
>     print -Pn '\e]0;'
>     print -Pn "${EXECTEXT1}"
>     print -rn "${EXECTEXT2}"
>     print -Pn '\a'
>   }
> ;;
> 
> And so on...

Argh! It was b0rken! That does not fscking work, when I am rewt.

# {{{ 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

(MAJOR CLIP)

writeexectitle()
{
#  export EXECTEXT0="${ROOTTEXT}${ROOTTITLEADD}"
#  export EXECTEXT1="%n@%m:%d : "
  export EXECTEXT1="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d : "
  export EXECTEXT2="$*"
}

# TERMINAL TYPES

case "$TERM" in

*xterm*|rxvt|(dt|k|E)term)
precmd()
  {
    writetitle
    print -Pn "\e]0;${TITLETEXT}\a"
  }

  preexec()
  {
    writeexectitle $*
#    print -Pn '\e]0;'
    print -Pn '\e]0;'"${EXECTEXT1}"
    print -rn "${EXECTEXT2}"
    print -Pn '\a'
  }
;;

(MAJOR CLIP)

In original version that hyphen in the beginning of "-=*[ROOT ZSH]*=-"
makes print-command think that "-=" is yet another option for it.

> I'll upload that config here ASAP:
> 
> http://www.jyu.fi/~juhtolv/configs/shellrc/

Please, wait few hours and then re-download!

BTW, If you have access to Unix b0x0rs with these more or less delicious
flavours of Unix and these terminal-emulators and terminal types, please
test my configurations, both as luser and rewt:

OS, Terminal emulator and $TERM :

IRIX:
- wsh
- xwsh
- winterm
        - iris-ansi

AIX
- aixterm
        - aixterm

HP-UX
- HPterm
        - hpterm

Especially try these:

- What you see in titlebar of terminal window and title of icon?
- How aforementioned things change, if you give for exaple this command?:
  ls ; sleep 20

Additional information is here:

http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/

> P.S: I don't subscribe to these lists, but I am smart enough to read
> Mailing List Archive and you can Cc: to me, i you want.


-- 
Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * * juhtolv@xxxxxxxxx
http://www.cc.jyu.fi/~juhtolv/index.html * * "STRAIGHT BUT NOT NARROW!"
-----------------------------------------------------------------------
"Rakasta mua, tai vihaa mua. Hei, kuinka vaan. Kai sillä sitten voit
jotain uutta saavuttaa. Kai mä ansaitsen uuden tilaisuuden. Kai mä
ansaitsen. Hei, mä tiedän sen. Olen liikaa. Minä olen liikaa." Apulanta



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