<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:s="http://www.techrepublic.com/search" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
    <title><![CDATA[Discussion on Personalizing your bash prompt ]]></title>
    <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-227640]]></link>
    <atom:link rel="hub" type="application/rss+xml" href="http://pubsubhubbub.appspot.com/" />
    <atom:link rel="self" type="application/rss+xml" href="http://www.techrepublic.com/forum/discussions/102-227640/rss" />

    <description><![CDATA[]]></description>
    <language>en-us</language>
    <lastBuildDate>2013-05-22T06:38:34-07:00</lastBuildDate>
             

    <item>
        <title><![CDATA[RE: Personalizing your bash prompt]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-227640-2282523]]></link>
        <description><![CDATA[I use bash command windows for my daily work and I would like to customise the shell prompt to solve a problem I am facing. The issue is that I tend to create a lot of folders and subfolders and as I go &quot;deeper and deeper&quot; in the hierarchy tree, the shell prompt increases in length up to a point where it exceeds the window width and it jumps to the next line.  I find this a bit annoying and I would like to know if I can customise the prompt so that it displays the last 3 directories for any place nested in more than 3 directories.example:% cd dir1dir1 % cd dir1.1dir1/dir1.1 % cd dir1.1.1dir1/dir1.1/dir1.1.1 % cd dir1.1.1.1dir1.1/dir1.1.1/dir1.1.1.1 %I did use in the past tcsh command window and the command looked like:alias setbar 'set d = $cwd; set a = (`echo $cwd | tr &quot;/&quot; &quot; &quot;`); @ n = $#a; @ nn = 0; @ nnn = 0;if ( $n &gt; 3 ) @ nn = $n - 1;if ( $n &gt; 3 ) @ nnn = $n - 2;if ( $n &gt; 3 ) set d = &quot;${a[$nnn]}/${a[$nn]}/${a[$n]}&quot;;set prompt = &quot;${hostname}: $d % &quot;;unset n nn nnn a d']]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-227640-2282523]]></guid>
        <dc:creator><![CDATA[tanguy.arzel@...]]></dc:creator>
        <pubDate>Thu, 19 Jul 2007 02:53:35 -0700</pubDate>
    </item>
             

    <item>
        <title><![CDATA[A little prompt colorful explaination please..?]]></title>
        <link><![CDATA[http://www.techrepublic.com/forum/discussions/102-227640-2265632]]></link>
        <description><![CDATA[Thanks to Jack Wallen for prompt info!Ever since SuSE said &quot;bash$&quot; I realized Unixy OSs were  their own world. Linuxmag started w a Newbies column then gave up on the mass of Windose haters, leaving Linux opaque.Jack's goofs. 1. Typo ERR: 2nd section &quot;\[&quot; (Not\]) starts. 2. A little colorful explaination, please? What IS the ColorCode?! Your Primaries Color Codes suffix m : R= 31m= 1F= 0001 1111G= 32m= 20= 0010 0001R= 34m= 22= 0010 0010     Huh? Sometimes I see iirrggbb 8-bit string.  That gives 2^2= 4 levels of each primary and 4 intensities.]]></description>
        <guid><![CDATA[http://www.techrepublic.com/forum/discussions/102-227640-2265632]]></guid>
        <dc:creator><![CDATA[CarlK2]]></dc:creator>
        <pubDate>Tue, 26 Jun 2007 06:13:33 -0700</pubDate>
    </item>
    </channel>
</rss>

