fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Julien GautierUpdate 'mount' completion script with the generated one, and update_translations4279a4f87

master
3.3 KiB42 linesraw
1# Completions for mount
2
3complete -c mount -a '(__fish_complete_blockdevice)'
4# In case `mount UUID=` and similar also works
5complete -c mount -a "(test -r /etc/fstab; and string replace -r '#.*' '' < /etc/fstab | string match -r '.+' | string replace -r ' (\S*) .*' '\tMount point \$1' | string replace -a '\040' ' ')"
6complete -c mount -a "(test -r /etc/fstab; and string replace -r '#.*' '' < /etc/fstab | string match -r '.+' | string replace -r '(\S*) (\S*) .*' '\$2\tDevice \$1' | string replace -a '\040' ' ')"
7# In case it doesn't
8# complete -x -c mount -a "(test -r /etc/fstab; and string match -r '^/.*' < /etc/fstab | string replace -r ' ([^\s]*) .*' '\tMount point \$1')"
9# complete -x -c mount -a "(test -r /etc/fstab; and string match -r '^/.*' < /etc/fstab | string replace -r '(^/[^\s]*) ([^\s]*) .*' '\$2\tDevice \$1')"
10
11complete -c mount -s a -l all -d 'Mount file systems in fstab'
12complete -c mount -s B -l bind -f -d 'Remount a subtree to a second position'
13complete -c mount -s c -l no-canonicalize -d 'Do not canonicalize any paths or tags during the mount process'
14complete -c mount -s F -l fork -d 'Fork process for each mount'
15complete -c mount -s f -l fake -d 'Fake mounting'
16complete -c mount -s i -l internal-only -d 'Don’t call the /sbin/mount.filesystem helper even if it exists'
17complete -c mount -s L -l label -x -d 'Mount partition with specified label'
18complete -c mount -s l -l show-labels -d 'Add label to output'
19complete -c mount -s M -l move -f -d 'Move a subtree to a new position'
20complete -c mount -s m -l mkdir -d 'Allow to make a target directory (mountpoint) if it does not exist yet'
21complete -c mount -l map-groups -l map-users -d 'Add the specified user/group mapping to an X-mount.idmap map'
22complete -c mount -s n -l no-mtab -d 'Do not write mtab'
23complete -c mount -s N -l namespace -r -d 'Perform the mount operation in the mount namespace specified by ns'
24complete -c mount -s O -l test-opts -x -d 'Exclude file systems'
25complete -c mount -s o -l options -x -a '(__fish_complete_mount_opts)' -d 'Mount option'
26complete -c mount -l onlyonce -d 'Check if already mounted'
27complete -c mount -l options-mode -a "ignore append prepend replace" -d 'how to combine with options from fstab/mtab'
28complete -c mount -l options-source -d 'Source of default options'
29complete -c mount -l options-source-force -d 'Use options from fstab/mtab even if both device and dir are specified'
30complete -c mount -s R -l rbind -d 'Remount a subtree and all possible submounts somewhere else'
31complete -c mount -s r -l read-only -d 'Read only'
32complete -c mount -s s -d 'Tolerate sloppy mount options'
33complete -c mount -l source -r -d 'explicitly define the argument as the mount source'
34complete -c mount -l target -r -d 'explicitly define the argument as the mount target'
35complete -c mount -l target-prefix -r -d 'Prepend the specified directory to all mount targets'
36complete -c mount -s T -l fstab -r -d 'Specifies an alternative fstab file'
37complete -c mount -s t -l types -x -a '(__fish_print_filesystems)' -d 'File system'
38complete -c mount -s U -l uuid -x -d 'Mount partition with specified UID'
39complete -c mount -s v -l verbose -d 'Verbose mode'
40complete -c mount -s w -l rw -l read-write -d 'Read/Write mode'
41complete -c mount -s h -l help -d 'Display help and exit'
42complete -c mount -s V -l version -d 'Display version and exit'