please a more compact long format for small terminal
Opened this issue · 2 comments
v6cc commented
mikewaters commented
You could create functions to check terminal width first, here is from my ~/.zshrc
(its ugly code):
#
# Use `colorls` when the terminal is wide enough for it to not suck
#
function laaa () {
if [[ "$(tput cols)" -lt "100" ]] ; then
echo "hello"
ls -al
else
colorls -lA --sd --gs
fi
}
alias la='laaa'
function llll () {
if [[ "$(tput cols)" -lt "100" ]] ; then
ls -l
else
colorls -l --sd --gs
fi
}
alias ll='llll'
emmanuel-averty commented
If colorls allows to configure date format, one can save some space. For exemple :
rw-rw-r-- 1 emmanuel emmanuel 2 KiB 05/04/2022 Makefile
instead of
rw-rw-r-- 1 emmanuel emmanuel 2 KiB Tue Apr 5 10:30:26 2022 Makefile