PATH:
usr
/
share
/
bash-completion
/
completions
# umount(8) completion -*- shell-script -*- # Just like COMPREPLY=(`compgen -W "${COMPREPLY[*]}" -- "$cur"`), only better! # # This will correctly escape special characters in COMPREPLY. _reply_compgen_array() { # Create the argument for compgen -W by escaping twice. # # One round of escape is because we want to reply with escaped arguments. A # second round is required because compgen -W will helpfully expand it's # argument. local i wlist for i in ${!COMPREPLY[*]}; do local q=$(quote "$(printf %q "${COMPREPLY[$i]}")") wlist+=$q$'\n' done # We also have to add another round of escaping to $cur. local ecur="$cur" ecur="${ecur//\\/\\\\}" ecur="${ecur//\'/\'}" # Actually generate completions. local oldifs=$IFS IFS=$'\n' eval 'COMPREPLY=(`compgen -W "$wlist" -- "${ecur}"`)' IFS=$oldifs } # Unescape strings in the linux fstab(5) format (with octal escapes). __linux_fstab_unescape() { eval $1="'${!1//\'/\047}'" eval $1="'${!1/%\\/\\\\}'" eval "$1=$'${!1}'" } # Complete linux fstab entries. # # Reads a file from stdin in the linux fstab(5) format; as used by /etc/fstab # and /proc/mounts. _linux_fstab() { COMPREPLY=() # Read and unescape values into COMPREPLY local fs_spec fs_file fs_other local oldifs="$IFS" while read -r fs_spec fs_file fs_other; do if [[ $fs_spec = [#]* ]]; then continue; fi if [[ $1 == -L ]]; then local fs_label=${fs_spec/#LABEL=} if [[ $fs_label != "$fs_spec" ]]; then __linux_fstab_unescape fs_label IFS=$'\0' COMPREPLY+=("$fs_label") IFS=$oldifs fi else __linux_fstab_unescape fs_spec __linux_fstab_unescape fs_file IFS=$'\0' [[ $fs_spec = */* ]] && COMPREPLY+=("$fs_spec") [[ $fs_file = */* ]] && COMPREPLY+=("$fs_file") IFS=$oldifs fi done # Add relative paths to COMPREPLY if [[ $cur && $cur != /* ]]; then local realcur [[ $cur == */ ]] && # don't let readlink drop last / from path realcur="$( readlink -f "$cur." 2> /dev/null )/" || realcur=$( readlink -f "$cur" 2> /dev/null ) if [[ $realcur ]]; then local dirrealcur= dircur= basecur if [[ $cur == */* ]]; then dirrealcur="${realcur%/*}/" dircur="${cur%/*}/" fi basecur=${cur#"$dircur"} local i n=${#COMPREPLY[@]} for (( i=0; i < $n; i++ )); do [[ "${COMPREPLY[i]}" == "$realcur"* ]] && COMPREPLY+=( $( cd "$dircur" 2> /dev/null && compgen -f -d -P "$dircur" \ -X "!${COMPREPLY[i]##"$dirrealcur"}" -- "$basecur" ) ) done fi fi _reply_compgen_array } _umount() { local cur prev words cword _init_completion || return case "$prev" in -t) # FIXME: no<fstype> local split=false if [[ "$cur" == ?*,* ]]; then prev="${cur%,*}" cur="${cur##*,}" split=true fi COMPREPLY=( $( compgen -W 'adfs affs autofs btrfs cifs coda cramfs debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus hpfs iso9660 jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g proc qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf ufs umsdos usbfs vfat xfs' -- "$cur" ) ) _fstypes $split && COMPREPLY=( ${COMPREPLY[@]/#/$prev,} ) return ;; -O) # argument required but no completions available return ;; esac if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '-V -h -v -n -r -d -i -a -t -O -f -l --no-canonicalize --fake' -- "$cur" ) ) [[ $COMPREPLY ]] && return fi if [[ -r /proc/mounts ]]; then # Linux /proc/mounts is properly quoted. This is important when # unmounting usb devices with pretty names. _linux_fstab < /proc/mounts else local IFS=$'\n' COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- "$cur" ) ) fi } && complete -F _umount -o dirnames umount # ex: ts=4 sw=4 et filetype=sh
[+]
..
[-] swaplabel
[edit]
[-] ping
[edit]
[-] gapplication
[edit]
[-] renice
[edit]
[-] gdbus
[edit]
[-] resizepart
[edit]
[-] gsettings
[edit]
[-] lvrename
[edit]
[-] tc
[edit]
[-] lvresize
[edit]
[-] rpm
[edit]
[-] lvs
[edit]
[-] yum
[edit]
[-] rev
[edit]
[-] ssh
[edit]
[-] yummain.py
[edit]
[-] tailf
[edit]
[-] addpart
[edit]
[-] taskset
[edit]
[-] blkdiscard
[edit]
[-] ul
[edit]
[-] sudo
[edit]
[-] blkid
[edit]
[-] unshare
[edit]
[-] blockdev
[edit]
[-] lvscan
[edit]
[-] cal
[edit]
[-] utmpdump
[edit]
[-] cfdisk
[edit]
[-] uuidgen
[edit]
[-] chcpu
[edit]
[-] wdctl
[edit]
[-] chfn
[edit]
[-] whereis
[edit]
[-] chrt
[edit]
[-] wipefs
[edit]
[-] chsh
[edit]
[-] mdadm
[edit]
[-] col
[edit]
[-] write
[edit]
[-] colcrt
[edit]
[-] zramctl
[edit]
[-] colrm
[edit]
[-] dracut
[edit]
[-] column
[edit]
[-] lsinitrd
[edit]
[-] ctrlaltdel
[edit]
[-] kmod
[edit]
[-] vgck
[edit]
[-] delpart
[edit]
[-] bootctl
[edit]
[-] dmesg
[edit]
[-] busctl
[edit]
[-] eject
[edit]
[-] coredumpctl
[edit]
[-] fallocate
[edit]
[-] hostnamectl
[edit]
[-] fdformat
[edit]
[-] journalctl
[edit]
[-] fdisk
[edit]
[-] kernel-install
[edit]
[-] findmnt
[edit]
[-] localectl
[edit]
[-] flock
[edit]
[-] loginctl
[edit]
[-] fsck
[edit]
[-] machinectl
[edit]
[-] fsck.cramfs
[edit]
[-] systemctl
[edit]
[-] fsck.minix
[edit]
[-] systemd-analyze
[edit]
[-] fsfreeze
[edit]
[-] systemd-cat
[edit]
[-] fstrim
[edit]
[-] systemd-cgls
[edit]
[-] getopt
[edit]
[-] systemd-cgtop
[edit]
[-] hexdump
[edit]
[-] systemd-delta
[edit]
[-] hwclock
[edit]
[-] systemd-detect-virt
[edit]
[-] ionice
[edit]
[-] systemd-nspawn
[edit]
[-] ipcrm
[edit]
[-] systemd-run
[edit]
[-] ipcs
[edit]
[-] timedatectl
[edit]
[-] isosize
[edit]
[-] udevadm
[edit]
[-] ldattach
[edit]
[-] lsmcli
[edit]
[-] logger
[edit]
[-] grub
[edit]
[-] vgs
[edit]
[-] look
[edit]
[-] nmcli
[edit]
[-] losetup
[edit]
[-] tuned-adm
[edit]
[-] lsblk
[edit]
[-] firewall-cmd
[edit]
[-] lscpu
[edit]
[-] bzip2
[edit]
[-] lslocks
[edit]
[-] chage
[edit]
[-] mcookie
[edit]
[-] chgrp
[edit]
[-] mkfs
[edit]
[-] chown
[edit]
[-] mkfs.cramfs
[edit]
[-] chpasswd
[edit]
[-] mkfs.minix
[edit]
[-] cpio
[edit]
[-] wget
[edit]
[-] mkswap
[edit]
[-] curl
[edit]
[-] xz
[edit]
[-] more
[edit]
[-] find
[edit]
[-] mountpoint
[edit]
[-] groupadd
[edit]
[-] namei
[edit]
[-] groupdel
[edit]
[-] nsenter
[edit]
[-] groupmod
[edit]
[-] partx
[edit]
[-] gzip
[edit]
[-] pivot_root
[edit]
[-] ip
[edit]
[-] prlimit
[edit]
[-] mount
[edit]
[-] raw
[edit]
[-] iptables
[edit]
[-] readprofile
[edit]
[-] lvchange
[edit]
[-] rename
[edit]
[-] rtcwake
[edit]
[-] lvcreate
[edit]
[-] runuser
[edit]
[-] lvdisplay
[edit]
[-] script
[edit]
[-] swapon
[edit]
[-] scriptreplay
[edit]
[-] lvextend
[edit]
[-] setarch
[edit]
[-] lvm
[edit]
[-] setpriv
[edit]
[-] lvmdiskscan
[edit]
[-] setsid
[edit]
[-] lvreduce
[edit]
[-] setterm
[edit]
[-] lvremove
[edit]
[-] sfdisk
[edit]
[-] passwd
[edit]
[-] su
[edit]
[-] pvscan
[edit]
[-] pvs
[edit]
[-] pvchange
[edit]
[-] pvcreate
[edit]
[-] pvdisplay
[edit]
[-] pvmove
[edit]
[-] pvremove
[edit]
[-] quota
[edit]
[-] quotacheck
[edit]
[-] quotaoff
[edit]
[-] quotaon
[edit]
[-] repquota
[edit]
[-] setquota
[edit]
[-] tcpdump
[edit]
[-] umount
[edit]
[-] useradd
[edit]
[-] userdel
[edit]
[-] usermod
[edit]
[-] vgcfgbackup
[edit]
[-] vgcfgrestore
[edit]
[-] vgchange
[edit]
[-] vgconvert
[edit]
[-] vgcreate
[edit]
[-] vgdisplay
[edit]
[-] vgexport
[edit]
[-] vgextend
[edit]
[-] vgimport
[edit]
[-] vgmerge
[edit]
[-] vgmknodes
[edit]
[-] vgreduce
[edit]
[-] vgremove
[edit]
[-] vgrename
[edit]
[-] vgscan
[edit]
[-] vgsplit
[edit]
[-] umount.linux
[edit]
[-] semanage
[edit]
[-] setsebool
[edit]