Bash prompts up the wazoo!

Submitted by YoussefAssad on Thu, 27/05/2004 - 13:14.

I was recently converted to the wonderful concept of the multi-line $PS1. Also, being the pathetic competitive type, I read a discussion on slashdot about length of the prompt and I thought to myself, ``I can do better (translation: worse)''.

So, I spent last night mucking about with color codes and arcane /proc entries and came up with a prompt so bloated that it wouldn't look out of place in Microsoft Windows XP. Features:

  • 2 lines
  • Full path of CWD
  • name of user, colorised (green if normal user, red if root)
  • time/date
  • one field alternating between the hostname in green or the text ``I am DIRTY!'' in red depending on whether the kernel has been tainted or not.
  • One viral entry in the end which does not get printed but which echoes ``God wants you to visit eglug.org'' to ~/.bashrc (the idea being to trick unsuspecting users into using this prompt and generating free advertising in the most unethical way I can currently think of)

Planned Features:

  • have code embedded in $PS1 which scans for open proxies in Catalunia and uses them to spoof e-mail to ielug requesting additional shipments of nokia phones
  • Random insults in Belgian
  • patching bash such that every command executed re-executes embedded commands within $PS1 (processor overhead? What processor overhead?)

I will post my PS1 here sometime today. It really is atrocious.


Reply





*

  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <ul> <pre> <blockquote> <img> <ins> <del> <br> <div> <span> <em> <h1> <h2> <h3> <h4> <h5> <h6> <code> <p> <hr>
  • You can insert tables with comma separated values (CSV) into the text, they will be automatically converted to appropriate HTML-tables.
  • You may link to images on this site using a special syntax
  • You can embed nodes within other nodes using the following syntax:
    [node:node_id,param_1="val1",param_2="val2"]
  • You may write mixed Arabic and English freely, line direction will be computed automaticaly
  • Glossary terms will be automatically marked with links to their descriptions