From deef779cd27eb528cfd91aeb4c70d42c75fcbceb Mon Sep 17 00:00:00 2001
From: Renato Alves <alves.rjc@gmail.com>
Date: Mon, 12 Feb 2018 11:47:36 +0100
Subject: [PATCH] ENH Workaround tab-delimited alignment issues

---
 README.rst  | 2 +-
 bin/tabview | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.rst b/README.rst
index 3937ba7..872ab73 100644
--- a/README.rst
+++ b/README.rst
@@ -9,7 +9,7 @@ EMBL utilities
 
 ``docker_wrap.sh`` - a convenience script to start a container that shares the user's home and creates a user to ensure consistent permissions.
 
-``tabview`` and ``csvview`` - quick preview of tab and csv delimited files. Aligns columns based on content. Works fine with streams and large files. Uses xpipe. Limitations of UNIX's ``column -t`` still apply.
+``tabview`` and ``csvview`` - quick preview of tab and csv delimited files. Aligns columns based on content. Works fine with streams and large files. Uses xpipe. ``tabview`` converts tabs to ``¬`` (seldomly used character) to workaround https://github.com/karelzak/util-linux/issues/575
 
 ``xpipe`` - like xargs but for splitting large or infinite streams into chunks and execute commands on them.
 
diff --git a/bin/tabview b/bin/tabview
index ec66fbf..788f3a3 100755
--- a/bin/tabview
+++ b/bin/tabview
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env bash
 ##
 # Preview tab-delimited files regardless of their size
 #
@@ -6,4 +6,4 @@
 # Licensed under MIT (https://en.wikipedia.org/wiki/MIT_License)
 ##
 
-xpipe 'column -t -s"	"' -f "$1" | less -S
+xpipe 'column -t -s"¬"' -f <(sed 's/\t/¬/g' "$1") | less -S
-- 
GitLab