In Bash, if I press the tab key twice, then I see:
Display all 1092 possibilities? (y or n)
Snippet:
! diff ifconfig mount.fuse rcsdiff tiff2pdf
./ diff3 ifdown mount.ntfs-3g rcsmerge tiff2ps
: diffutils-cmp ifenslave mount.ntfs-fuse rdisc tiff2rgba
GET diffutils-diff iftop mountpoint rdjpgcom tiffcmp
HEAD diffutils-diff3 ifup msgattrib read tiffcp
MAKEDEV diffutils-sdiff ifup-local msgcat readelf tiffdiff
POST dig igawk msgcmp readlink tiffdither
[ dir igd-client msgcomm readonly tiffdump
--More--
I thought that if I searched for all the executable files in the directories in my $PATH environment variable, then that would produce a single column list matching the data that more displays.
Here’s my first attempt:
echo $PATH | sed -e 's/:/ /g' -e "s/^/find / " | sh > commandlist.txt
wc -l commandlist.txt
1114 commandlist.txt
So I added -xtype f and -perm /u=x but still don’t get 1092:
echo $PATH | sed -e 's/:/ /g' -e "s/^/find / " -e "s/$/ -xtype f -perm \/u=x/" | sh | wc -l
1107
How does double tab key press in Bash generate its total ‘possibilities’ value?
this seems to work:
on my machine it shows the same number as the tab complete thing.