mirror of
https://github.com/iridakos/goto.git
synced 2025-05-16 23:40:16 -07:00
Merge pull request #40 from Calinou/add-colors-to-list
Add colors and improve alignment in the list display
This commit is contained in:
commit
9d63b297df
6
goto.sh
6
goto.sh
@ -123,9 +123,11 @@ _goto_expand_directory()
|
|||||||
# Lists registered aliases.
|
# Lists registered aliases.
|
||||||
_goto_list_aliases()
|
_goto_list_aliases()
|
||||||
{
|
{
|
||||||
local IFS=$'\n'
|
local IFS=$' '
|
||||||
if [ -f "$GOTO_DB" ]; then
|
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
|
else
|
||||||
echo "You haven't configured any directory aliases yet."
|
echo "You haven't configured any directory aliases yet."
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user