From 344e1e35c28049e100d5f27d0bd904168af733ec Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 12 Aug 2018 20:21:42 +0200 Subject: [PATCH] Add colors and improve alignment in the list display --- goto.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/goto.sh b/goto.sh index 2bf3de4..7a21754 100644 --- a/goto.sh +++ b/goto.sh @@ -123,9 +123,11 @@ _goto_expand_directory() # Lists registered aliases. _goto_list_aliases() { - local IFS=$'\n' + local IFS=$' ' if [ -f "$GOTO_DB" ]; then - column -t "$GOTO_DB" 2>/dev/null + while read -r name directory; do + printf '\e[1;36m%20s \e[0m%s\n' "$name" "$directory" + done < "$GOTO_DB" else echo "You haven't configured any directory aliases yet." fi