ls : rework ll and lla.

This commit is contained in:
Dmitry Voronin 2023-11-30 01:45:48 +03:00
parent 538df0717d
commit d9414baaa2
2 changed files with 16 additions and 16 deletions

View file

@ -538,11 +538,11 @@ Command|Description
Command|Description
---|---
`l`|List files in current dir.
`ll`|List including hidden files.
`ll`|List files by mtime.
`lll [DEPTH] [DIRS]`|Show file tree.
`llll`|List everything recursively.
`la`|List alphabetically.
`laa`|List all alphabetically.
`la`|List all files.
`lla`|List all files by mtime.
## Name.

View file

@ -1,17 +1,17 @@
# unset possible system-defined aliases.
unalias l ll lll llll la laa &> /dev/null
unset l ll lll llll la laa &> /dev/null
unalias l ll lll llll la lla &> /dev/null
unset l ll lll llll la lla &> /dev/null
# list files in dir.
l()
{
ls -lhvt --si --group-directories-first "$@"
ls -lhv --si --group-directories-first "$@"
}
# list all files in dir, incl. hidden files.
# list last modified files first.
ll()
{
ls -lAhvt --si --group-directories-first "$@"
ls -lhvtr --si "$@"
}
# list files in tree structure.
@ -35,17 +35,17 @@ llll()
ls -RlAhv --si --group-directories-first "$@"
}
# list files alphabetically.
# list all files in dir, incl. hidden files.
la()
{
ls -lh --si --group-directories-first "$@"
}
# list all files alphabetically.
laa()
{
ls -lAh --si --group-directories-first "$@"
}
# list all files in dir, incl. hidden files, sorted by mtime.
lla()
{
ls -lAhtr --si "$@"
}
# export.
export -f l ll lll llll la laa
export -f l ll lll llll la lla