From 4c905dfd1f0c754da7aff5e8bc01c1254b92f99f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 3 May 2011 17:12:27 +0200 Subject: Add invert-colours function --- etc/functions/invert-colours | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 etc/functions/invert-colours (limited to 'etc/functions') diff --git a/etc/functions/invert-colours b/etc/functions/invert-colours new file mode 100644 index 0000000..cf2a909 --- /dev/null +++ b/etc/functions/invert-colours @@ -0,0 +1,5 @@ +if [[ ${PS1} == '%F{black}'* ]] { + PS1=${${${PS1//\%K/%F}//white/default}#\%K\{black\}} +} else { + PS1='%F{black}'${${PS1//\%F/%K}//default/white} +} -- cgit v1.2.3