fork/fish-shell

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

Johannes AltmanningerPrepare to not localize private function descriptionsd835c5252

master
2.3 KiB47 linesraw
1# localization: tier3
2function __fish_complete_zfs_ro_properties
3    echo -e "available\tAvailable space"
4    echo -e "avail\tAvailable space"
5    echo -e "compressratio\tAchieved compression ratio"
6    echo -e "creation\tDataset creation time"
7    echo -e "clones\tSnapshot clones"
8    echo -e "defer_destroy\tMarked for deferred destruction"
9    echo -e "filesystem_count\tTotal lower-level filesystems and volumes"
10    echo -e "logicalreferenced\tLogical total space"
11    echo -e "lrefer\tLogical total space"
12    echo -e "logicalused\tLogical used space"
13    echo -e "lused\tLogical used space"
14    echo -e "mounted\tIs currently mounted?"
15    echo -e "origin\tSource snapshot"
16    if __fish_is_zfs_feature_enabled "feature@extensible_dataset"
17        echo -e "receive_resume_token\tToken for interrupted reception resumption"
18    end
19    echo -e "referenced\tTotal space"
20    echo -e "refer\tTotal space"
21    echo -e "refcompressratio\tAchieved compression ratio of referenced space"
22    echo -e "snapshot_count\tTotal lower-level snapshots"
23    echo -e "type\tDataset type"
24    echo -e "used\tSpace used by dataset and children"
25    echo -e "usedbychildren\tSpace used by children datasets"
26    echo -e "usedbydataset\tSpace used by dataset itself"
27    echo -e "usedbyrefreservation\tSpace used by refreservation"
28    echo -e "usedbysnapshots\tSpace used by dataset snapshots"
29    echo -e "userrefs\tHolds count"
30    echo -e "volblocksize\tVolume block size"
31    echo -e "written\tReferenced data written since previous snapshot"
32    # Autogenerate userused@$USER list; only usernames are supported by the completion, but the zfs command supports more formats
33    for user in (__fish_print_users)
34        set -l tabAndBefore (echo -e "userused@$user\t")
35        printf "%sDataset space use by user %s\n" $tabAndBefore $user
36    end
37    # Autogenerate groupused@$USER list
38    for group in (__fish_print_groups)
39        set -l tabAndBefore (echo -e "groupused@$group\t")
40        printf "%sDataset space use by group %s\n" $tabAndBefore $group
41    end
42    # Autogenerate written@$SNAPSHOT list
43    for snapshot in (__fish_print_zfs_snapshots)
44        set -l tabAndBefore (echo -e "written@$snapshot\t")
45        printf "%sReferenced data written since snapshot %s\n" $tabAndBefore $snapshot
46    end
47end