From b347fb0dcc5769b9a8109984848467c76a85e9f6 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 2 Nov 2016 22:23:12 +0100 Subject: [PATCH 1/3] autofix for new installs --- fix_stderrlib.py | 8 ++++++++ zshrc | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 fix_stderrlib.py mode change 100755 => 100644 zshrc diff --git a/fix_stderrlib.py b/fix_stderrlib.py new file mode 100644 index 0000000..badc8e9 --- /dev/null +++ b/fix_stderrlib.py @@ -0,0 +1,8 @@ +import os + +rc = open("zshrc",'w+') +old = open("zshrc_old",'r') +for line in old: + if line.startswith("LD_PRELOAD="): + line = "LD_PRELOAD='"+os.getcwd()+"'" + rc.write(line) diff --git a/zshrc b/zshrc old mode 100755 new mode 100644 index c157ed0..aeeafbb --- a/zshrc +++ b/zshrc @@ -5,8 +5,7 @@ PS1=$'%F{yellow}%m%f%F{red}:%f%F{cyan}%~%f\n'$CMD_START #promt #coloring stderr, causes problems in output odering #exec 2>>( while IFS='' read X; do print "\e[91m${X}\e[0m" > /dev/tty; done & ) #better by rudi_s -LD_PRELOAD='/home/cip/2013/ik15ydit/.config/libcoloredstderr.so' -COLORED_STDERR_FDS=2, +LD_PRELOAD='/home/ik15ydit/.config'COLORED_STDERR_FDS=2, export LD_PRELOAD COLORED_STDERR_FDS #seperation string between commands From bbd0a0b37bc75378108c4b81ffa0afdb2cb2f0b5 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 2 Nov 2016 22:54:57 +0100 Subject: [PATCH 2/3] fixed newline --- fix_stderrlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix_stderrlib.py b/fix_stderrlib.py index badc8e9..c5f99d0 100644 --- a/fix_stderrlib.py +++ b/fix_stderrlib.py @@ -4,5 +4,5 @@ rc = open("zshrc",'w+') old = open("zshrc_old",'r') for line in old: if line.startswith("LD_PRELOAD="): - line = "LD_PRELOAD='"+os.getcwd()+"'" + line = "LD_PRELOAD='"+os.getcwd()+"'\n" rc.write(line) From e8ba8804c317c17e3233a631bdb4e691834d5769 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 2 Nov 2016 22:57:01 +0100 Subject: [PATCH 3/3] another bug with LDpreload --- fix_stderrlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix_stderrlib.py b/fix_stderrlib.py index c5f99d0..d93ef9e 100644 --- a/fix_stderrlib.py +++ b/fix_stderrlib.py @@ -4,5 +4,5 @@ rc = open("zshrc",'w+') old = open("zshrc_old",'r') for line in old: if line.startswith("LD_PRELOAD="): - line = "LD_PRELOAD='"+os.getcwd()+"'\n" + line = "LD_PRELOAD='"+os.getcwd()+"/libcoloredstderr.so'\n" rc.write(line)