From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from jive.softhome.net ([66.54.152.27]) by speech.braille.uwo.ca with smtp (Exim 3.35 #1 (Debian)) id 193iJ4-00032j-00 for ; Thu, 10 Apr 2003 16:05:58 -0400 Received: (qmail 8631 invoked by uid 417); 10 Apr 2003 20:05:51 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 10 Apr 2003 20:05:51 -0000 Received: from SETBCSpivey ([207.23.25.199]) by softhome.net with esmtp; Thu, 10 Apr 2003 14:05:50 -0600 Message-ID: <000901c2ff9c$b45cd900$c71917cf@SETBCSpivey> From: "Tyler Spivey" To: speakup@braille.uwo.ca Subject: quick tip #1: including subshell number in prompt Date: Thu, 10 Apr 2003 13:06:41 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: speakup-admin@braille.uwo.ca Errors-To: speakup-admin@braille.uwo.ca X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: speakup@braille.uwo.ca List-Help: List-Post: List-Subscribe: , List-Id: Speakup is a screen review system for Linux. List-Unsubscribe: , List-Archive: ok -- just a quicky: if you've ever been in a text editor or another program, shelled out to another instance of bash, and forgot the editor was there, you might have logged out of all consoles or ran ps and found it. but if you're running screen like i do, i don't log out for weeks, and miss those editors until i shut down for something. so, you can add the variable $SHLVL to y our prompt, so your shell level will be displayed. if you're using screen, and it's not your login shell, you ight want to: export SHLVL=0 so that screen's shells will have level 1, and all subshells will have level 2 or more. otherwise, screen will have level 2, and other subshells will have level 3. this might apply to ther situations. now onto the meat of this rather long quick tip: you can set the variable in your prompt for example: export PS1="\h:\w [$SHLVL]\$" so you'll get a prompt like: fast:~ [1]$ or if you were in a subshell, 1 level deep (from an editor or such): fast:/directory [2]$ if you have any questions, just ask - i'll help if i can.