To answer your exact question would be ls -1A .
which displays files, directories, and hidden files/directories, does not use any pipes or external tools (grep/tr/cut..), and does not rely on turning on or off any shell globbing options such as extglob, globstar, or nullglob. I have tested it to verify that statement.
-1 list one file per line. Avoid '\n' with -q or -b
-A, --almost-all do not list implied . and ..
Example output:
user@host:/dir$ ls -1A .
temp
terraform
.test
tor
torrent-stuff
.Trash-1000
virtual_appliance
visualblind
vpn-ipv4.txt
vpn-ipv6.txt
zztestfile
.zztestfile2
As a side note, here is what I keep in my .bash_aliases relating to listing dirs/files:
# ls directories
alias lsd2='ls -d */'
alias lsd3='ls -p . | grep -E "/$" | tr -d "/"'
alias lsd4='ls -lA | grep -E "^d"'
alias lsd5='ls -pv . | grep -E "/$" | tr -d "/"'
alias lsd='ls -lAd */'
# ls files
alias lsf='ls -pA | grep -vE "/$"'
alias lsf2='ls -p | grep -v "/"'
alias lsf3='ls -p . | grep "/" | tr -d "/"'
alias lsf4='ls -lA | grep -vE "^d"'
# ls normal
alias lsnormal='ls -lAh1d *'
alias lsnormal2='ls -1 .'
ls -l | tail -n+2
, for the rest I do not have an answer.lsl
. Just 3 letters ;) oh and ls -lh shows me 1.2K styled sizes.