From 9ad22a15f9e485bec2183a829eb1ed01a448ab49 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 16 Sep 2023 11:19:08 +0200 Subject: [PATCH] .bashrc: +compatibility with Alpine Linux: ls !-bF --- .bashrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 0696bcf..0ead09c 100644 --- a/.bashrc +++ b/.bashrc @@ -128,8 +128,13 @@ unalias 2>/dev/null fgrep # /etc/profile.d/colorgrep.sh # `eval': eval ' function grep {(unset grep; ( ulimitme; grep "$@"; ); );} - function ls {(unset ls; ( ls -bF "$@"; ); );} - function l { ls -lbF "$@"; } + if ls -d -bF / &>/dev/null;then + function ls {(unset ls; ( ls -bF "$@"; ); );} + else + # Alpine Linux + function ls {(unset ls; ( ls "$@"; ); );} + fi + function l { ls -l "$@"; } if which vim &>/dev/null;then alias vi="vim" else -- 1.8.3.1