fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
d835c5252
master
1# localization: tier3 2function __fish_complete_zfs_ro_properties 3echo -e"available\tAvailable space" 4echo -e"avail\tAvailable space" 5echo -e"compressratio\tAchieved compression ratio" 6echo -e"creation\tDataset creation time" 7echo -e"clones\tSnapshot clones" 8echo -e"defer_destroy\tMarked for deferred destruction" 9echo -e"filesystem_count\tTotal lower-level filesystems and volumes" 10echo -e"logicalreferenced\tLogical total space" 11echo -e"lrefer\tLogical total space" 12echo -e"logicalused\tLogical used space" 13echo -e"lused\tLogical used space" 14echo -e"mounted\tIs currently mounted?" 15echo -e"origin\tSource snapshot" 16if __fish_is_zfs_feature_enabled "feature@extensible_dataset" 17echo -e"receive_resume_token\tToken for interrupted reception resumption" 18end 19echo -e"referenced\tTotal space" 20echo -e"refer\tTotal space" 21echo -e"refcompressratio\tAchieved compression ratio of referenced space" 22echo -e"snapshot_count\tTotal lower-level snapshots" 23echo -e"type\tDataset type" 24echo -e"used\tSpace used by dataset and children" 25echo -e"usedbychildren\tSpace used by children datasets" 26echo -e"usedbydataset\tSpace used by dataset itself" 27echo -e"usedbyrefreservation\tSpace used by refreservation" 28echo -e"usedbysnapshots\tSpace used by dataset snapshots" 29echo -e"userrefs\tHolds count" 30echo -e"volblocksize\tVolume block size" 31echo -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 33for userin ( __fish_print_users ) 34set -l tabAndBefore( echo -e"userused@ $user \t" ) 35printf "%sDataset space use by user %s\n" $tabAndBefore $user 36end 37# Autogenerate groupused@$USER list 38for groupin ( __fish_print_groups ) 39set -l tabAndBefore( echo -e"groupused@ $group \t" ) 40printf "%sDataset space use by group %s\n" $tabAndBefore $group 41end 42# Autogenerate written@$SNAPSHOT list 43for snapshotin ( __fish_print_zfs_snapshots ) 44set -l tabAndBefore( echo -e"written@ $snapshot \t" ) 45printf "%sReferenced data written since snapshot %s\n" $tabAndBefore $snapshot 46end 47end