zsh-users
 help / color / mirror / code / Atom feed
* Re: Whatta fsck is this?
@ 2000-08-25  6:51 Juhapekka Tolvanen
  0 siblings, 0 replies; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-08-25  6:51 UTC (permalink / raw)
  To: zsh-user mailing list, schaefer


Bart Schaefer wrote:

>} Juhapekka Tolvanen wrote:
>} 
>} > juhtolv@heresy:/home/juhtolv %  date '+%A, %d %B %Y'  
>} > [1m 'Tuesday, 08 August 2000
>} > juhtolv@heresy:/home/juhtolv % 
>} > 
>} > And then all characters after that are bolded!

>All characters after the [1m, or all characters after the next prompt?

Next prompt is bolded and everything after that. 

>Sven Wischnowsky wrote:
>}
>} Do you have anything in $POSTEDIT or in the preexec shell function?
>
>If not, do you have `date' aliased to anything, or wrapped in a shell
>function?

juhtolv@heresy : /home/juhtolv
% wtf date                                                        10001 | pts/5
/bin/date


-- 
Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * juhtolv@st.jyu.fi
http://www.cc.jyu.fi/~juhtolv/index.html * "STRAIGHT BUT NOT NARROW!" 
---------------------------------------------------------------------
"so impressed with all you do. tried so hard to be like you. flew too
high and burnt the wing. lost my faith in everything" nine inch nails


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
  2000-10-23 13:45 ` Juhapekka Tolvanen
@ 2000-10-23 14:18   ` Philip Kizer
  0 siblings, 0 replies; 10+ messages in thread
From: Philip Kizer @ 2000-10-23 14:18 UTC (permalink / raw)
  To: Juhapekka Tolvanen; +Cc: zsh-user mailing list

Juhapekka Tolvanen <juhtolv@st.jyu.fi> 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@tamu.edu>
Texas A&M CIS Operating Systems Group, Unix <pckizer@tamu.edu>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
  2000-10-23  5:29 Juhapekka Tolvanen
@ 2000-10-23 13:45 ` Juhapekka Tolvanen
  2000-10-23 14:18   ` Philip Kizer
  0 siblings, 1 reply; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-10-23 13:45 UTC (permalink / raw)
  To: zsh-user mailing list

On Mon, 23 Oct 2000, +08:29:46 EEST (UTC +0300),
Juhapekka Tolvanen <juhtolv@st.jyu.fi> 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@st.jyu.fi
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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
@ 2000-10-23  5:29 Juhapekka Tolvanen
  2000-10-23 13:45 ` Juhapekka Tolvanen
  0 siblings, 1 reply; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-10-23  5:29 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-user mailing list


http://www.zsh.org/mla/users/2000/msg00570.html

>Juhapekka Tolvanen wrote:

>> ...
>> > > 
>> > > If I do that, I experience these kind of things:
>> > > 
>> > > juhtolv@heresy : /home/juhtolv
>> > > % date '+%A, %d %B %Y'
>> > > 10002 | pts/5
>> > > \e]0;%n@%m:%d : date '+%A, %d %B %Y'\a
>> > > perjantai, 25 elokuu 2000
>> > > juhtolv@heresy : /home/juhtolv
>> > > % uname -a
>> > > 10003 | pts/5
>> > > \e]0;%n@%m:%d : uname -a\a
>> > 
>> > Hrm, works for me (and should have been -rn).
>> > 
>> > Well, how about:
>> > 
>> >   print -Pn '\e]0;'
>> >   print -rn "${EXECTEXT}"
>> >   print -Pn '\a'
>> 
>> Works fine otherwise, but if I give for example a commnd "vi", my
>> titlebar
>> looks like this as long as I run that vi:
>> 
>> %n@%m:%d : vi
>
>But I guess by now you know what the problem is and how to solve it,
>right? ;-)

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...

I'll upload that config here ASAP:

http://www.jyu.fi/~juhtolv/configs/shellrc/

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@st.jyu.fi
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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
@ 2000-08-25  7:54 Sven Wischnowsky
  0 siblings, 0 replies; 10+ messages in thread
From: Sven Wischnowsky @ 2000-08-25  7:54 UTC (permalink / raw)
  To: zsh-users


Juhapekka Tolvanen wrote:

> ...
> > > 
> > > If I do that, I experience these kind of things:
> > > 
> > > juhtolv@heresy : /home/juhtolv
> > > % date '+%A, %d %B %Y'                                            10002 | pts/5
> > > \e]0;%n@%m:%d : date '+%A, %d %B %Y'\a
> > > perjantai, 25 elokuu 2000
> > > juhtolv@heresy : /home/juhtolv
> > > % uname -a                                                        10003 | pts/5
> > > \e]0;%n@%m:%d : uname -a\a
> > 
> > Hrm, works for me (and should have been -rn).
> > 
> > Well, how about:
> > 
> >   print -Pn '\e]0;'
> >   print -rn "${EXECTEXT}"
> >   print -Pn '\a'
> 
> Works fine otherwise, but if I give for example a commnd "vi", my titlebar
> looks like this as long as I run that vi:
> 
> %n@%m:%d : vi

But I guess by now you know what the problem is and how to solve it,
right? ;-)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
       [not found] <200008250743.JAA11058@beta.informatik.hu-berlin.de>
@ 2000-08-25  7:51 ` Juhapekka Tolvanen
  0 siblings, 0 replies; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-08-25  7:51 UTC (permalink / raw)
  To: Sven Wischnowsky; +Cc: zsh-user mailing list

On Fri, 25 Aug 2000, Sven Wischnowsky wrote:

> 
> You wrote:
> 
> > ...
> > 
> > If I do that, I experience these kind of things:
> > 
> > juhtolv@heresy : /home/juhtolv
> > % date '+%A, %d %B %Y'                                            10002 | pts/5
> > \e]0;%n@%m:%d : date '+%A, %d %B %Y'\a
> > perjantai, 25 elokuu 2000
> > juhtolv@heresy : /home/juhtolv
> > % uname -a                                                        10003 | pts/5
> > \e]0;%n@%m:%d : uname -a\a
> 
> Hrm, works for me (and should have been -rn).
> 
> Well, how about:
> 
>   print -Pn '\e]0;'
>   print -rn "${EXECTEXT}"
>   print -Pn '\a'

Works fine otherwise, but if I give for example a commnd "vi", my titlebar
looks like this as long as I run that vi:

%n@%m:%d : vi

-- 
Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * juhtolv@st.jyu.fi
http://www.cc.jyu.fi/~juhtolv/index.html * "STRAIGHT BUT NOT NARROW!" 
---------------------------------------------------------------------
"so impressed with all you do. tried so hard to be like you. flew too
high and burnt the wing. lost my faith in everything" nine inch nails


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
@ 2000-08-25  6:47 Juhapekka Tolvanen
  0 siblings, 0 replies; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-08-25  6:47 UTC (permalink / raw)
  To: wischnow, zsh-user mailing list


Juhapekka Tolvanen wrote:

>> Look at this:
>> 
>> juhtolv@heresy:/home/juhtolv %  date '+%A, %d %B %Y'  
>> [1m 'Tuesday, 08 August 2000
>> juhtolv@heresy:/home/juhtolv % 
>> 
>> And then all characters after that are bolded!
>> 
>> Same thing under bash causes no problems:
>> 
>> [bash]10006|pts/6|juhtolv@heresy: /home/juhtolv
>> $ date '+%A, %d %B %Y'  
>> Tuesday, 08 August 2000
>> [bash]10007|pts/6|juhtolv@heresy: /home/juhtolv
>> $ 
>> 
>> What am I doing wrong?

>Do you have anything in $POSTEDIT or in the preexec shell function?


juhtolv@heresy : /home/juhtolv
% echo $POSTEDIT                                                  10001 | pts/5

juhtolv@heresy : /home/juhtolv
% wtf wtf                                                         10002 | pts/5
wtf: aliased to whence -savc
/usr/games/wtf
juhtolv@heresy : /home/juhtolv
% wtf preexec                                                     10003 | pts/5
preexec () {
        writeexectitle $*
        print -Pn "\e]0;${EXECTEXT}\a"
}
juhtolv@heresy : /home/juhtolv
% wtf writeexectitle                                              10004 | pts/5
writeexectitle () {
        export EXECTEXT="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d : $*"
}
juhtolv@heresy : /home/juhtolv
%                                                                 10005 | pts/5

All my shell shellconfigs are here:

http://www.jyu.fi/~juhtolv/configs/shellrc/

-- 
Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * juhtolv@st.jyu.fi
http://www.cc.jyu.fi/~juhtolv/index.html * "STRAIGHT BUT NOT NARROW!" 
---------------------------------------------------------------------
"so impressed with all you do. tried so hard to be like you. flew too
high and burnt the wing. lost my faith in everything" nine inch nails


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
  2000-08-08 12:22 Sven Wischnowsky
@ 2000-08-08 15:04 ` Bart Schaefer
  0 siblings, 0 replies; 10+ messages in thread
From: Bart Schaefer @ 2000-08-08 15:04 UTC (permalink / raw)
  To: zsh-users

} Juhapekka Tolvanen wrote:
} 
} > juhtolv@heresy:/home/juhtolv %  date '+%A, %d %B %Y'  
} > [1m 'Tuesday, 08 August 2000
} > juhtolv@heresy:/home/juhtolv % 
} > 
} > And then all characters after that are bolded!

All characters after the [1m, or all characters after the next prompt?

Sven Wischnowsky wrote:
}
} Do you have anything in $POSTEDIT or in the preexec shell function?

If not, do you have `date' aliased to anything, or wrapped in a shell
function?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Whatta fsck is this?
@ 2000-08-08 12:22 Sven Wischnowsky
  2000-08-08 15:04 ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Sven Wischnowsky @ 2000-08-08 12:22 UTC (permalink / raw)
  To: zsh-users


Juhapekka Tolvanen wrote:

> Look at this:
> 
> juhtolv@heresy:/home/juhtolv %  date '+%A, %d %B %Y'  
> [1m 'Tuesday, 08 August 2000
> juhtolv@heresy:/home/juhtolv % 
> 
> And then all characters after that are bolded!
> 
> Same thing under bash causes no problems:
> 
> [bash]10006|pts/6|juhtolv@heresy: /home/juhtolv
> $ date '+%A, %d %B %Y'  
> Tuesday, 08 August 2000
> [bash]10007|pts/6|juhtolv@heresy: /home/juhtolv
> $ 
> 
> What am I doing wrong?

Do you have anything in $POSTEDIT or in the preexec shell function?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Whatta fsck is this?
@ 2000-08-08  5:12 Juhapekka Tolvanen
  0 siblings, 0 replies; 10+ messages in thread
From: Juhapekka Tolvanen @ 2000-08-08  5:12 UTC (permalink / raw)
  To: zsh-user mailing list


Look at this:

juhtolv@heresy:/home/juhtolv %  date '+%A, %d %B %Y'  
[1m 'Tuesday, 08 August 2000
juhtolv@heresy:/home/juhtolv % 

And then all characters after that are bolded!

Same thing under bash causes no problems:

[bash]10006|pts/6|juhtolv@heresy: /home/juhtolv
$ date '+%A, %d %B %Y'  
Tuesday, 08 August 2000
[bash]10007|pts/6|juhtolv@heresy: /home/juhtolv
$ 

What am I doing wrong?

-- 
Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * juhtolv@st.jyu.fi
http://www.cc.jyu.fi/~juhtolv/index.html * "STRAIGHT BUT NOT NARROW!" 
---------------------------------------------------------------------
"so impressed with all you do. tried so hard to be like you. flew too
high and burnt the wing. lost my faith in everything" nine inch nails


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-10-23 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-25  6:51 Whatta fsck is this? Juhapekka Tolvanen
  -- strict thread matches above, loose matches on Subject: below --
2000-10-23  5:29 Juhapekka Tolvanen
2000-10-23 13:45 ` Juhapekka Tolvanen
2000-10-23 14:18   ` Philip Kizer
2000-08-25  7:54 Sven Wischnowsky
     [not found] <200008250743.JAA11058@beta.informatik.hu-berlin.de>
2000-08-25  7:51 ` Juhapekka Tolvanen
2000-08-25  6:47 Juhapekka Tolvanen
2000-08-08 12:22 Sven Wischnowsky
2000-08-08 15:04 ` Bart Schaefer
2000-08-08  5:12 Juhapekka Tolvanen

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).