From patchwork Wed May 4 01:33:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "L. D. Pinney" X-Patchwork-Id: 618204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r00rd0Fg5z9t6S for ; Wed, 4 May 2016 11:32:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=qLJrNOyf; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1axlf4-0006hS-AR; Wed, 04 May 2016 01:31:34 +0000 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1axlf1-0005qi-RU for lede-dev@lists.infradead.org; Wed, 04 May 2016 01:31:32 +0000 Received: by mail-oi0-x22f.google.com with SMTP id k142so48592794oib.1 for ; Tue, 03 May 2016 18:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=9y8nSdxSG5UzLH9O1meYoUNbt2xqf74O+2yTm5Dd4Ns=; b=qLJrNOyf9EXNhU8ywfmpv0SN6L5hyCEoHL27xUAak9ZUKid0dNWpOOZCktNH3IQdAK 6NmpJmloycMulL60vnTQPsKPU1/Fn273J31+1XFJQmTs3c+lBk+XR0ijU4QGrZEGGXlz cuJYf3MpufK9hplXtYxem4bEExXoA1lFYYSn5gJT0DHyvHJP4IsN8LcIChNT9AbWqb3w JouYqu+w6Eclugps+2bf1GxjQ8YLmHopKi78JFEJZeBvL+Exu3nBArASmP3y5+1GJNb+ 0crCGAC23UNtKC1OVYC9KNpH7EryHGsP7CsqC/QMdeBdmARgjXrPRSqqGz30nQoS9Evg 0SjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9y8nSdxSG5UzLH9O1meYoUNbt2xqf74O+2yTm5Dd4Ns=; b=C8b0y83N9tr0+Bp8nPnVG1pgOIIvp1uN84ZPWSAu2rvc1DanabMKHrL1BAxd3FqwN3 SFayuLuN0fa9H/ElaJ4aqwYlIro3UrJj5VzSO4putcFEmhmzq0QNtnUg23y8qgpJM3Ca aosVu1CxJu7Vt7LBJ691PCnI64RpU3rZLiW11fFVTjUMoYEIWcWbRSrR5f8ulPr7VOfq HOMo4yUaj2r+5CoGI3aN5XCXzsFKNocFvioSSZ1gLQNidKIx5xBM2pSla28r5KUJTsqG CDEusSgEVqK35OiqMs0MaFu8mGoDTx3zthcUJ4GvxBLSEL5zOMw7TjH9btb+nfCWBaxO P26A== X-Gm-Message-State: AOPr4FU4jIVipdN7W8rFhgG8B/N9Nldm+OlzIwag00FOkkQxdjMGdfSfXJEt6elgjEbryg== X-Received: by 10.202.85.198 with SMTP id j189mr2961237oib.111.1462325469424; Tue, 03 May 2016 18:31:09 -0700 (PDT) Received: from brown.lan (ip70-189-80-78.ok.ok.cox.net. [70.189.80.78]) by smtp.gmail.com with ESMTPSA id mz4sm533150obb.20.2016.05.03.18.31.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 May 2016 18:31:08 -0700 (PDT) From: "L. D. Pinney" To: LEDE Development List Subject: [PATCH] generic: Colorize the command line prompt Date: Tue, 3 May 2016 20:33:50 -0500 Message-Id: <1462325630-18332-1-git-send-email-ldpinney@gmail.com> X-Mailer: git-send-email 2.8.0.rc3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160503_183132_010039_5336BE30 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4003:c06:0:0:0:22f listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ldpinney[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "L . D . Pinney" MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patch colorizes the command line prompt Signed-off-by: L. D. Pinney --- package/base-files/files/etc/profile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index ad8fe12..ccceb2f 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -9,7 +9,13 @@ fgrep -sq '/ overlay ro,' /proc/mounts && { export PATH="%PATH%" export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) export HOME=${HOME:-/root} -export PS1='\u@\h:\w\$ ' +#export PS1='\u@\h:\w\$ ' +export PS1='\t [\[\033[31;1m\]\u\[\033[0m\]@\[\033[32;1m\]\h\[\033\[0m\]:\[\033[33;1m\]$PWD\[\033[0m\]]\$ ' + +### COLORS ### +# 31 = red ; 32 = green ; 33 = yellow ; 34 = blue ; 35 = magenta ; 36 = cyan ; 37 = white ; 38 = black + + [ -x /bin/more ] || alias more=less [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi