cd with ls show last 10 entries
This commit is contained in:
parent
c665e70f83
commit
7807182d18
1 changed files with 2 additions and 2 deletions
|
|
@ -69,8 +69,8 @@
|
|||
|
||||
local -a lines
|
||||
mapfile -t lines < <(command ls --color=always --quoting-style=shell-escape -lArth)
|
||||
if (( ''${#lines[@]} > 5 )); then
|
||||
printf '\033[7m... %d more entries ...\033[27m\n' "$(( ''${#lines[@]} - 5 ))";
|
||||
if (( ''${#lines[@]} > 10 )); then
|
||||
printf '\033[7m... %d more entries ...\033[27m\n' "$(( ''${#lines[@]} - 10 ))";
|
||||
printf '%s\n' "''${lines[@]: -4}"
|
||||
else
|
||||
printf '%s\n' "''${lines[@]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue