/usr/share/bash-completion/completions
NameSizeModeActions
2to39180644editdlrm
7z38940644editdlrm
7za38940644editdlrm
a2x8980644editdlrm
abook12190644editdlrm
aclocal8500644editdlrm
aclocal-1.108500644editdlrm
aclocal-1.118500644editdlrm
aclocal-1.128500644editdlrm
aclocal-1.138500644editdlrm
aclocal-1.148500644editdlrm
aclocal-1.158500644editdlrm
acpi4460644editdlrm
adb16910644editdlrm
addpart4470644editdlrm
add_members7650644editdlrm
alias4890644editdlrm
alpine8810644editdlrm
alternatives25310644editdlrm
animate91090644editdlrm
ant25840644editdlrm
apache2ctl3820644editdlrm
appdata-validate7960644editdlrm
apropos27270644editdlrm
apt-build14680644editdlrm
apt-cache20180644editdlrm
apt-get25850644editdlrm
aptitude30590644editdlrm
arch10890644editdlrm
arm-koji63650644editdlrm
arping5960644editdlrm
arpspoof5620644editdlrm
asciidoc11660644editdlrm
asciidoc.py11660644editdlrm
aspell33900644editdlrm
autoconf9530644editdlrm
autoheader10150644editdlrm
automake8740644editdlrm
automake-1.108740644editdlrm
automake-1.118740644editdlrm
automake-1.128740644editdlrm
automake-1.138740644editdlrm
automake-1.148740644editdlrm
automake-1.158740644editdlrm
autoreconf10150644editdlrm
autorpm3500644editdlrm
autoscan7330644editdlrm
autossh118170644editdlrm
autoupdate7330644editdlrm
avctrl4750644editdlrm
badblocks7140644editdlrm
bind8560644editdlrm
bk4330644editdlrm
blkdiscard6390644editdlrm
blkid20940644editdlrm
blkzone9710644editdlrm
blockdev7260644editdlrm
bootctl19370644editdlrm
brctl10490644editdlrm
btdownloadcurses.py10600644editdlrm
btdownloadgui.py10600644editdlrm
btdownloadheadless.py10600644editdlrm
bts43340644editdlrm
busctl80150644editdlrm
bzip210840644editdlrm
c++22220644editdlrm
cal4260644editdlrm
cancel2930644editdlrm
cardctl3820644editdlrm
cc22220644editdlrm
ccache10150644editdlrm
cdrecord36240644editdlrm
cfagent4230644editdlrm
cfdisk5460644editdlrm
cfrun12920644editdlrm
chage5800644editdlrm
change_pw5310644editdlrm
chcpu15100644editdlrm
checksec7420644editdlrm
check_db3760644editdlrm
check_perms3210644editdlrm
chfn4450644editdlrm
chgrp9510644editdlrm
chkconfig9090644editdlrm
chmem5010644editdlrm
chown11120644editdlrm
chpasswd6010644editdlrm
chronyc15670644editdlrm
chrpath5220644editdlrm
chrt9200644editdlrm
chsh5040644editdlrm
ci8930644editdlrm
ciptool97560644editdlrm
civclient7020644editdlrm
civserver4770644editdlrm
cksfv5210644editdlrm
cleanarch3540644editdlrm
clisp6700644editdlrm
clone_member5420644editdlrm
clzip11460644editdlrm
co8930644editdlrm
col4600644editdlrm
colcrt4840644editdlrm
colormake62160644editdlrm
colrm5090644editdlrm
column7250644editdlrm
compare91090644editdlrm
compgen14780644editdlrm
complete14780644editdlrm
composite91090644editdlrm
configure11920644editdlrm
config_list5820644editdlrm
conjure91090644editdlrm
convert91090644editdlrm
coredumpctl37150644editdlrm
cpan2dist12260644editdlrm
cpio29140644editdlrm
cppcheck26070644editdlrm
createdb46120644editdlrm
createuser46120644editdlrm
crontab11860644editdlrm
cryptsetup28340644editdlrm
ctrlaltdel3350644editdlrm
curl29740644editdlrm
cvs118600644editdlrm
cvsps15050644editdlrm
dcop3830644editdlrm
dd12850644editdlrm
declare12960644editdlrm
deja-dup6990644editdlrm
delpart5260644editdlrm
desktop-file-validate4760644editdlrm
devlink274040644editdlrm
dfutool97560644editdlrm
dhclient5910644editdlrm
dict18750644editdlrm
display91090644editdlrm
dmesg11820644editdlrm
dnf102120644editdlrm
dnsspoof5040644editdlrm
dot12930644editdlrm
dpkg32610644editdlrm
dpkg-deb32610644editdlrm
dpkg-query32610644editdlrm
dpkg-reconfigure32610644editdlrm
dpkg-source32900644editdlrm
dracut35800644editdlrm
dropdb46120644editdlrm
dropuser46120644editdlrm
dselect6660644editdlrm
dsniff5160644editdlrm
dumpdb3730644editdlrm
dumpe2fs5200644editdlrm
e2freefrag4620644editdlrm
e2label2920644editdlrm
edquota37100644editdlrm
eject11890644editdlrm
eog6520644editdlrm
ether-wake5310644editdlrm
ethtool240750644editdlrm
evince9520644editdlrm
explodepkg1520644editdlrm
export16320644editdlrm
f7722220644editdlrm
f9522220644editdlrm
faillog6290644editdlrm
fallocate7210644editdlrm
fbgs15730644editdlrm
fbi18290644editdlrm
fdformat5660644editdlrm
fdisk18340644editdlrm
feh41460644editdlrm
file7340644editdlrm
file-roller10910644editdlrm
filebucket97750644editdlrm
filefrag3540644editdlrm
filesnarf4510644editdlrm
fincore9160644editdlrm
find39290644editdlrm
findfs6950644editdlrm
findmnt31540644editdlrm
find_member5370644editdlrm
flake88120644editdlrm
flock8740644editdlrm
freebsd-update5870644editdlrm
freeciv-gtk27020644editdlrm
freeciv-sdl7020644editdlrm
freeciv-server4770644editdlrm
freeciv-xaw7020644editdlrm
fsck7870644editdlrm
fsck.cramfs6840644editdlrm
fsck.minix3830644editdlrm
fsfreeze5240644editdlrm
fstrim6770644editdlrm
function12960644editdlrm
fusermount6490644editdlrm
g++22220644editdlrm
g414810644editdlrm
g7722220644editdlrm
g9522220644editdlrm
gapplication13890644editdlrm
gcc22220644editdlrm
gcj22220644editdlrm
gcl6170644editdlrm
gdb16530644editdlrm
gdbus9350644editdlrm
genaliases3240644editdlrm
gendiff2670644editdlrm
genisoimage8690644editdlrm
getent19990644editdlrm
getopt8150644editdlrm
gfortran22220644editdlrm
git834590644editdlrm
gitk834590644editdlrm
gkrellm9160644editdlrm
gkrellm29160644editdlrm
gm8580644editdlrm
gmake62160644editdlrm
gmplayer113580644editdlrm
gnatmake10170644editdlrm
gnokii69760644editdlrm
gnome-mplayer9620644editdlrm
gnumake62160644editdlrm
gpasswd6050644editdlrm
gpc22220644editdlrm
gpg12770644editdlrm
gpg213380644editdlrm
gphoto214050644editdlrm
gprof18990644editdlrm
groupadd6110644editdlrm
groupdel1210644editdlrm
groupmems6110644editdlrm
groupmod6860644editdlrm
growisofs8960644editdlrm
grpck3450644editdlrm
grub116810644editdlrm
gsettings28290644editdlrm
gzip11800644editdlrm
hciattach97560644editdlrm
hciconfig97560644editdlrm
hcitool97560644editdlrm
hd7020644editdlrm
hddtemp8660644editdlrm
hexdump10070644editdlrm
hid2hci3500644editdlrm
host20160644editdlrm
hostname4790644editdlrm
hostnamectl22810644editdlrm
hping7660644editdlrm
hping27660644editdlrm
hping37660644editdlrm
htop7970644editdlrm
htpasswd9200644editdlrm
hwclock9380644editdlrm
iconv8470644editdlrm
id4410644editdlrm
identify91090644editdlrm
idn6530644editdlrm
ifdown3870644editdlrm
ifstatus3870644editdlrm
iftop5080644editdlrm
ifup3870644editdlrm
import91090644editdlrm
info19200644editdlrm
inject5100644editdlrm
insmod5210644editdlrm
insmod.static5210644editdlrm
installpkg7370644editdlrm
interdiff7620644editdlrm
invoke-rc.d12310644editdlrm
ionice11610644editdlrm
ip105910644editdlrm
ipcmk5760644editdlrm
ipcrm14230644editdlrm
ipcs5140644editdlrm
iperf17250644editdlrm
ipmitool58670644editdlrm
ipsec32220644editdlrm
iptables22870644editdlrm
ipv6calc13830644editdlrm
iscsiadm19070644editdlrm
isosize5290644editdlrm
isql3540644editdlrm
iwconfig28410644editdlrm
iwlist6170644editdlrm
iwpriv7430644editdlrm
iwspy4880644editdlrm
jar5010644editdlrm
jarsigner16610644editdlrm
java86090644editdlrm
javac86090644editdlrm
javadoc86090644editdlrm
javaws7740644editdlrm
journalctl58920644editdlrm
jpegoptim8650644editdlrm
jps5940644editdlrm
jshint8940644editdlrm
k3b11600644editdlrm
kcov16000644editdlrm
kernel-install18100644editdlrm
kill5790644editdlrm
killall7620644editdlrm
kldload4770644editdlrm
kldunload3690644editdlrm
kmod32350644editdlrm
koji63650644editdlrm
kplayer113580644editdlrm
ktutil30010644editdlrm
l2ping97560644editdlrm
larch19830644editdlrm
last9490644editdlrm
lastlog5660644editdlrm
lbzip210840644editdlrm
ldapadd44750644editdlrm
ldapcompare44750644editdlrm
ldapdelete44750644editdlrm
ldapmodify44750644editdlrm
ldapmodrdn44750644editdlrm
ldappasswd44750644editdlrm
ldapsearch44750644editdlrm
ldapvi13860644editdlrm
ldapwhoami44750644editdlrm
ldattach14720644editdlrm
lftp6340644editdlrm
lftpget3090644editdlrm
lilo11940644editdlrm
links9890644editdlrm
lintian52590644editdlrm
lintian-info52590644editdlrm
lisp6350644editdlrm
list_admins3870644editdlrm
list_lists4710644editdlrm
list_members8580644editdlrm
list_owners4130644editdlrm
localectl37390644editdlrm
logger15530644editdlrm
loginctl42510644editdlrm
look6830644editdlrm
losetup17210644editdlrm
lpq6020644editdlrm
lpr9140644editdlrm
lrzip11310644editdlrm
lsblk19610644editdlrm
lscpu10180644editdlrm
lsinitrd19830644editdlrm
lsipc13100644editdlrm
lslocks10690644editdlrm
lslogins17040644editdlrm
lsmem10540644editdlrm
lsns11670644editdlrm
lsof13930644editdlrm
lua4340644editdlrm
luac4860644editdlrm
luseradd9990644editdlrm
luserdel4740644editdlrm
lusermod9990644editdlrm
lvchange199780644editdlrm
lvcreate199780644editdlrm
lvdisplay199780644editdlrm
lvextend199780644editdlrm
lvm199780644editdlrm
lvmdiskscan199780644editdlrm
lvreduce199780644editdlrm
lvremove199780644editdlrm
lvrename199780644editdlrm
lvresize199780644editdlrm
lvs199780644editdlrm
lvscan199780644editdlrm
lz412110644editdlrm
lz4c12110644editdlrm
lzip11460644editdlrm
lzma10320644editdlrm
lzop14860644editdlrm
macof4290644editdlrm
mailmanctl4690644editdlrm
mailsnarf4510644editdlrm
make62160644editdlrm
makepkg5340644editdlrm
man27270644editdlrm
mc8420644editdlrm
mcookie5990644editdlrm
mcrypt18500644editdlrm
mdadm44920644editdlrm
mdecrypt18500644editdlrm
mdtool21270644editdlrm
medusa6820644editdlrm
mencoder113580644editdlrm
mesg4120644editdlrm
micropython16740644editdlrm
mii-diag6570644editdlrm
mii-tool8470644editdlrm
minicom10050644editdlrm
mkfs6380644editdlrm
mkfs.cramfs8210644editdlrm
mkfs.minix7140644editdlrm
mkinitrd12210644editdlrm
mkisofs8690644editdlrm
mkswap8410644editdlrm
mktemp6690644editdlrm
mmsitepass3300644editdlrm
modinfo11000644editdlrm
modprobe34330644editdlrm
mogrify91090644editdlrm
monodevelop4460644editdlrm
montage91090644editdlrm
more5280644editdlrm
mount19660644editdlrm
mount.linux106130644editdlrm
mountpoint4870644editdlrm
mplayer113580644editdlrm
mplayer2113580644editdlrm
mr25210644editdlrm
msgsnarf4510644editdlrm
msynctool13570644editdlrm
mtx11860644editdlrm
munin-node-configure7550644editdlrm
munin-run6510644editdlrm
munin-update6510644editdlrm
munindoc3220644editdlrm
mussh11880644editdlrm
mutt43300644editdlrm
muttng43300644editdlrm
mysql25320644editdlrm
mysqladmin15850644editdlrm
namei5000644editdlrm
nc10950644editdlrm
ncal8860644editdlrm
ncftp6290644editdlrm
nethogs5640644editdlrm
newlist5750644editdlrm
newusers6770644editdlrm
ngrep7790644editdlrm
nmap18480644editdlrm
nsenter11710644editdlrm
nslookup20160644editdlrm
ntpdate7200644editdlrm
openssl103270644editdlrm
opera13920644editdlrm
optipng11900644editdlrm
p414810644editdlrm
p11-kit5200644editdlrm
pack20022220644editdlrm
partx12490644editdlrm
passwd4970644editdlrm
patch17540644editdlrm
pbzip210840644editdlrm
pccardctl3820644editdlrm
pdftotext9320644editdlrm
pdlzip11460644editdlrm
perl35130644editdlrm
perldoc35130644editdlrm
pgrep12110644editdlrm
phing25840644editdlrm
pidof5100644editdlrm
pigz11800644editdlrm
pine8810644editdlrm
pinfo19200644editdlrm
ping18340644editdlrm
ping618340644editdlrm
pip32860644editdlrm
pivot_root3870644editdlrm
pkg-config13040644editdlrm
pkg-get21420644editdlrm
pkgadd17420644editdlrm
pkgrm10710644editdlrm
pkgtool8500644editdlrm
pkgutil40140644editdlrm
pkg_deinstall5020644editdlrm
pkg_delete5020644editdlrm
pkg_info5020644editdlrm
pkill12110644editdlrm
plague-client4150644editdlrm
plzip11460644editdlrm
pm-hibernate3230644editdlrm
pm-is-supported3360644editdlrm
pm-powersave2820644editdlrm
pm-suspend3230644editdlrm
pm-suspend-hybrid3230644editdlrm
pmake62160644editdlrm
pngfix7990644editdlrm
portablectl39860644editdlrm
portinstall9150644editdlrm
portsnap4930644editdlrm
portupgrade4790644editdlrm
postalias10090644editdlrm
postcat9330644editdlrm
postconf8500644editdlrm
postfix6750644editdlrm
postmap10090644editdlrm
postsuper17480644editdlrm
povray19840644editdlrm
ppc-koji63650644editdlrm
prelink9150644editdlrm
prlimit13290644editdlrm
protoc15290644editdlrm
psql46120644editdlrm
puppet97750644editdlrm
puppetca97750644editdlrm
puppetd97750644editdlrm
puppetdoc97750644editdlrm
puppetmasterd97750644editdlrm
puppetqd97750644editdlrm
puppetrun97750644editdlrm
pvchange199780644editdlrm
pvcreate199780644editdlrm
pvdisplay199780644editdlrm
pvmove199780644editdlrm
pvremove199780644editdlrm
pvs199780644editdlrm
pvscan199780644editdlrm
pwck3420644editdlrm
pwd4530644editdlrm
pwdx4850644editdlrm
pwgen5860644editdlrm
pxz15930644editdlrm
py.test17810644editdlrm
py.test-217810644editdlrm
py.test-317810644editdlrm
pydoc9890644editdlrm
pydoc39890644editdlrm
pyflakes4450644editdlrm
pylint23940644editdlrm
pypy16740644editdlrm
pypy316740644editdlrm
python16740644editdlrm
python216740644editdlrm
python316740644editdlrm
pyvenv4280644editdlrm
pyvenv-3.44280644editdlrm
pyvenv-3.54280644editdlrm
qdbus3830644editdlrm
qemu33570644editdlrm
qemu-kvm33570644editdlrm
qemu-system-i38633570644editdlrm
qemu-system-x86_6433570644editdlrm
qrunner3930644editdlrm
querybts10880644editdlrm
quota37100644editdlrm
quotacheck37100644editdlrm
quotaoff37100644editdlrm
quotaon37100644editdlrm
ralsh97750644editdlrm
raw4820644editdlrm
rcs8930644editdlrm
rcsdiff8930644editdlrm
rdesktop16990644editdlrm
rdict18750644editdlrm
readprofile6790644editdlrm
removepkg5550644editdlrm
remove_members5710644editdlrm
rename6550644editdlrm
renice7840644editdlrm
reportbug32150644editdlrm
repquota37100644editdlrm
resizepart5680644editdlrm
resolvconf4280644editdlrm
resolvectl70660644editdlrm
rev4320644editdlrm
rfcomm97560644editdlrm
rfkill9290644editdlrm
ri37330644editdlrm
rlog8930644editdlrm
rmlist3650644editdlrm
rmmod5230644editdlrm
route7920644editdlrm
rpcdebug10020644editdlrm
rpm103390644editdlrm
rpm2targz3700644editdlrm
rpm2tgz3700644editdlrm
rpm2txz3700644editdlrm
rpmbuild103390644editdlrm
rpmbuild-md5103390644editdlrm
rpmcheck5140644editdlrm
rrdtool4400644editdlrm
rsync35130644editdlrm
rtcwake10810644editdlrm
runuser8640644editdlrm
s390-koji63650644editdlrm
sbcl6770644editdlrm
sbcl-mt6770644editdlrm
sbopkg17650644editdlrm
scp118170644editdlrm
screen22570644editdlrm
script6670644editdlrm
scriptreplay6250644editdlrm
sdptool97560644editdlrm
semanage65700644editdlrm
setarch7900644editdlrm
setpriv23700644editdlrm
setquota37100644editdlrm
setsebool18160644editdlrm
setsid4400644editdlrm
setterm25910644editdlrm
sfdisk20120644editdlrm
sftp118170644editdlrm
sh8740644editdlrm
sidedoor118170644editdlrm
sitecopy13190644editdlrm
slackpkg34200644editdlrm
slapt-get24310644editdlrm
slapt-src18940644editdlrm
slogin118170644editdlrm
smartctl45750644editdlrm
smbcacls71320644editdlrm
smbclient71320644editdlrm
smbcquotas71320644editdlrm
smbget71320644editdlrm
smbpasswd71320644editdlrm
smbtar71320644editdlrm
smbtree71320644editdlrm
snownews3670644editdlrm
sparc-koji63650644editdlrm
spovray19840644editdlrm
sqlite35990644editdlrm
ss10380644editdlrm
ssh118170644editdlrm
ssh-add4340644editdlrm
ssh-copy-id4850644editdlrm
ssh-keygen15480644editdlrm
sshfs5910644editdlrm
sshmitm3650644editdlrm
sshow4280644editdlrm
strace34490644editdlrm
stream91090644editdlrm
strings11260644editdlrm
stunnel.bash5690644editdlrm
su8640644editdlrm
sudo13060644editdlrm
sudoedit13060644editdlrm
svcadm50660644editdlrm
svk88700644editdlrm
swaplabel6350644editdlrm
swapoff7430644editdlrm
swapon15290644editdlrm
synclient6020644editdlrm
sync_members7340644editdlrm
sysbench41330644editdlrm
sysctl8040644editdlrm
systemctl135750644editdlrm
systemd-analyze67880644editdlrm
systemd-cat19110644editdlrm
systemd-cgls23440644editdlrm
systemd-cgtop20960644editdlrm
systemd-delta19510644editdlrm
systemd-detect-virt13610644editdlrm
systemd-path19010644editdlrm
systemd-resolve31890644editdlrm
systemd-run48690644editdlrm
tar192480644editdlrm
taskset12070644editdlrm
tcpdump10110644editdlrm
tcpkill4410644editdlrm
tcpnice4340644editdlrm
tightvncviewer31640644editdlrm
timedatectl29840644editdlrm
timeout9320644editdlrm
tipc73270644editdlrm
tracepath4560644editdlrm
tracepath64560644editdlrm
trust20400644editdlrm
tshark30250644editdlrm
tune2fs16500644editdlrm
typeset12960644editdlrm
udevadm37660644editdlrm
ul6550644editdlrm
umount5120644editdlrm
umount.linux44720644editdlrm
unace4800644editdlrm
unpack20012510644editdlrm
unrar6140644editdlrm
unshare8090644editdlrm
unshunt3510644editdlrm
update-alternatives25310644editdlrm
update-rc.d21780644editdlrm
upgradepkg8110644editdlrm
urlsnarf4370644editdlrm
useradd11820644editdlrm
userdel5390644editdlrm
usermod13000644editdlrm
utmpdump4750644editdlrm
uuidgen6570644editdlrm
uuidparse7270644editdlrm
valgrind35030644editdlrm
vgcfgbackup199780644editdlrm
vgcfgrestore199780644editdlrm
vgchange199780644editdlrm
vgck199780644editdlrm
vgconvert199780644editdlrm
vgcreate199780644editdlrm
vgdisplay199780644editdlrm
vgexport199780644editdlrm
vgextend199780644editdlrm
vgimport199780644editdlrm
vgmerge199780644editdlrm
vgmknodes199780644editdlrm
vgreduce199780644editdlrm
vgremove199780644editdlrm
vgrename199780644editdlrm
vgs199780644editdlrm
vgscan199780644editdlrm
vgsplit199780644editdlrm
vigr4320644editdlrm
vipw4320644editdlrm
vmstat7080644editdlrm
vncviewer31640644editdlrm
vpnc16870644editdlrm
wall6340644editdlrm
watch11610644editdlrm
wdctl13710644editdlrm
webmitm3650644editdlrm
wget66280644editdlrm
whatis27270644editdlrm
whereis5350644editdlrm
wine5090644editdlrm
wipefs11920644editdlrm
withlist4130644editdlrm
wodim36240644editdlrm
wol11320644editdlrm
write4310644editdlrm
wsimport11300644editdlrm
wtf9280644editdlrm
wvdial12750644editdlrm
xfreerdp10730644editdlrm
xgamma20550644editdlrm
xhost3670644editdlrm
xm75910644editdlrm
xmllint10650644editdlrm
xmlwf6990644editdlrm
xmms6630644editdlrm
xmodmap4860644editdlrm
xpovray19840644editdlrm
xrandr21870644editdlrm
xrdb5100644editdlrm
xsltproc12480644editdlrm
xvnc4viewer31640644editdlrm
xxd4710644editdlrm
xz15930644editdlrm
xzdec7390644editdlrm
ypcat7680644editdlrm
ypmatch7680644editdlrm
yum-arch3600644editdlrm
zopfli6890644editdlrm
zopflipng9300644editdlrm
zramctl12730644editdlrm
_cal8860644editdlrm
_chfn2380644editdlrm
_chsh6460644editdlrm
_dmesg9400644editdlrm
_eject7990644editdlrm
_hexdump7020644editdlrm
_hwclock6090644editdlrm
_ionice12720644editdlrm
_look4490644editdlrm
_mock20810644editdlrm
_modules25480644editdlrm
_newgrp4320644editdlrm
_nmcli62910644editdlrm
_renice7720644editdlrm
_repomanage6100644editdlrm
_reptyr5510644editdlrm
_rfkill9370644editdlrm
_rtcwake8730644editdlrm
_runuser2410644editdlrm
_su9890644editdlrm
_svn89190644editdlrm
_svnadmin23350644editdlrm
_svnlook19990644editdlrm
_udevadm21860644editdlrm
_write2390644editdlrm
_yum45260644editdlrm
Edit: /usr/share/bash-completion/completions/git (83459B)
# bash/zsh completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. # # The contained completion routines provide support for completing: # # *) local and remote branch names # *) local and remote tag names # *) .git/remotes file names # *) git 'subcommands' # *) git email aliases for git-send-email # *) tree paths within 'ref:path/to/file' expressions # *) file paths within current working directory and index # *) common --long-options # # To use these routines: # # 1) Copy this file to somewhere (e.g. ~/.git-completion.bash). # 2) Add the following line to your .bashrc/.zshrc: # source ~/.git-completion.bash # 3) Consider changing your PS1 to also show the current branch, # see git-prompt.sh for details. # # If you use complex aliases of form '!f() { ... }; f', you can use the null # command ':' as the first command in the function body to declare the desired # completion style. For example '!f() { : git commit ; ... }; f' will # tell the completion to use commit completion. This also works with aliases # of form "!sh -c '...'". For example, "!sh -c ': git commit ; ... '". # Note that "git" is optional --- '!f() { : commit; ...}; f' would complete # just like the 'git commit' command. # # If you have a command that is not part of git, but you would still # like completion, you can use __git_complete: # # __git_complete gl git_log # # Or if it's a main command (i.e. git or gitk): # # __git_complete gk gitk # # Compatible with bash 3.2.57. # # You can set the following environment variables to influence the behavior of # the completion routines: # # GIT_COMPLETION_CHECKOUT_NO_GUESS # # When set to "1", do not include "DWIM" suggestions in git-checkout # and git-switch completion (e.g., completing "foo" when "origin/foo" # exists). # # GIT_COMPLETION_SHOW_ALL_COMMANDS # # When set to "1" suggest all commands, including plumbing commands # which are hidden by default (e.g. "cat-file" on "git ca"). # # GIT_COMPLETION_SHOW_ALL # # When set to "1" suggest all options, including options which are # typically hidden (e.g. '--allow-empty' for 'git commit'). # # GIT_COMPLETION_IGNORE_CASE # # When set, uses for-each-ref '--ignore-case' to find refs that match # case insensitively, even on systems with case sensitive file systems # (e.g., completing tag name "FOO" on "git checkout f"). case "$COMP_WORDBREAKS" in *:*) : great ;; *) COMP_WORDBREAKS="$COMP_WORDBREAKS:" esac # Discovers the path to the git repository taking any '--git-dir=' and # '-C ' options into account and stores it in the $__git_repo_path # variable. __git_find_repo_path () { if [ -n "${__git_repo_path-}" ]; then # we already know where it is return fi if [ -n "${__git_C_args-}" ]; then __git_repo_path="$(git "${__git_C_args[@]}" \ ${__git_dir:+--git-dir="$__git_dir"} \ rev-parse --absolute-git-dir 2>/dev/null)" elif [ -n "${__git_dir-}" ]; then test -d "$__git_dir" && __git_repo_path="$__git_dir" elif [ -n "${GIT_DIR-}" ]; then test -d "$GIT_DIR" && __git_repo_path="$GIT_DIR" elif [ -d .git ]; then __git_repo_path=.git else __git_repo_path="$(git rev-parse --git-dir 2>/dev/null)" fi } # Deprecated: use __git_find_repo_path() and $__git_repo_path instead # __gitdir accepts 0 or 1 arguments (i.e., location) # returns location of .git repo __gitdir () { if [ -z "${1-}" ]; then __git_find_repo_path || return 1 echo "$__git_repo_path" elif [ -d "$1/.git" ]; then echo "$1/.git" else echo "$1" fi } # Runs git with all the options given as argument, respecting any # '--git-dir=' and '-C ' options present on the command line __git () { git ${__git_C_args:+"${__git_C_args[@]}"} \ ${__git_dir:+--git-dir="$__git_dir"} "$@" 2>/dev/null } # Helper function to read the first line of a file into a variable. # __git_eread requires 2 arguments, the file path and the name of the # variable, in that order. # # This is taken from git-prompt.sh. __git_eread () { test -r "$1" && IFS=$'\r\n' read -r "$2" <"$1" } # Runs git in $__git_repo_path to determine whether a pseudoref exists. # 1: The pseudo-ref to search __git_pseudoref_exists () { local ref=$1 # If the reftable is in use, we have to shell out to 'git rev-parse' # to determine whether the ref exists instead of looking directly in # the filesystem to determine whether the ref exists. Otherwise, use # Bash builtins since executing Git commands are expensive on some # platforms. if __git_eread "$__git_repo_path/HEAD" head; then b="${head#ref: }" if [ "$b" == "refs/heads/.invalid" ]; then __git -C "$__git_repo_path" rev-parse --verify --quiet "$ref" 2>/dev/null return $? fi fi [ -f "$__git_repo_path/$ref" ] } # Removes backslash escaping, single quotes and double quotes from a word, # stores the result in the variable $dequoted_word. # 1: The word to dequote. __git_dequote () { local rest="$1" len ch dequoted_word="" while test -n "$rest"; do len=${#dequoted_word} dequoted_word="$dequoted_word${rest%%[\\\'\"]*}" rest="${rest:$((${#dequoted_word}-$len))}" case "${rest:0:1}" in \\) ch="${rest:1:1}" case "$ch" in $'\n') ;; *) dequoted_word="$dequoted_word$ch" ;; esac rest="${rest:2}" ;; \') rest="${rest:1}" len=${#dequoted_word} dequoted_word="$dequoted_word${rest%%\'*}" rest="${rest:$((${#dequoted_word}-$len+1))}" ;; \") rest="${rest:1}" while test -n "$rest" ; do len=${#dequoted_word} dequoted_word="$dequoted_word${rest%%[\\\"]*}" rest="${rest:$((${#dequoted_word}-$len))}" case "${rest:0:1}" in \\) ch="${rest:1:1}" case "$ch" in \"|\\|\$|\`) dequoted_word="$dequoted_word$ch" ;; $'\n') ;; *) dequoted_word="$dequoted_word\\$ch" ;; esac rest="${rest:2}" ;; \") rest="${rest:1}" break ;; esac done ;; esac done } # The following function is based on code from: # # bash_completion - programmable completion functions for bash 3.2+ # # Copyright © 2006-2008, Ian Macdonald # © 2009-2010, Bash Completion Maintainers # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # The latest version of this software can be obtained here: # # http://bash-completion.alioth.debian.org/ # # RELEASE: 2.x # This function can be used to access a tokenized list of words # on the command line: # # __git_reassemble_comp_words_by_ref '=:' # if test "${words_[cword_-1]}" = -w # then # ... # fi # # The argument should be a collection of characters from the list of # word completion separators (COMP_WORDBREAKS) to treat as ordinary # characters. # # This is roughly equivalent to going back in time and setting # COMP_WORDBREAKS to exclude those characters. The intent is to # make option types like --date= and : easy to # recognize by treating each shell word as a single token. # # It is best not to set COMP_WORDBREAKS directly because the value is # shared with other completion scripts. By the time the completion # function gets called, COMP_WORDS has already been populated so local # changes to COMP_WORDBREAKS have no effect. # # Output: words_, cword_, cur_. __git_reassemble_comp_words_by_ref() { local exclude i j first # Which word separators to exclude? exclude="${1//[^$COMP_WORDBREAKS]}" cword_=$COMP_CWORD if [ -z "$exclude" ]; then words_=("${COMP_WORDS[@]}") return fi # List of word completion separators has shrunk; # re-assemble words to complete. for ((i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)); do # Append each nonempty word consisting of just # word separator characters to the current word. first=t while [ $i -gt 0 ] && [ -n "${COMP_WORDS[$i]}" ] && # word consists of excluded word separators [ "${COMP_WORDS[$i]//[^$exclude]}" = "${COMP_WORDS[$i]}" ] do # Attach to the previous token, # unless the previous token is the command name. if [ $j -ge 2 ] && [ -n "$first" ]; then ((j--)) fi first= words_[$j]=${words_[j]}${COMP_WORDS[i]} if [ $i = $COMP_CWORD ]; then cword_=$j fi if (($i < ${#COMP_WORDS[@]} - 1)); then ((i++)) else # Done. return fi done words_[$j]=${words_[j]}${COMP_WORDS[i]} if [ $i = $COMP_CWORD ]; then cword_=$j fi done } if ! type _get_comp_words_by_ref >/dev/null 2>&1; then _get_comp_words_by_ref () { local exclude cur_ words_ cword_ if [ "$1" = "-n" ]; then exclude=$2 shift 2 fi __git_reassemble_comp_words_by_ref "$exclude" cur_=${words_[cword_]} while [ $# -gt 0 ]; do case "$1" in cur) cur=$cur_ ;; prev) prev=${words_[$cword_-1]} ;; words) words=("${words_[@]}") ;; cword) cword=$cword_ ;; esac shift done } fi # Fills the COMPREPLY array with prefiltered words without any additional # processing. # Callers must take care of providing only words that match the current word # to be completed and adding any prefix and/or suffix (trailing space!), if # necessary. # 1: List of newline-separated matching completion words, complete with # prefix and suffix. __gitcomp_direct () { local IFS=$'\n' COMPREPLY=($1) } # Similar to __gitcomp_direct, but appends to COMPREPLY instead. # Callers must take care of providing only words that match the current word # to be completed and adding any prefix and/or suffix (trailing space!), if # necessary. # 1: List of newline-separated matching completion words, complete with # prefix and suffix. __gitcomp_direct_append () { local IFS=$'\n' COMPREPLY+=($1) } __gitcompappend () { local x i=${#COMPREPLY[@]} for x in $1; do if [[ "$x" == "$3"* ]]; then COMPREPLY[i++]="$2$x$4" fi done } __gitcompadd () { COMPREPLY=() __gitcompappend "$@" } # Generates completion reply, appending a space to possible completion words, # if necessary. # It accepts 1 to 4 arguments: # 1: List of possible completion words. # 2: A prefix to be added to each possible completion word (optional). # 3: Generate possible completion matches for this word (optional). # 4: A suffix to be appended to each possible completion word (optional). __gitcomp () { local cur_="${3-$cur}" case "$cur_" in *=) ;; --no-*) local c i=0 IFS=$' \t\n' for c in $1; do if [[ $c == "--" ]]; then continue fi c="$c${4-}" if [[ $c == "$cur_"* ]]; then case $c in --*=|*.) ;; *) c="$c " ;; esac COMPREPLY[i++]="${2-}$c" fi done ;; *) local c i=0 IFS=$' \t\n' for c in $1; do if [[ $c == "--" ]]; then c="--no-...${4-}" if [[ $c == "$cur_"* ]]; then COMPREPLY[i++]="${2-}$c " fi break fi c="$c${4-}" if [[ $c == "$cur_"* ]]; then case $c in *=|*.) ;; *) c="$c " ;; esac COMPREPLY[i++]="${2-}$c" fi done ;; esac } # Clear the variables caching builtins' options when (re-)sourcing # the completion script. if [[ -n ${ZSH_VERSION-} ]]; then unset ${(M)${(k)parameters[@]}:#__gitcomp_builtin_*} 2>/dev/null else unset $(compgen -v __gitcomp_builtin_) fi # This function is equivalent to # # __gitcomp "$(git xxx --git-completion-helper) ..." # # except that the output is cached. Accept 1-3 arguments: # 1: the git command to execute, this is also the cache key # 2: extra options to be added on top (e.g. negative forms) # 3: options to be excluded __gitcomp_builtin () { # spaces must be replaced with underscore for multi-word # commands, e.g. "git remote add" becomes remote_add. local cmd="$1" local incl="${2-}" local excl="${3-}" local var=__gitcomp_builtin_"${cmd//-/_}" local options eval "options=\${$var-}" if [ -z "$options" ]; then local completion_helper if [ "${GIT_COMPLETION_SHOW_ALL-}" = "1" ]; then completion_helper="--git-completion-helper-all" else completion_helper="--git-completion-helper" fi # leading and trailing spaces are significant to make # option removal work correctly. options=" $incl $(__git ${cmd/_/ } $completion_helper) " || return for i in $excl; do options="${options/ $i / }" done eval "$var=\"$options\"" fi __gitcomp "$options" } # Variation of __gitcomp_nl () that appends to the existing list of # completion candidates, COMPREPLY. __gitcomp_nl_append () { local IFS=$'\n' __gitcompappend "$1" "${2-}" "${3-$cur}" "${4- }" } # Generates completion reply from newline-separated possible completion words # by appending a space to all of them. # It accepts 1 to 4 arguments: # 1: List of possible completion words, separated by a single newline. # 2: A prefix to be added to each possible completion word (optional). # 3: Generate possible completion matches for this word (optional). # 4: A suffix to be appended to each possible completion word instead of # the default space (optional). If specified but empty, nothing is # appended. __gitcomp_nl () { COMPREPLY=() __gitcomp_nl_append "$@" } # Fills the COMPREPLY array with prefiltered paths without any additional # processing. # Callers must take care of providing only paths that match the current path # to be completed and adding any prefix path components, if necessary. # 1: List of newline-separated matching paths, complete with all prefix # path components. __gitcomp_file_direct () { local IFS=$'\n' COMPREPLY=($1) # use a hack to enable file mode in bash < 4 compopt -o filenames +o nospace 2>/dev/null || compgen -f /non-existing-dir/ >/dev/null || true } # Generates completion reply with compgen from newline-separated possible # completion filenames. # It accepts 1 to 3 arguments: # 1: List of possible completion filenames, separated by a single newline. # 2: A directory prefix to be added to each possible completion filename # (optional). # 3: Generate possible completion matches for this word (optional). __gitcomp_file () { local IFS=$'\n' # XXX does not work when the directory prefix contains a tilde, # since tilde expansion is not applied. # This means that COMPREPLY will be empty and Bash default # completion will be used. __gitcompadd "$1" "${2-}" "${3-$cur}" "" # use a hack to enable file mode in bash < 4 compopt -o filenames +o nospace 2>/dev/null || compgen -f /non-existing-dir/ >/dev/null || true } # Execute 'git ls-files', unless the --committable option is specified, in # which case it runs 'git diff-index' to find out the files that can be # committed. It return paths relative to the directory specified in the first # argument, and using the options specified in the second argument. __git_ls_files_helper () { if [ "$2" = "--committable" ]; then __git -C "$1" -c core.quotePath=false diff-index \ --name-only --relative HEAD -- "${3//\\/\\\\}*" else # NOTE: $2 is not quoted in order to support multiple options __git -C "$1" -c core.quotePath=false ls-files \ --exclude-standard $2 -- "${3//\\/\\\\}*" fi } # __git_index_files accepts 1 or 2 arguments: # 1: Options to pass to ls-files (required). # 2: A directory path (optional). # If provided, only files within the specified directory are listed. # Sub directories are never recursed. Path must have a trailing # slash. # 3: List only paths matching this path component (optional). __git_index_files () { local root="$2" match="$3" __git_ls_files_helper "$root" "$1" "${match:-?}" | awk -F / -v pfx="${2//\\/\\\\}" '{ paths[$1] = 1 } END { for (p in paths) { if (substr(p, 1, 1) != "\"") { # No special characters, easy! print pfx p continue } # The path is quoted. p = dequote(p) if (p == "") continue # Even when a directory name itself does not contain # any special characters, it will still be quoted if # any of its (stripped) trailing path components do. # Because of this we may have seen the same directory # both quoted and unquoted. if (p in paths) # We have seen the same directory unquoted, # skip it. continue else print pfx p } } function dequote(p, bs_idx, out, esc, esc_idx, dec) { # Skip opening double quote. p = substr(p, 2) # Interpret backslash escape sequences. while ((bs_idx = index(p, "\\")) != 0) { out = out substr(p, 1, bs_idx - 1) esc = substr(p, bs_idx + 1, 1) p = substr(p, bs_idx + 2) if ((esc_idx = index("abtvfr\"\\", esc)) != 0) { # C-style one-character escape sequence. out = out substr("\a\b\t\v\f\r\"\\", esc_idx, 1) } else if (esc == "n") { # Uh-oh, a newline character. # We cannot reliably put a pathname # containing a newline into COMPREPLY, # and the newline would create a mess. # Skip this path. return "" } else { # Must be a \nnn octal value, then. dec = esc * 64 + \ substr(p, 1, 1) * 8 + \ substr(p, 2, 1) out = out sprintf("%c", dec) p = substr(p, 3) } } # Drop closing double quote, if there is one. # (There is not any if this is a directory, as it was # already stripped with the trailing path components.) if (substr(p, length(p), 1) == "\"") out = out substr(p, 1, length(p) - 1) else out = out p return out }' } # __git_complete_index_file requires 1 argument: # 1: the options to pass to ls-file # # The exception is --committable, which finds the files appropriate commit. __git_complete_index_file () { local dequoted_word pfx="" cur_ __git_dequote "$cur" case "$dequoted_word" in ?*/*) pfx="${dequoted_word%/*}/" cur_="${dequoted_word##*/}" ;; *) cur_="$dequoted_word" esac __gitcomp_file_direct "$(__git_index_files "$1" "$pfx" "$cur_")" } # Lists branches from the local repository. # 1: A prefix to be added to each listed branch (optional). # 2: List only branches matching this word (optional; list all branches if # unset or empty). # 3: A suffix to be appended to each listed branch (optional). __git_heads () { local pfx="${1-}" cur_="${2-}" sfx="${3-}" __git for-each-ref --format="${pfx//\%/%%}%(refname:strip=2)$sfx" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "refs/heads/$cur_*" "refs/heads/$cur_*/**" } # Lists branches from remote repositories. # 1: A prefix to be added to each listed branch (optional). # 2: List only branches matching this word (optional; list all branches if # unset or empty). # 3: A suffix to be appended to each listed branch (optional). __git_remote_heads () { local pfx="${1-}" cur_="${2-}" sfx="${3-}" __git for-each-ref --format="${pfx//\%/%%}%(refname:strip=2)$sfx" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "refs/remotes/$cur_*" "refs/remotes/$cur_*/**" } # Lists tags from the local repository. # Accepts the same positional parameters as __git_heads() above. __git_tags () { local pfx="${1-}" cur_="${2-}" sfx="${3-}" __git for-each-ref --format="${pfx//\%/%%}%(refname:strip=2)$sfx" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "refs/tags/$cur_*" "refs/tags/$cur_*/**" } # List unique branches from refs/remotes used for 'git checkout' and 'git # switch' tracking DWIMery. # 1: A prefix to be added to each listed branch (optional) # 2: List only branches matching this word (optional; list all branches if # unset or empty). # 3: A suffix to be appended to each listed branch (optional). __git_dwim_remote_heads () { local pfx="${1-}" cur_="${2-}" sfx="${3-}" local fer_pfx="${pfx//\%/%%}" # "escape" for-each-ref format specifiers # employ the heuristic used by git checkout and git switch # Try to find a remote branch that cur_es the completion word # but only output if the branch name is unique __git for-each-ref --format="$fer_pfx%(refname:strip=3)$sfx" \ --sort="refname:strip=3" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "refs/remotes/*/$cur_*" "refs/remotes/*/$cur_*/**" | \ uniq -u } # Lists refs from the local (by default) or from a remote repository. # It accepts 0, 1 or 2 arguments: # 1: The remote to list refs from (optional; ignored, if set but empty). # Can be the name of a configured remote, a path, or a URL. # 2: In addition to local refs, list unique branches from refs/remotes/ for # 'git checkout's tracking DWIMery (optional; ignored, if set but empty). # 3: A prefix to be added to each listed ref (optional). # 4: List only refs matching this word (optional; list all refs if unset or # empty). # 5: A suffix to be appended to each listed ref (optional; ignored, if set # but empty). # # Use __git_complete_refs() instead. __git_refs () { local i hash dir track="${2-}" local list_refs_from=path remote="${1-}" local format refs local pfx="${3-}" cur_="${4-$cur}" sfx="${5-}" local match="${4-}" local umatch="${4-}" local fer_pfx="${pfx//\%/%%}" # "escape" for-each-ref format specifiers __git_find_repo_path dir="$__git_repo_path" if [ -z "$remote" ]; then if [ -z "$dir" ]; then return fi else if __git_is_configured_remote "$remote"; then # configured remote takes precedence over a # local directory with the same name list_refs_from=remote elif [ -d "$remote/.git" ]; then dir="$remote/.git" elif [ -d "$remote" ]; then dir="$remote" else list_refs_from=url fi fi if test "${GIT_COMPLETION_IGNORE_CASE:+1}" = "1" then # uppercase with tr instead of ${match,^^} for bash 3.2 compatibility umatch=$(echo "$match" | tr a-z A-Z 2>/dev/null || echo "$match") fi if [ "$list_refs_from" = path ]; then if [[ "$cur_" == ^* ]]; then pfx="$pfx^" fer_pfx="$fer_pfx^" cur_=${cur_#^} match=${match#^} umatch=${umatch#^} fi case "$cur_" in refs|refs/*) format="refname" refs=("$match*" "$match*/**") track="" ;; *) for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD REVERT_HEAD BISECT_HEAD AUTO_MERGE; do case "$i" in $match*|$umatch*) if [ -e "$dir/$i" ]; then echo "$pfx$i$sfx" fi ;; esac done format="refname:strip=2" refs=("refs/tags/$match*" "refs/tags/$match*/**" "refs/heads/$match*" "refs/heads/$match*/**" "refs/remotes/$match*" "refs/remotes/$match*/**") ;; esac __git_dir="$dir" __git for-each-ref --format="$fer_pfx%($format)$sfx" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "${refs[@]}" if [ -n "$track" ]; then __git_dwim_remote_heads "$pfx" "$match" "$sfx" fi return fi case "$cur_" in refs|refs/*) __git ls-remote "$remote" "$match*" | \ while read -r hash i; do case "$i" in *^{}) ;; *) echo "$pfx$i$sfx" ;; esac done ;; *) if [ "$list_refs_from" = remote ]; then case "HEAD" in $match*|$umatch*) echo "${pfx}HEAD$sfx" ;; esac __git for-each-ref --format="$fer_pfx%(refname:strip=3)$sfx" \ ${GIT_COMPLETION_IGNORE_CASE+--ignore-case} \ "refs/remotes/$remote/$match*" \ "refs/remotes/$remote/$match*/**" else local query_symref case "HEAD" in $match*|$umatch*) query_symref="HEAD" ;; esac __git ls-remote "$remote" $query_symref \ "refs/tags/$match*" "refs/heads/$match*" \ "refs/remotes/$match*" | while read -r hash i; do case "$i" in *^{}) ;; refs/*) echo "$pfx${i#refs/*/}$sfx" ;; *) echo "$pfx$i$sfx" ;; # symbolic refs esac done fi ;; esac } # Completes refs, short and long, local and remote, symbolic and pseudo. # # Usage: __git_complete_refs [