File: __fish_complete_zfs_mountpoint_properties.fish

package info (click to toggle)
fish 3.1.2-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 38,672 kB
  • sloc: ansic: 80,259; cpp: 47,069; javascript: 17,087; sh: 6,163; python: 3,429; makefile: 669; perl: 367; objc: 78; xml: 18
file content (29 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function __fish_complete_zfs_mountpoint_properties -d "Completes with ZFS mountpoint properties"
    set -l OS ""
    switch (uname)
        case Linux
            set OS "Linux"
        case Darwin
            set OS "macOS"
        case FreeBSD
            set OS "FreeBSD"
        case SunOS
            set OS "SunOS"
            # Others?
        case "*"
            set OS "unknown"
    end
    echo -e "atime\t"(_ "Update access time on read")" (on, off)"
    echo -e "devices\t"(_ "Are contained device nodes openable")" (on, off)"
    echo -e "exec\t"(_ "Can contained executables be executed")" (on, off)"
    echo -e "readonly\t"(_ "Read-only")" (on, off)"
    echo -e "setuid\t"(_ "Respect set-UID bit")" (on, off)"
    if test $OS = "SunOS"
        echo -e "nbmand\t"(_ "Mount with Non Blocking mandatory locks")" (on, off)"
        echo -e "xattr\t"(_ "Extended attributes")" (on, off, sa)"
    else if test $OS = "Linux"
        echo -e "nbmand\t"(_ "Mount with Non Blocking mandatory locks")" (on, off)"
        echo -e "relatime\t"(_ "Sometimes update access time on read")" (on, off)"
        echo -e "xattr\t"(_ "Extended attributes")" (on, off, sa)"
    end
end