Mailinglist Archive: opensuse (3729 mails)

< Previous Next >
Re: [SLE] wierd MC behaviour
  • From: James Oakley <joakley@xxxxxxxxxxxxxxx>
  • Date: Tue, 3 Jun 2003 11:08:45 -0300
  • Message-id: <200306031108.51889.joakley@xxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 02 June 2003 05:34 pm, Rikard Johnels wrote:
> On Sunday 01 June 2003 12.58, sjb wrote:
> > '\u@\h:\w> '
>
> BINGO!!!
> That solved it!!!

Here's a diff for /etc/bash.bashrc that should give you the best of both worlds:

- --- bash.bashrc.old 2003-06-03 11:01:47.000000000 -0300
+++ bash.bashrc 2003-06-03 11:00:24.000000000 -0300
@@ -115,8 +115,11 @@
else
_u="\u@\h"
_p=">"
- - if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) -a -z "$EMACS" ; then
- - _t="\[\e]2;\u@\h:\$(ppwd)\007\e]1;\h\007\]"
+ /bin/ps -C mc | /bin/grep -q $PPID
+ if [ $? != 0 ] ; then
+ if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) -a -z "$EMACS" ; then
+ _t="\[\e]2;\u@\h:\$(ppwd)\007\e]1;\h\007\]"
+ fi
fi
fi
# With full path on prompt


- --
James Oakley
Engineering - SolutionInc Ltd.
joakley@xxxxxxxxxxxxxxx
http://www.solutioninc.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE+3Kvu+FOexA3koIgRAnTTAKCNCvHstIfMDv3dO/HCgHAqB1YzzwCfScz/
0NyTCgUBZ+mKC6bTm1FJtO0=
=QPsL
-----END PGP SIGNATURE-----


< Previous Next >
References