/
snap
/
core18
/
2979
/
usr
/
share
/
bash-completion
/
completions
/
/snap/core18/2979/usr/share/bash-completion/completions
mkdir
upload
Name
Size
Mode
Actions
2to3
918
0644
edit
dl
rm
7z
3894
0644
edit
dl
rm
7za
3894
0644
edit
dl
rm
a2x
898
0644
edit
dl
rm
abook
1219
0644
edit
dl
rm
aclocal
850
0644
edit
dl
rm
aclocal-1.10
850
0644
edit
dl
rm
aclocal-1.11
850
0644
edit
dl
rm
aclocal-1.12
850
0644
edit
dl
rm
aclocal-1.13
850
0644
edit
dl
rm
aclocal-1.14
850
0644
edit
dl
rm
aclocal-1.15
850
0644
edit
dl
rm
acpi
446
0644
edit
dl
rm
addpart
447
0644
edit
dl
rm
add_members
765
0644
edit
dl
rm
alias
494
0644
edit
dl
rm
alpine
881
0644
edit
dl
rm
alternatives
2531
0644
edit
dl
rm
animate
9109
0644
edit
dl
rm
ant
2584
0644
edit
dl
rm
apache2ctl
382
0644
edit
dl
rm
appdata-validate
796
0644
edit
dl
rm
apropos
2727
0644
edit
dl
rm
apt-build
1468
0644
edit
dl
rm
apt-cache
2018
0644
edit
dl
rm
apt-get
3121
0644
edit
dl
rm
aptitude
3080
0644
edit
dl
rm
aptitude-curses
3080
0644
edit
dl
rm
arch
1089
0644
edit
dl
rm
arm-koji
6365
0644
edit
dl
rm
arping
599
0644
edit
dl
rm
arpspoof
568
0644
edit
dl
rm
asciidoc
1166
0644
edit
dl
rm
asciidoc.py
1166
0644
edit
dl
rm
aspell
3390
0644
edit
dl
rm
autoconf
953
0644
edit
dl
rm
autoheader
1015
0644
edit
dl
rm
automake
874
0644
edit
dl
rm
automake-1.10
874
0644
edit
dl
rm
automake-1.11
874
0644
edit
dl
rm
automake-1.12
874
0644
edit
dl
rm
automake-1.13
874
0644
edit
dl
rm
automake-1.14
874
0644
edit
dl
rm
automake-1.15
874
0644
edit
dl
rm
autoreconf
1015
0644
edit
dl
rm
autorpm
350
0644
edit
dl
rm
autoscan
733
0644
edit
dl
rm
autossh
12291
0644
edit
dl
rm
autoupdate
733
0644
edit
dl
rm
avctrl
475
0644
edit
dl
rm
badblocks
714
0644
edit
dl
rm
bind
856
0644
edit
dl
rm
bk
433
0644
edit
dl
rm
blkdiscard
639
0644
edit
dl
rm
blkid
2094
0644
edit
dl
rm
blockdev
726
0644
edit
dl
rm
bootctl
1975
0644
edit
dl
rm
brctl
1049
0644
edit
dl
rm
btdownloadcurses.py
1060
0644
edit
dl
rm
btdownloadgui.py
1060
0644
edit
dl
rm
btdownloadheadless.py
1060
0644
edit
dl
rm
busctl
7815
0644
edit
dl
rm
bzip2
1090
0644
edit
dl
rm
c++
2199
0644
edit
dl
rm
cancel
293
0644
edit
dl
rm
cardctl
382
0644
edit
dl
rm
cc
2199
0644
edit
dl
rm
ccache
1015
0644
edit
dl
rm
ccze
1162
0644
edit
dl
rm
cdrecord
3624
0644
edit
dl
rm
cfagent
423
0644
edit
dl
rm
cfrun
1292
0644
edit
dl
rm
chage
580
0644
edit
dl
rm
change_pw
531
0644
edit
dl
rm
chcpu
1510
0644
edit
dl
rm
checksec
742
0644
edit
dl
rm
check_db
376
0644
edit
dl
rm
check_perms
321
0644
edit
dl
rm
chgrp
951
0644
edit
dl
rm
chkconfig
909
0644
edit
dl
rm
chmem
501
0644
edit
dl
rm
chown
1112
0644
edit
dl
rm
chpasswd
601
0644
edit
dl
rm
chronyc
1576
0644
edit
dl
rm
chrpath
522
0644
edit
dl
rm
chrt
920
0644
edit
dl
rm
ci
893
0644
edit
dl
rm
ciptool
9756
0644
edit
dl
rm
civclient
705
0644
edit
dl
rm
civserver
477
0644
edit
dl
rm
cksfv
521
0644
edit
dl
rm
cleanarch
354
0644
edit
dl
rm
clisp
670
0644
edit
dl
rm
clone_member
542
0644
edit
dl
rm
cloud-init
3471
0644
edit
dl
rm
clzip
1146
0644
edit
dl
rm
co
893
0644
edit
dl
rm
colormake
6183
0644
edit
dl
rm
compare
9109
0644
edit
dl
rm
compgen
1478
0644
edit
dl
rm
complete
1478
0644
edit
dl
rm
composite
9109
0644
edit
dl
rm
configure
1192
0644
edit
dl
rm
config_list
582
0644
edit
dl
rm
conjure
9109
0644
edit
dl
rm
convert
9109
0644
edit
dl
rm
cowsay
549
0644
edit
dl
rm
cowthink
549
0644
edit
dl
rm
cpan2dist
1226
0644
edit
dl
rm
cpio
2914
0644
edit
dl
rm
cppcheck
2607
0644
edit
dl
rm
createdb
4627
0644
edit
dl
rm
createuser
4627
0644
edit
dl
rm
crontab
1186
0644
edit
dl
rm
cryptsetup
2655
0644
edit
dl
rm
ctrlaltdel
335
0644
edit
dl
rm
curl
2984
0644
edit
dl
rm
cvs
11860
0644
edit
dl
rm
cvsps
1505
0644
edit
dl
rm
dcop
383
0644
edit
dl
rm
dd
1300
0644
edit
dl
rm
declare
1296
0644
edit
dl
rm
deja-dup
699
0644
edit
dl
rm
delpart
526
0644
edit
dl
rm
desktop-file-validate
476
0644
edit
dl
rm
dfutool
9756
0644
edit
dl
rm
dhclient
594
0644
edit
dl
rm
dict
1875
0644
edit
dl
rm
display
9109
0644
edit
dl
rm
dmesg
1182
0644
edit
dl
rm
dnsspoof
504
0644
edit
dl
rm
dot
1293
0644
edit
dl
rm
dpkg
4115
0644
edit
dl
rm
dpkg-deb
4115
0644
edit
dl
rm
dpkg-query
4115
0644
edit
dl
rm
dpkg-reconfigure
4115
0644
edit
dl
rm
dpkg-source
3343
0644
edit
dl
rm
dropdb
4627
0644
edit
dl
rm
dropuser
4627
0644
edit
dl
rm
dselect
666
0644
edit
dl
rm
dsniff
516
0644
edit
dl
rm
dumpdb
373
0644
edit
dl
rm
dumpe2fs
520
0644
edit
dl
rm
e2freefrag
462
0644
edit
dl
rm
e2label
292
0644
edit
dl
rm
ebtables
3720
0644
edit
dl
rm
edquota
3710
0644
edit
dl
rm
eog
652
0644
edit
dl
rm
ether-wake
531
0644
edit
dl
rm
evince
952
0644
edit
dl
rm
explodepkg
152
0644
edit
dl
rm
export
1632
0644
edit
dl
rm
f77
2199
0644
edit
dl
rm
f95
2199
0644
edit
dl
rm
faillog
629
0644
edit
dl
rm
fallocate
721
0644
edit
dl
rm
fbgs
1573
0644
edit
dl
rm
fbi
1829
0644
edit
dl
rm
fdformat
566
0644
edit
dl
rm
feh
4146
0644
edit
dl
rm
file
734
0644
edit
dl
rm
file-roller
1094
0644
edit
dl
rm
filebucket
9793
0644
edit
dl
rm
filefrag
354
0644
edit
dl
rm
filesnarf
451
0644
edit
dl
rm
find
3906
0644
edit
dl
rm
findfs
695
0644
edit
dl
rm
findmnt
3154
0644
edit
dl
rm
find_member
537
0644
edit
dl
rm
flake8
985
0644
edit
dl
rm
flock
874
0644
edit
dl
rm
freebsd-update
587
0644
edit
dl
rm
freeciv-gtk2
705
0644
edit
dl
rm
freeciv-sdl
705
0644
edit
dl
rm
freeciv-server
477
0644
edit
dl
rm
freeciv-xaw
705
0644
edit
dl
rm
fsck
787
0644
edit
dl
rm
fsck.cramfs
684
0644
edit
dl
rm
fsck.minix
383
0644
edit
dl
rm
fsfreeze
524
0644
edit
dl
rm
fstrim
677
0644
edit
dl
rm
function
1296
0644
edit
dl
rm
fusermount
649
0644
edit
dl
rm
g++
2199
0644
edit
dl
rm
g4
1481
0644
edit
dl
rm
g77
2199
0644
edit
dl
rm
g95
2199
0644
edit
dl
rm
gcc
2199
0644
edit
dl
rm
gcj
2199
0644
edit
dl
rm
gcl
617
0644
edit
dl
rm
gdb
1653
0644
edit
dl
rm
genaliases
324
0644
edit
dl
rm
gendiff
267
0644
edit
dl
rm
genisoimage
869
0644
edit
dl
rm
geoiplookup
681
0644
edit
dl
rm
geoiplookup6
681
0644
edit
dl
rm
getconf
789
0644
edit
dl
rm
getent
1999
0644
edit
dl
rm
getopt
815
0644
edit
dl
rm
gfortran
2199
0644
edit
dl
rm
gkrellm
919
0644
edit
dl
rm
gkrellm2
919
0644
edit
dl
rm
gm
858
0644
edit
dl
rm
gmake
6183
0644
edit
dl
rm
gmplayer
11328
0644
edit
dl
rm
gnatmake
1017
0644
edit
dl
rm
gnokii
6976
0644
edit
dl
rm
gnome-mplayer
962
0644
edit
dl
rm
gnumake
6183
0644
edit
dl
rm
gpasswd
605
0644
edit
dl
rm
gpc
2199
0644
edit
dl
rm
gpg
1277
0644
edit
dl
rm
gpg2
1338
0644
edit
dl
rm
gphoto2
1405
0644
edit
dl
rm
gprof
1899
0644
edit
dl
rm
groupadd
611
0644
edit
dl
rm
groupdel
542
0644
edit
dl
rm
groupmems
611
0644
edit
dl
rm
groupmod
686
0644
edit
dl
rm
growisofs
896
0644
edit
dl
rm
grpck
345
0644
edit
dl
rm
gzip
1186
0644
edit
dl
rm
hciattach
9756
0644
edit
dl
rm
hciconfig
9756
0644
edit
dl
rm
hcitool
9756
0644
edit
dl
rm
hd
702
0644
edit
dl
rm
hddtemp
866
0644
edit
dl
rm
hid2hci
350
0644
edit
dl
rm
host
2022
0644
edit
dl
rm
hostname
479
0644
edit
dl
rm
hostnamectl
2278
0644
edit
dl
rm
hping
772
0644
edit
dl
rm
hping2
772
0644
edit
dl
rm
hping3
772
0644
edit
dl
rm
htop
797
0644
edit
dl
rm
htpasswd
920
0644
edit
dl
rm
hwclock
938
0644
edit
dl
rm
iconv
847
0644
edit
dl
rm
id
441
0644
edit
dl
rm
identify
9109
0644
edit
dl
rm
idn
653
0644
edit
dl
rm
ifdown
387
0644
edit
dl
rm
ifstatus
387
0644
edit
dl
rm
iftop
508
0644
edit
dl
rm
ifup
387
0644
edit
dl
rm
import
9109
0644
edit
dl
rm
info
1920
0644
edit
dl
rm
inject
510
0644
edit
dl
rm
insmod
521
0644
edit
dl
rm
insmod.static
521
0644
edit
dl
rm
installpkg
737
0644
edit
dl
rm
interdiff
762
0644
edit
dl
rm
invoke-rc.d
1231
0644
edit
dl
rm
ionice
1161
0644
edit
dl
rm
ip
10591
0644
edit
dl
rm
ipcmk
576
0644
edit
dl
rm
ipcrm
1423
0644
edit
dl
rm
ipcs
514
0644
edit
dl
rm
iperf
1728
0644
edit
dl
rm
ipmitool
5870
0644
edit
dl
rm
ipsec
3222
0644
edit
dl
rm
iptables
2002
0644
edit
dl
rm
ipv6calc
1383
0644
edit
dl
rm
iscsiadm
1907
0644
edit
dl
rm
isosize
529
0644
edit
dl
rm
isql
354
0644
edit
dl
rm
iwconfig
2841
0644
edit
dl
rm
iwlist
617
0644
edit
dl
rm
iwpriv
743
0644
edit
dl
rm
iwspy
488
0644
edit
dl
rm
jar
501
0644
edit
dl
rm
jarsigner
1661
0644
edit
dl
rm
java
8614
0644
edit
dl
rm
javac
8614
0644
edit
dl
rm
javadoc
8614
0644
edit
dl
rm
javaws
774
0644
edit
dl
rm
journalctl
5879
0644
edit
dl
rm
jpegoptim
865
0644
edit
dl
rm
jps
597
0644
edit
dl
rm
jshint
894
0644
edit
dl
rm
k3b
1160
0644
edit
dl
rm
kcov
1773
0644
edit
dl
rm
kernel-install
1836
0644
edit
dl
rm
kill
579
0644
edit
dl
rm
killall
762
0644
edit
dl
rm
kldload
477
0644
edit
dl
rm
kldunload
374
0644
edit
dl
rm
kmod
3235
0644
edit
dl
rm
koji
6365
0644
edit
dl
rm
kplayer
11328
0644
edit
dl
rm
ktutil
3015
0644
edit
dl
rm
l2ping
9756
0644
edit
dl
rm
larch
1983
0644
edit
dl
rm
last
949
0644
edit
dl
rm
lastlog
566
0644
edit
dl
rm
lbzip2
1090
0644
edit
dl
rm
ldapadd
4496
0644
edit
dl
rm
ldapcompare
4496
0644
edit
dl
rm
ldapdelete
4496
0644
edit
dl
rm
ldapmodify
4496
0644
edit
dl
rm
ldapmodrdn
4496
0644
edit
dl
rm
ldappasswd
4496
0644
edit
dl
rm
ldapsearch
4496
0644
edit
dl
rm
ldapvi
1389
0644
edit
dl
rm
ldapwhoami
4496
0644
edit
dl
rm
ldattach
1472
0644
edit
dl
rm
lftp
689
0644
edit
dl
rm
lftpget
309
0644
edit
dl
rm
lilo
1194
0644
edit
dl
rm
links
989
0644
edit
dl
rm
lintian
5259
0644
edit
dl
rm
lintian-info
5259
0644
edit
dl
rm
lisp
635
0644
edit
dl
rm
list_admins
387
0644
edit
dl
rm
list_lists
471
0644
edit
dl
rm
list_members
858
0644
edit
dl
rm
list_owners
413
0644
edit
dl
rm
localectl
3736
0644
edit
dl
rm
logger
1553
0644
edit
dl
rm
loginctl
4248
0644
edit
dl
rm
losetup
1721
0644
edit
dl
rm
lpq
602
0644
edit
dl
rm
lpr
914
0644
edit
dl
rm
lrzip
1137
0644
edit
dl
rm
lsblk
1961
0644
edit
dl
rm
lscpu
1018
0644
edit
dl
rm
lsipc
1310
0644
edit
dl
rm
lslocks
1069
0644
edit
dl
rm
lslogins
1704
0644
edit
dl
rm
lsmem
1054
0644
edit
dl
rm
lsns
1167
0644
edit
dl
rm
lsof
1393
0644
edit
dl
rm
lsscsi
576
0644
edit
dl
rm
lsusb
413
0644
edit
dl
rm
lua
434
0644
edit
dl
rm
luac
486
0644
edit
dl
rm
luseradd
999
0644
edit
dl
rm
luserdel
474
0644
edit
dl
rm
lusermod
999
0644
edit
dl
rm
lvchange
19978
0644
edit
dl
rm
lvcreate
19978
0644
edit
dl
rm
lvdisplay
19978
0644
edit
dl
rm
lvextend
19978
0644
edit
dl
rm
lvm
19978
0644
edit
dl
rm
lvmdiskscan
19978
0644
edit
dl
rm
lvreduce
19978
0644
edit
dl
rm
lvremove
19978
0644
edit
dl
rm
lvrename
19978
0644
edit
dl
rm
lvresize
19978
0644
edit
dl
rm
lvs
19978
0644
edit
dl
rm
lvscan
19978
0644
edit
dl
rm
lz4
1218
0644
edit
dl
rm
lz4c
1218
0644
edit
dl
rm
lzip
1146
0644
edit
dl
rm
lzma
1038
0644
edit
dl
rm
lzop
1492
0644
edit
dl
rm
macof
429
0644
edit
dl
rm
mailmanctl
469
0644
edit
dl
rm
mailsnarf
451
0644
edit
dl
rm
make
6183
0644
edit
dl
rm
makepkg
534
0644
edit
dl
rm
man
2727
0644
edit
dl
rm
mc
842
0644
edit
dl
rm
mcookie
599
0644
edit
dl
rm
mcrypt
1850
0644
edit
dl
rm
mdadm
4492
0644
edit
dl
rm
mdecrypt
1850
0644
edit
dl
rm
mdtool
2127
0644
edit
dl
rm
medusa
685
0644
edit
dl
rm
mencoder
11328
0644
edit
dl
rm
mesg
412
0644
edit
dl
rm
micropython
1683
0644
edit
dl
rm
mii-diag
657
0644
edit
dl
rm
mii-tool
847
0644
edit
dl
rm
minicom
1005
0644
edit
dl
rm
mkfs
638
0644
edit
dl
rm
mkfs.bfs
656
0644
edit
dl
rm
mkfs.cramfs
821
0644
edit
dl
rm
mkfs.minix
714
0644
edit
dl
rm
mkinitrd
1221
0644
edit
dl
rm
mkisofs
869
0644
edit
dl
rm
mkswap
841
0644
edit
dl
rm
mktemp
669
0644
edit
dl
rm
mmsitepass
330
0644
edit
dl
rm
modinfo
1100
0644
edit
dl
rm
modprobe
3433
0644
edit
dl
rm
mogrify
9109
0644
edit
dl
rm
monodevelop
446
0644
edit
dl
rm
montage
9109
0644
edit
dl
rm
more
528
0644
edit
dl
rm
mount
1630
0644
edit
dl
rm
mount.linux
10613
0644
edit
dl
rm
mountpoint
487
0644
edit
dl
rm
mplayer
11328
0644
edit
dl
rm
mplayer2
11328
0644
edit
dl
rm
mr
2521
0644
edit
dl
rm
msgsnarf
451
0644
edit
dl
rm
msynctool
1357
0644
edit
dl
rm
mtx
1186
0644
edit
dl
rm
munin-node-configure
758
0644
edit
dl
rm
munin-run
651
0644
edit
dl
rm
munin-update
654
0644
edit
dl
rm
munindoc
322
0644
edit
dl
rm
mussh
1191
0644
edit
dl
rm
mutt
4330
0644
edit
dl
rm
muttng
4330
0644
edit
dl
rm
mysql
2548
0644
edit
dl
rm
mysqladmin
1588
0644
edit
dl
rm
namei
500
0644
edit
dl
rm
nc
1101
0644
edit
dl
rm
ncal
886
0644
edit
dl
rm
ncftp
629
0644
edit
dl
rm
nethogs
564
0644
edit
dl
rm
netplan
988
0644
edit
dl
rm
networkctl
2294
0644
edit
dl
rm
newlist
575
0644
edit
dl
rm
newusers
677
0644
edit
dl
rm
ngrep
779
0644
edit
dl
rm
nmap
1854
0644
edit
dl
rm
nproc
475
0644
edit
dl
rm
nsenter
1171
0644
edit
dl
rm
nslookup
2022
0644
edit
dl
rm
ntpdate
723
0644
edit
dl
rm
oggdec
848
0644
edit
dl
rm
openssl
11508
0644
edit
dl
rm
opera
1392
0644
edit
dl
rm
optipng
1190
0644
edit
dl
rm
p4
1481
0644
edit
dl
rm
pack200
2222
0644
edit
dl
rm
partx
1249
0644
edit
dl
rm
passwd
497
0644
edit
dl
rm
patch
1754
0644
edit
dl
rm
pbzip2
1090
0644
edit
dl
rm
pccardctl
382
0644
edit
dl
rm
pdftotext
932
0644
edit
dl
rm
pdlzip
1146
0644
edit
dl
rm
perl
3513
0644
edit
dl
rm
perldoc
3513
0644
edit
dl
rm
perltidy
1276
0644
edit
dl
rm
pgrep
1211
0644
edit
dl
rm
phing
2584
0644
edit
dl
rm
pidof
510
0644
edit
dl
rm
pigz
1186
0644
edit
dl
rm
pine
881
0644
edit
dl
rm
pinfo
1920
0644
edit
dl
rm
ping
1942
0644
edit
dl
rm
ping6
1942
0644
edit
dl
rm
pivot_root
387
0644
edit
dl
rm
pkg-config
1304
0644
edit
dl
rm
pkg-get
2142
0644
edit
dl
rm
pkgadd
1742
0644
edit
dl
rm
pkgrm
1071
0644
edit
dl
rm
pkgtool
850
0644
edit
dl
rm
pkgutil
4014
0644
edit
dl
rm
pkg_deinstall
502
0644
edit
dl
rm
pkg_delete
502
0644
edit
dl
rm
pkg_info
502
0644
edit
dl
rm
pkill
1211
0644
edit
dl
rm
plague-client
415
0644
edit
dl
rm
plzip
1146
0644
edit
dl
rm
pm-hibernate
323
0644
edit
dl
rm
pm-is-supported
336
0644
edit
dl
rm
pm-powersave
282
0644
edit
dl
rm
pm-suspend
323
0644
edit
dl
rm
pm-suspend-hybrid
323
0644
edit
dl
rm
pmake
6183
0644
edit
dl
rm
pngfix
799
0644
edit
dl
rm
portinstall
915
0644
edit
dl
rm
portsnap
493
0644
edit
dl
rm
portupgrade
479
0644
edit
dl
rm
postalias
1009
0644
edit
dl
rm
postcat
933
0644
edit
dl
rm
postconf
850
0644
edit
dl
rm
postfix
675
0644
edit
dl
rm
postmap
1009
0644
edit
dl
rm
postsuper
1748
0644
edit
dl
rm
povray
1984
0644
edit
dl
rm
ppc-koji
6365
0644
edit
dl
rm
prelink
915
0644
edit
dl
rm
prlimit
1329
0644
edit
dl
rm
protoc
1529
0644
edit
dl
rm
psql
4627
0644
edit
dl
rm
puppet
9793
0644
edit
dl
rm
puppetca
9793
0644
edit
dl
rm
puppetd
9793
0644
edit
dl
rm
puppetdoc
9793
0644
edit
dl
rm
puppetmasterd
9793
0644
edit
dl
rm
puppetqd
9793
0644
edit
dl
rm
puppetrun
9793
0644
edit
dl
rm
pv
719
0644
edit
dl
rm
pvchange
19978
0644
edit
dl
rm
pvcreate
19978
0644
edit
dl
rm
pvdisplay
19978
0644
edit
dl
rm
pvmove
19978
0644
edit
dl
rm
pvremove
19978
0644
edit
dl
rm
pvs
19978
0644
edit
dl
rm
pvscan
19978
0644
edit
dl
rm
pwck
342
0644
edit
dl
rm
pwd
453
0644
edit
dl
rm
pwdx
485
0644
edit
dl
rm
pwgen
586
0644
edit
dl
rm
pxz
1599
0644
edit
dl
rm
py.test
1781
0644
edit
dl
rm
py.test-2
1781
0644
edit
dl
rm
py.test-3
1781
0644
edit
dl
rm
pycodestyle
732
0644
edit
dl
rm
pydoc
989
0644
edit
dl
rm
pydoc3
989
0644
edit
dl
rm
pyflakes
445
0644
edit
dl
rm
pylint
2517
0644
edit
dl
rm
pylint-2
2517
0644
edit
dl
rm
pylint-3
2517
0644
edit
dl
rm
pypy
1683
0644
edit
dl
rm
pypy3
1683
0644
edit
dl
rm
python
1683
0644
edit
dl
rm
python2
1683
0644
edit
dl
rm
python3
1683
0644
edit
dl
rm
pyvenv
428
0644
edit
dl
rm
pyvenv-3.4
428
0644
edit
dl
rm
pyvenv-3.5
428
0644
edit
dl
rm
qdbus
383
0644
edit
dl
rm
qemu
3357
0644
edit
dl
rm
qemu-kvm
3357
0644
edit
dl
rm
qemu-system-i386
3357
0644
edit
dl
rm
qemu-system-x86_64
3357
0644
edit
dl
rm
qrunner
393
0644
edit
dl
rm
querybts
1088
0644
edit
dl
rm
quota
3710
0644
edit
dl
rm
quotacheck
3710
0644
edit
dl
rm
quotaoff
3710
0644
edit
dl
rm
quotaon
3710
0644
edit
dl
rm
radvdump
498
0644
edit
dl
rm
ralsh
9793
0644
edit
dl
rm
raw
482
0644
edit
dl
rm
rcs
893
0644
edit
dl
rm
rcsdiff
893
0644
edit
dl
rm
rdesktop
1702
0644
edit
dl
rm
rdict
1875
0644
edit
dl
rm
readprofile
679
0644
edit
dl
rm
removepkg
555
0644
edit
dl
rm
remove_members
571
0644
edit
dl
rm
renice
784
0644
edit
dl
rm
reportbug
2487
0644
edit
dl
rm
repquota
3710
0644
edit
dl
rm
resizepart
568
0644
edit
dl
rm
resolvconf
428
0644
edit
dl
rm
rev
432
0644
edit
dl
rm
rfcomm
9756
0644
edit
dl
rm
ri
3733
0644
edit
dl
rm
rlog
893
0644
edit
dl
rm
rmlist
365
0644
edit
dl
rm
rmmod
523
0644
edit
dl
rm
route
792
0644
edit
dl
rm
rpcdebug
1002
0644
edit
dl
rm
rpm
10339
0644
edit
dl
rm
rpm2targz
370
0644
edit
dl
rm
rpm2tgz
370
0644
edit
dl
rm
rpm2txz
370
0644
edit
dl
rm
rpmbuild
10339
0644
edit
dl
rm
rpmbuild-md5
10339
0644
edit
dl
rm
rpmcheck
514
0644
edit
dl
rm
rrdtool
440
0644
edit
dl
rm
rsync
3516
0644
edit
dl
rm
rtcwake
1081
0644
edit
dl
rm
runuser
864
0644
edit
dl
rm
s390-koji
6365
0644
edit
dl
rm
sbcl
677
0644
edit
dl
rm
sbcl-mt
677
0644
edit
dl
rm
sbopkg
1765
0644
edit
dl
rm
scp
12291
0644
edit
dl
rm
screen
2257
0644
edit
dl
rm
script
667
0644
edit
dl
rm
scriptreplay
625
0644
edit
dl
rm
sdptool
9756
0644
edit
dl
rm
setarch
790
0644
edit
dl
rm
setquota
3710
0644
edit
dl
rm
setsid
440
0644
edit
dl
rm
setterm
2591
0644
edit
dl
rm
sftp
12291
0644
edit
dl
rm
sh
874
0644
edit
dl
rm
sidedoor
12291
0644
edit
dl
rm
sitecopy
1319
0644
edit
dl
rm
slackpkg
3420
0644
edit
dl
rm
slapt-get
2431
0644
edit
dl
rm
slapt-src
1894
0644
edit
dl
rm
slogin
12291
0644
edit
dl
rm
smartctl
4575
0644
edit
dl
rm
smbcacls
7132
0644
edit
dl
rm
smbclient
7132
0644
edit
dl
rm
smbcquotas
7132
0644
edit
dl
rm
smbget
7132
0644
edit
dl
rm
smbpasswd
7132
0644
edit
dl
rm
smbtar
7132
0644
edit
dl
rm
smbtree
7132
0644
edit
dl
rm
snownews
367
0644
edit
dl
rm
sparc-koji
6365
0644
edit
dl
rm
spovray
1984
0644
edit
dl
rm
sqlite3
599
0644
edit
dl
rm
ss
1106
0644
edit
dl
rm
ssh
12291
0644
edit
dl
rm
ssh-add
501
0644
edit
dl
rm
ssh-copy-id
488
0644
edit
dl
rm
ssh-keygen
1729
0644
edit
dl
rm
sshfs
594
0644
edit
dl
rm
sshmitm
368
0644
edit
dl
rm
sshow
428
0644
edit
dl
rm
strace
3449
0644
edit
dl
rm
stream
9109
0644
edit
dl
rm
strings
1126
0644
edit
dl
rm
sudo
1306
0644
edit
dl
rm
sudoedit
1306
0644
edit
dl
rm
svcadm
5066
0644
edit
dl
rm
svk
8870
0644
edit
dl
rm
swaplabel
635
0644
edit
dl
rm
swapoff
743
0644
edit
dl
rm
swapon
1529
0644
edit
dl
rm
synclient
602
0644
edit
dl
rm
sync_members
734
0644
edit
dl
rm
sysbench
4133
0644
edit
dl
rm
sysctl
804
0644
edit
dl
rm
systemctl
13870
0644
edit
dl
rm
systemd-analyze
5009
0644
edit
dl
rm
systemd-cat
1949
0644
edit
dl
rm
systemd-cgls
2382
0644
edit
dl
rm
systemd-cgtop
2134
0644
edit
dl
rm
systemd-delta
1989
0644
edit
dl
rm
systemd-detect-virt
1399
0644
edit
dl
rm
systemd-path
1901
0644
edit
dl
rm
systemd-resolve
3103
0644
edit
dl
rm
systemd-run
4917
0644
edit
dl
rm
tar
19256
0644
edit
dl
rm
taskset
1207
0644
edit
dl
rm
tc
27047
0644
edit
dl
rm
tcpdump
1011
0644
edit
dl
rm
tcpkill
441
0644
edit
dl
rm
tcpnice
434
0644
edit
dl
rm
tightvncviewer
3203
0644
edit
dl
rm
timedatectl
2885
0644
edit
dl
rm
timeout
932
0644
edit
dl
rm
tipc
7327
0644
edit
dl
rm
tox
940
0644
edit
dl
rm
tracepath
510
0644
edit
dl
rm
tracepath6
510
0644
edit
dl
rm
tshark
3075
0644
edit
dl
rm
tune2fs
1650
0644
edit
dl
rm
typeset
1296
0644
edit
dl
rm
udevadm
3763
0644
edit
dl
rm
umount
957
0644
edit
dl
rm
umount.linux
4472
0644
edit
dl
rm
unace
480
0644
edit
dl
rm
unpack200
1251
0644
edit
dl
rm
unrar
614
0644
edit
dl
rm
unshare
792
0644
edit
dl
rm
unshunt
351
0644
edit
dl
rm
update-alternatives
2531
0644
edit
dl
rm
update-rc.d
2178
0644
edit
dl
rm
upgradepkg
811
0644
edit
dl
rm
urlsnarf
437
0644
edit
dl
rm
useradd
1250
0644
edit
dl
rm
userdel
539
0644
edit
dl
rm
usermod
1368
0644
edit
dl
rm
utmpdump
475
0644
edit
dl
rm
valgrind
3503
0644
edit
dl
rm
vgcfgbackup
19978
0644
edit
dl
rm
vgcfgrestore
19978
0644
edit
dl
rm
vgchange
19978
0644
edit
dl
rm
vgck
19978
0644
edit
dl
rm
vgconvert
19978
0644
edit
dl
rm
vgcreate
19978
0644
edit
dl
rm
vgdisplay
19978
0644
edit
dl
rm
vgexport
19978
0644
edit
dl
rm
vgextend
19978
0644
edit
dl
rm
vgimport
19978
0644
edit
dl
rm
vgmerge
19978
0644
edit
dl
rm
vgmknodes
19978
0644
edit
dl
rm
vgreduce
19978
0644
edit
dl
rm
vgremove
19978
0644
edit
dl
rm
vgrename
19978
0644
edit
dl
rm
vgs
19978
0644
edit
dl
rm
vgscan
19978
0644
edit
dl
rm
vgsplit
19978
0644
edit
dl
rm
vigr
432
0644
edit
dl
rm
vipw
432
0644
edit
dl
rm
vmstat
708
0644
edit
dl
rm
vncviewer
3203
0644
edit
dl
rm
vpnc
2339
0644
edit
dl
rm
wall
634
0644
edit
dl
rm
watch
1161
0644
edit
dl
rm
wdctl
1371
0644
edit
dl
rm
webmitm
368
0644
edit
dl
rm
wget
6631
0644
edit
dl
rm
whatis
2727
0644
edit
dl
rm
whereis
535
0644
edit
dl
rm
wine
509
0644
edit
dl
rm
wipefs
1192
0644
edit
dl
rm
withlist
413
0644
edit
dl
rm
wodim
3624
0644
edit
dl
rm
wol
1135
0644
edit
dl
rm
wsimport
1133
0644
edit
dl
rm
wtf
928
0644
edit
dl
rm
wvdial
1275
0644
edit
dl
rm
xdg-mime
2260
0644
edit
dl
rm
xdg-settings
768
0644
edit
dl
rm
xfreerdp
1073
0644
edit
dl
rm
xgamma
2058
0644
edit
dl
rm
xhost
376
0644
edit
dl
rm
xm
7608
0644
edit
dl
rm
xmllint
1065
0644
edit
dl
rm
xmlwf
699
0644
edit
dl
rm
xmms
663
0644
edit
dl
rm
xmodmap
486
0644
edit
dl
rm
xpovray
1984
0644
edit
dl
rm
xrandr
2187
0644
edit
dl
rm
xrdb
510
0644
edit
dl
rm
xsltproc
1248
0644
edit
dl
rm
xvnc4viewer
3203
0644
edit
dl
rm
xxd
471
0644
edit
dl
rm
xz
1599
0644
edit
dl
rm
xzdec
739
0644
edit
dl
rm
ypcat
768
0644
edit
dl
rm
ypmatch
768
0644
edit
dl
rm
yum-arch
360
0644
edit
dl
rm
zopfli
694
0644
edit
dl
rm
zopflipng
930
0644
edit
dl
rm
zramctl
1255
0644
edit
dl
rm
_cal
886
0644
edit
dl
rm
_chfn
238
0644
edit
dl
rm
_chsh
646
0644
edit
dl
rm
_dmesg
940
0644
edit
dl
rm
_eject
799
0644
edit
dl
rm
_hexdump
702
0644
edit
dl
rm
_hwclock
609
0644
edit
dl
rm
_ionice
1272
0644
edit
dl
rm
_look
449
0644
edit
dl
rm
_mock
2081
0644
edit
dl
rm
_modules
2548
0644
edit
dl
rm
_newgrp
432
0644
edit
dl
rm
_nmcli
6291
0644
edit
dl
rm
_renice
772
0644
edit
dl
rm
_repomanage
610
0644
edit
dl
rm
_reptyr
551
0644
edit
dl
rm
_rfkill
937
0644
edit
dl
rm
_rtcwake
873
0644
edit
dl
rm
_runuser
241
0644
edit
dl
rm
_su
989
0644
edit
dl
rm
_svn
8919
0644
edit
dl
rm
_svnadmin
2335
0644
edit
dl
rm
_svnlook
1999
0644
edit
dl
rm
_udevadm
2186
0644
edit
dl
rm
_write
239
0644
edit
dl
rm
_yum
4526
0644
edit
dl
rm
Edit:
/snap/core18/2979/usr/share/bash-completion/completions/tar
(19256B)
# bash completion for GNU tar -*- shell-script -*- # # General info # ============ # # The "old" style arguments # ------------------------- # # We don't "advice" the old tar option format by default for GNU tar, example: # # 'tar czfT /tmp/archive.tar patterns.txt' # # We rather advice the 'tar -czf /tmp/archive.tar -T patterns.txt' format of # arguments. Though, if user starts the 'first' tar argument without leading # dash, we treat the command line apropriately. # # # long/short options origin # ------------------------- # # For GNU tar, everything is parsed from `tar --help` output so not so much # per-distribution work should be needed. The _parse_help does not seem to be # good enough so parsed here directly. # # # FIXME: --starting-file (-K) (should be matched for extraction only) # FIXME: handle already used (at least short) options # FIXME: Test-cases for make check. # - check for no global variable pollution # FIXME: why PS4='$BASH_SOURCE:$LINENO: ' shows sometimes negative lines? # FIXME: timeout on tarball listing # FIXME: cache 'tar --help' parsing results into global variables # FIXME: at least 'tar -<tab>' should show some helping text (apart from just # pure option advices) # FIXME: short option completion should be more intuitive # - verbose mode option should be advised multiple times # - mode option should be advised only once # - format option should be advised only once # ... __gtar_parse_help_opt() { local opttype arg opt separator optvar opttype=long arg="$2" opt="$1" separator=" " case "$opt" in --*) ;; -\?) return ;; -*) opttype=short opt=${opt##-} separator= ;; *) echo >&2 "not an option $opt" return 1 ;; esac # Remove arguments. opt=${opt//\[*/} opt=${opt//=*/=} # Basic sanity. opt=${opt//\"*/} opt=${opt//\'*/} opt=${opt//\;*/} optvar=$opttype'_arg_'$arg eval "$optvar=\"\$$optvar$separator\"\"$opt\"" } __gtar_parse_help_line() { local i for i in $1; do case "$i" in # regular options --*|-*) __gtar_parse_help_opt "$i" "$2" ;; # end once there is single non-option word *) break esac done } __gnu_tar_parse_help() { local str line arg while IFS= read line; do # Ok, this requires some comment probably. The GNU help output prints # options on lines beginning with spaces. After that, there is one # or more options separated by ', ' separator string. We are matching # like this then: ^<spaces>(<separator>?<option>)+<whatever>$ if [[ "$line" =~ \ ^[[:blank:]]{1,10}(((,[[:blank:]])?(--?([\]\[a-zA-Z0-9?=-]+))(,[[:space:]])?)+).*$ ]]; then line=${BASH_REMATCH[1]} str="${line//,/ }" # Detect that all options on this line accept arguments (and whether # the arguments are required or not). Note that only long option # description in GNU help output mentions arguments. So the $line # variable may contain e.g. '-X, --XXX[=NAME], -XXX2[=NAME]'. arg=none if [[ "$line" =~ --[A-Za-z0-9-]+(\[?)= ]]; then [[ -n "${BASH_REMATCH[1]}" ]] && arg=opt || arg=req fi __gtar_parse_help_line "$str" "$arg" fi done <<<"$(tar --help)" long_opts="\ $long_arg_none\ $long_arg_opt\ $long_arg_req" short_opts="$short_arg_none$short_arg_opt$short_arg_req" } # Hack: parse --warning keywords from tar's error output __gtar_parse_warnings() { local line while IFS= read line; do if [[ $line =~ ^[[:blank:]]*-[[:blank:]]*[\`\']([a-zA-Z0-9-]+)\'$ ]]; then echo "${BASH_REMATCH[1]} no-${BASH_REMATCH[1]}" fi done <<<"$(LC_ALL=C tar --warning= 2>&1)" } # Helper to obtain last character of string. __tar_last_char() { echo "${1: $(( ${#1} - 1))}" } __tar_parse_old_opt() { local first_word char # current word is the first word [[ "$cword" -eq 1 && -n "$cur" && "${cur:0:1}" != '-' ]] \ && old_opt_progress=1 # check that first argument does not begin with "-" first_word=${words[1]} [[ -n "$first_word" && "${first_word:0:1}" != "-" ]] \ && old_opt_used=1 # parse the old option (if present) contents to allow later code expect # corresponding arguments if [[ $old_opt_used -eq 1 ]]; then char=${first_word:0:1} while [[ -n "$char" ]]; do if __tar_is_argreq "$char"; then old_opt_parsed+=("$char") fi first_word=${first_word##$char} char=${first_word:0:1} done fi } # Make the analysis of whole command line. __tar_preparse_cmdline() { local first_arg my_args tmparg i modes="ctxurdA" shift # progname __tar_parse_old_opt first_arg=1 for i in "$@"; do case "$i" in --delete|--test-label) tar_mode=${i:2:100} tar_mode_arg=$i break ;; --*) # skip ;; -*[$modes]*) tar_mode=${i//[^$modes]/} tar_mode=${tar_mode:0:1} tar_mode_arg=$i break ;; *[$modes]*) # Only the first arg may be "MODE" without leading dash if [[ $first_arg -eq 1 ]]; then tar_mode=${i//[^$modes]/} tar_mode=${tar_mode:0:1} tar_mode_arg=$i fi ;; esac first_arg=0 done } # Generate completions for -f/--file. __tar_file_option() { local ext="$1" case "$tar_mode" in c) # no need to advise user to re-write existing tarball _filedir -d ;; *) _filedir "$ext" ;; esac } # Returns truth if option requires argument. No equal sign must be pasted. # Accepts option in format: 'c', '-c', '--create' __tar_is_argreq() { local opt opt=$1 case "$opt" in -[A-Za-z0-9?]) [[ "$short_arg_req" =~ ${opt##-} ]] && return 0 ;; [A-Za-z0-9?]) [[ "$short_arg_req" =~ ${opt} ]] && return 0 ;; --*) [[ "$long_arg_req" =~ [[:blank:]]$opt=[[:blank:]] ]] && return 0 ;; esac return 1 } # Called only for short parameter __tar_complete_mode() { local short_modes has_mode rawopt generated \ allshort_raw_unused allshort_raw \ filler i short_modes="ctx" [[ -z "$basic_tar" ]] && short_modes="ctxurdA" # Remove prefix when needed rawopt=${cur#-} # -c -z -x ... => czx allshort_raw=${short_opts//[- ]/} # init the 'mode' option if no option is in ${cur} if [[ "$tar_mode" == none ]]; then # when user passed something like 'tar cf' do not put the '-' before filler= if [[ -z "$cur" && -z "$basic_tar" ]]; then filler=- fi generated="" for (( i=0 ; 1; i++ )); do local c="${short_modes:$i:1}" [[ -z "$c" ]] && break generated+=" $filler$cur$c" done COMPREPLY=( $(compgen -W "$generated" ) ) return 0 fi # The last short option requires argument, like '-cf<TAB>'. Cut the # completion here to enforce argument processing. if [[ "$old_opt_progress" -eq 0 ]] \ && __tar_is_argreq "$(__tar_last_char "$cur")"; then COMPREPLY=( "$cur" ) && return 0 fi allshort_raw_unused=${allshort_raw//[$rawopt]/} if [[ "$tar_mode" != none ]]; then allshort_raw_unused=${allshort_raw_unused//[$short_modes]} fi generated= for (( i=0 ; 1; i++ )); do local c="${allshort_raw_unused:$i:1}" [[ -z "$c" ]] && break generated+=" $cur$c" done COMPREPLY=( $( compgen -W "$generated" ) ) return 0 } __gtar_complete_lopts() { local rv COMPREPLY=( $( compgen -W "$long_opts" -- "$cur" ) ) rv=$? [[ $COMPREPLY == *= ]] && compopt -o nospace return $rv } __gtar_complete_sopts() { local generated short_mode_opts i c short_mode_opts="ctxurdA" generated=${short_opts//[$short_mode_opts]/} for (( i=0 ; 1; i++ )); do c="${allshort_raw_unused:$i:1}" [[ -z "$c" ]] && break generated+=" $cur$c" done COMPREPLY=( $( compgen -W "$generated" -- "$cur" ) ) } __tar_try_mode() { case "$cur" in --*) # posix tar does not support long opts [[ -n "$basic_tar" ]] && return 0 __gtar_complete_lopts return $? ;; -*) # posix tar does not support short optios [[ -n "$basic_tar" ]] && return 0 __tar_complete_mode && return 0 ;; *) if [[ "$cword" -eq 1 || "$tar_mode" == none ]]; then __tar_complete_mode && return 0 fi ;; esac return 1 } __tar_adjust_PREV_from_old_option() { # deal with old style arguments here # $ tar cfTC # expects this sequence of arguments: # $ tar cfTC ARCHIVE_FILE PATTERNS_FILE CHANGE_DIR if [[ "$old_opt_used" -eq 1 && "$cword" -gt 1 \ && "$cword" -lt $(( ${#old_opt_parsed[@]} + 2 )) ]]; then # make e.g. 'C' option from 'cffCT' prev="-${old_opt_parsed[ $cword - 2 ]}" fi } __tar_extract_like_mode() { local i for i in x d t delete; do [[ "$tar_mode" == "$i" ]] && return 0 done return 1 } __tar_try_list_archive() { local tarball tarbin untar __tar_extract_like_mode || return 1 # This all is just to approach directory completion from "virtual" # directory structure in tarball (for which the _filedir is unusable) set -- "${words[@]}" tarbin=$1 untar="tf" shift read tarball <<<"$(printf -- '%s\n' "$@" \ | command sed -n "/^.\{1,\}$regex\$/p")" if [[ -n "$tarball" ]]; then local IFS=$'\n' COMPREPLY=($(compgen -o filenames -W "$( while read line; do printf "%q\n" "$(printf %q"\n" "$line")" done <<<"$($tarbin $untar "$tarball" 2>/dev/null)" )" -- "$(printf "%q\n" "$cur")")) return 0 fi } __tar_cleanup_prev() { if [[ "$prev" =~ ^-[a-zA-Z0-9?]*$ ]]; then # transformate '-caf' ~> '-f' prev="-$(__tar_last_char "$prev")" fi } __tar_detect_ext() { local tars='@(@(tar|gem|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)))|t@([abglx]z|b?(z)2))' ext="$tars" regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[bgx]z\|bz2\|lz\(ma\|o\)\?\)\)\?\|t\([abglx]z\|bz\?2\)\)' case "$tar_mode_arg" in --*) # Should never happen? ;; ?(-)*[cr]*f) ext='@(tar|gem|spkg)' case ${words[1]} in *a*) ext="$tars" ;; *z*) ext='t?(ar.)gz' ;; *Z*) ext='ta@(r.Z|z)' ;; *[jy]*) ext='t@(?(ar.)bz?(2)|b2)' ;; *J*) ext='t?(ar.)xz' ;; esac ;; +([^ZzJjy])f) ext="$tars" regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[bgx]z\|bz2\|lz\(ma\|o\)\?\)\)\?\|t\([abglx]z\|bz\?2\)\)' ;; *[Zz]*f) ext='@(@(t?(ar.)|gem.|spkg.)@(gz|Z)|taz)' regex='\(\(t\(ar\.\)\?\|gem\.\|spkg\.\)\(gz\|Z\)\|taz\)' ;; *[jy]*f) ext='@(@(t?(ar.)|gem.)bz?(2)|spkg|tb2)' regex='\(\(t\(ar\.\)\?\|gem\.\)bz2\?\|spkg\|tb2\)' ;; *[J]*f) ext='@(@(tar|gem|spkg).@(lzma|xz)|t[lx]z)' regex='\(\(tar\|gem\|spkg\)\.\(lzma\|xz\)\|t[lx]z\)' ;; esac } _gtar() { local long_opts short_opts \ long_arg_none long_arg_opt long_arg_req \ short_arg_none short_arg_opt short_arg_req \ tar_mode tar_mode_arg old_opt_progress=0 \ old_opt_used=0 old_opt_parsed=() # Main mode, e.g. -x or -c (extract/creation) local tar_mode=none # The mode argument, e.g. -cpf or -c # FIXME: handle long options local tar_mode_arg= if [[ "$_TAR_OPT_DEBUG" == 1 ]]; then set -x PS4="\$BASH_SOURCE:\$LINENO: " fi local cur prev words cword split _init_completion -s || return # Fill the {long,short}_{opts,arg*} __gnu_tar_parse_help __tar_preparse_cmdline "${words[@]}" local ext regex tar untar __tar_detect_ext while true; do # just-for-easy-break while, not looping __tar_adjust_PREV_from_old_option __tar_posix_prev_handle && break __tar_cleanup_prev # Handle all options *REQUIRING* argument. Optional arguments are up to # user (TODO: is there any sane way to deal with this?). This case # statement successes only if there already is PREV. case $prev in -C|--directory) _filedir -d break ;; --atime-preserve) COMPREPLY=( $( compgen -W 'replace system' -- "$cur" ) ) break ;; --group) COMPREPLY=( $( compgen -g -- "$cur" ) ) break ;; --owner) COMPREPLY=( $( compgen -u -- "$cur" ) ) break ;; -F|--info-script|--new-volume-script|--rmt-command|--rsh-command|\ -I|--use-compress-program) compopt -o filenames COMPREPLY=( $( compgen -c -- "$cur" ) ) break ;; --volno-file|--add-file|-T|--files-from|-X|--exclude-from|\ --index-file|--listed-incremental|-g) _filedir break ;; -H|--format) COMPREPLY=( $( compgen -W 'gnu oldgnu pax posix ustar v7' \ -- "$cur" ) ) break ;; --quoting-style) COMPREPLY=( $( compgen -W 'literal shell shell-always c c-maybe escape locale clocale' -- "$cur" ) ) break ;; --totals) COMPREPLY=( $( compgen -W 'SIGHUP SIGQUIT SIGINT SIGUSR1 SIGUSR2' \ -- "$cur" ) ) break ;; --warning) COMPREPLY=( $( compgen -W "$(__gtar_parse_warnings)" -- "$cur" ) ) break ;; --file|-f|-!(-*)f) __tar_file_option "$ext" break ;; --*) # parameter with required argument but no completion yet [[ " $long_arg_req " =~ \ $prev=\ ]] && break # parameter with optional argument passed with =, something like # --occurrence=*<TAB> which is not handled above [[ " $long_arg_opt " =~ \ $prev\ ]] && break # if there is some unknown option with '=', for example # (literally) user does --nonexistent=<TAB>, we do not want # continue also $split && break # Most probably, when code goes here, the PREV variable contains # some string from "$long_arg_none" and we want continue. ;; -[a-zA-Z0-9?]) # argument required but no completion yet [[ "$short_arg_req" =~ ${prev##-} ]] && break ;; esac # safety belts case "$cur" in -[a-zA-Z0-9]=*) # e.g. 'tar -c -f=sth' does not what user could expect break ;; esac # Handle the main operational mode of tar. We should do it as soon as # possible. __tar_try_mode && break # handle others case "$cur" in --*) __gtar_complete_lopts break ;; -*) # called only if it is *not* first parameter __gtar_complete_sopts break ;; esac # the first argument must be "mode" argument or --param, if any of those # was truth - the 'break' statement would have been already called [[ "$cword" -eq 1 ]] && break __tar_try_list_archive && break # file completion on relevant files if [[ $tar_mode != none ]]; then _filedir fi break done # just-for-easy-break while if [[ "$_TAR_OPT_DEBUG" == 1 ]]; then set +x unset PS4 fi } __tar_posix_prev_handle() { case "$prev" in -f) __tar_file_option "$ext" return 0 ;; -b) return 0 esac return 1 } _posix_tar() { local long_opts short_opts basic_tar \ long_arg_none long_arg_opt long_arg_req \ short_arg_none short_arg_opt short_arg_req \ tar_mode tar_mode_arg old_opt_progress=0 \ old_opt_used=1 old_opt_parsed=() # Main mode, e.g. -x or -c (extract/creation) local tar_mode=none # The mode argument, e.g. -cpf or -c local tar_mode_arg= local cur prev words cword split _init_completion -s || return basic_tar=yes tar_mode=none # relatively compatible modes are {c,t,x} # relatively compatible options {b,f,m,v,w} short_arg_req="fb" short_arg_none="wmv" short_opts="$short_arg_req$short_arg_none" __tar_preparse_cmdline "${words[@]}" local ext regex tar untar __tar_detect_ext __tar_adjust_PREV_from_old_option __tar_posix_prev_handle && return __tar_try_mode && return __tar_try_list_archive && return # file completion on relevant files _filedir } _tar() { local cmd=${COMP_WORDS[0]} func line read line <<<"$($cmd --version 2>/dev/null)" case "$line" in *GNU*) func=_gtar ;; *) func=_posix_tar ;; esac $func "$@" # Install real completion for subsequent completions if [ -n "${COMP_TAR_INTERNAL_PATHS:-}" ]; then complete -F $func -o dirnames tar else complete -F $func tar fi unset -f _tar } if [ -n "${COMP_TAR_INTERNAL_PATHS:-}" ]; then complete -F _tar -o dirnames tar complete -F _gtar -o dirnames gtar complete -F _posix_tar -o dirnames bsdtar complete -F _posix_tar -o dirnames star else complete -F _tar tar complete -F _gtar gtar complete -F _posix_tar bsdtar complete -F _posix_tar star fi # ex: filetype=sh
Save
cmd:
run