fork/fish-shell

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

Jayfix unknown command __fish_diskutil_volumesc790b1051

master
13.3 KiB200 linesraw
1# completion for diskutil (macOS)
2
3#############
4# Functions #
5#############
6
7function __fish_diskutil_devices
8    set -l mountpoints /dev/disk*
9    printf '%s\n' $mountpoints
10end
11
12function __fish_diskutil_mounted_volumes
13    set -l mountpoints /Volumes/*
14    printf '%s\n' $mountpoints
15end
16
17function __fish_diskutil_using_not_subcommand
18    not __fish_seen_subcommand_from apfs
19    and not __fish_seen_subcommand_from appleRAID
20    and not __fish_seen_subcommand_from coreStorage
21    and __fish_seen_subcommand_from $argv
22end
23
24############
25# Commands #
26############
27
28# list
29complete -f -c diskutil -n __fish_use_subcommand -a list -d 'List disks'
30complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand list' -o plist -d 'Return a property list'
31complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand list' -a '(__fish_diskutil_devices)'
32
33# info
34complete -f -c diskutil -n __fish_use_subcommand -a info -d 'Get detailed information about a specific whole disk or partition'
35complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand info' -o plist -d 'Return a property list'
36complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand info' -a '(__fish_diskutil_devices)'
37complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand info' -o all -d 'Process all disks'
38
39# activity
40complete -f -c diskutil -n __fish_use_subcommand -a activity -d 'Continuously display system-wide disk manipulation activity'
41
42# listFilesystems
43complete -f -c diskutil -n __fish_use_subcommand -a listFilesystems -d 'Show the file system personalities available'
44complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand listFilesystems' -o plist -d 'Return a property list'
45
46# umount
47complete -f -c diskutil -n __fish_use_subcommand -a umount -d 'Unmount a single volume'
48complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand umount' -a '(__fish_diskutil_mounted_volumes)'
49
50# umountDisk
51complete -f -c diskutil -n __fish_use_subcommand -a umountDisk -d 'Unmount an entire disk (all volumes)'
52complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand umountDisk' -a '(__fish_diskutil_mounted_volumes)'
53
54# eject
55complete -f -c diskutil -n __fish_use_subcommand -a eject -d 'Eject a volume or disk'
56complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_mounted_volumes ; __fish_diskutil_devices)'
57
58# mount
59complete -f -c diskutil -n __fish_use_subcommand -a mount -d 'Mount a single volume'
60complete -r -c diskutil -n '__fish_diskutil_using_not_subcommand mount' -o mountPoint -d 'Specify mount point'
61complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand mount' -a '(__fish_diskutil_devices)'
62
63# mountDisk
64complete -f -c diskutil -n __fish_use_subcommand -a mountDisk -d 'Mount an entire disk (all mountable volumes)'
65complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand mountDisk' -a '(__fish_diskutil_devices)'
66
67# rename
68complete -f -c diskutil -n __fish_use_subcommand -a rename -d 'Rename a volume'
69complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand rename' -a '(__fish_diskutil_devices)'
70
71# enableJournal
72complete -f -c diskutil -n __fish_use_subcommand -a enableJournal -d 'Enable journaling on an HFS+ volume'
73complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand enableJournal' -a '(__fish_diskutil_devices)'
74
75# disableJournal
76complete -f -c diskutil -n __fish_use_subcommand -a disableJournal -d 'Disable journaling on an HFS+ volume'
77complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand disableJournal' -a '(__fish_diskutil_devices)'
78
79# moveJournal
80complete -f -c diskutil -n __fish_use_subcommand -a moveJournal -d 'Create a 512MB Apple_Journal partition'
81complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand moveJournal' -a '(__fish_diskutil_devices)'
82
83# enableOwnership
84complete -f -c diskutil -n __fish_use_subcommand -a enableOwnership -d 'Enable ownership of a volume'
85complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand enableOwnership' -a '(__fish_diskutil_devices)'
86
87# disableOwnership
88complete -f -c diskutil -n __fish_use_subcommand -a disableOwnership -d 'Disable ownership of a volume'
89complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand disableOwnership' -a '(__fish_diskutil_devices)'
90
91# verifyVolume
92complete -f -c diskutil -n __fish_use_subcommand -a verifyVolume -d 'Verify the file system data structures of a volume'
93complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand verifyVolume' -a '(__fish_diskutil_devices)'
94
95# repairVolume
96complete -f -c diskutil -n __fish_use_subcommand -a repairVolume -d 'Repair the file system data structures of a volume'
97complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand repairVolume' -a '(__fish_diskutil_devices)'
98
99# verifyDisk
100complete -f -c diskutil -n __fish_use_subcommand -a verifyDisk -d 'Verify the partition map layout of a whole disk'
101complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand verifyDisk' -a '(__fish_diskutil_devices)'
102
103# repairDisk
104complete -f -c diskutil -n __fish_use_subcommand -a repairDisk -d 'Repair the partition map layout of a whole disk'
105complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand repairDisk' -a '(__fish_diskutil_devices)'
106
107# eraseDisk
108complete -f -c diskutil -n __fish_use_subcommand -a eraseDisk -d 'Erase an existing disk'
109complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eraseDisk' -a '(__fish_diskutil_devices)'
110
111# eraseVolume
112complete -f -c diskutil -n __fish_use_subcommand -a verifyDisk -d 'Write out a new empty file system volume'
113complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand verifyDisk' -a '(__fish_diskutil_devices)'
114
115# reformat
116complete -f -c diskutil -n __fish_use_subcommand -a reformat -d 'Erase an existing volume by writing out a new empty file system'
117complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand reformat' -a '(__fish_diskutil_devices)'
118
119# eraseOptical
120complete -f -c diskutil -n __fish_use_subcommand -a eraseOptical -d 'Erase optical media (CD/RW, DVD/RW, etc.)'
121complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eraseOptical' -a '(__fish_diskutil_devices)'
122
123# zeroDisk
124complete -f -c diskutil -n __fish_use_subcommand -a zeroDisk -d 'Erase a device, writing zeros to the media'
125complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand zeroDisk' -a '(__fish_diskutil_devices)'
126
127# randomDisk
128complete -f -c diskutil -n __fish_use_subcommand -a randomDisk -d 'Erase a whole disk, writing random data to the media'
129complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand randomDisk' -a '(__fish_diskutil_devices)'
130
131# secureErase
132complete -f -c diskutil -n __fish_use_subcommand -a secureErase -d 'Erase, using a secure method'
133complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand secureErase' -a '(__fish_diskutil_devices)'
134
135# partitionDisk
136complete -f -c diskutil -n __fish_use_subcommand -a partitionDisk -d '(re)Partition a disk, removing all volumes'
137complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand partitionDisk' -a '(__fish_diskutil_devices)'
138
139# resizeVolume
140complete -f -c diskutil -n __fish_use_subcommand -a resizeVolume -d 'Non-destructively resize a volume (partition)'
141complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand resizeVolume' -a '(__fish_diskutil_devices)'
142
143# splitPartition
144complete -f -c diskutil -n __fish_use_subcommand -a splitPartition -d 'Destructively split a volume into multiple partitions'
145complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand splitPartition' -a '(__fish_diskutil_devices)'
146
147# mergePartitions
148complete -f -c diskutil -n __fish_use_subcommand -a mergePartitions -d 'Merge two or more partitions on a disk'
149complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand mergePartitions' -a '(__fish_diskutil_devices)'
150
151# apfs
152complete -f -c diskutil -n __fish_use_subcommand -a apfs -d 'Merge two or more partitions on a disk'
153complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a list -d 'Show status of all current APFS Containers'
154complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a convert -d 'Nondestructively convert from HFS to APFS'
155complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a create -d 'Create a new APFS Container with one APFS Volume'
156complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a createContainer -d 'Create a new empty APFS Container'
157complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a deleteContainer -d 'Delete an APFS Container and reformat disks to HFS'
158complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a resizeContainer -d 'Resize an APFS Container and its disk space usage'
159complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a addVolume -d 'Export a new APFS Volume from an APFS Container'
160complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a deleteVolume -d 'Remove an APFS Volume from its APFS Container'
161complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a eraseVolume -d 'Erase contents of, but keep, an APFS Volume'
162complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a changeVolumeRole -d 'Change the Role metadata bits of an APFS Volume'
163complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a unlockVolume -d 'Unlock an encrypted APFS Volume which is locked'
164complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a lockVolume -d 'Lock an encrypted APFS Volume (diskutil unmount)'
165complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a listCryptoUsers -d 'List cryptographic users of encrypted APFS Volume'
166complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a changePassphrase -d 'Change the passphrase of a cryptographic user'
167complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a setPassphraseHint -d 'Set or clear passphrase hint of a cryptographic user'
168complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a encryptVolume -d 'Start async encryption of an unencrypted APFS Volume'
169complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a decryptVolume -d 'Start async decryption of an encrypted APFS Volume'
170complete -f -c diskutil -n '__fish_seen_subcommand_from apfs' -a updatePreboot -d 'Update the APFS Volume\'s related APFS Preboot Volume'
171
172# appleRAID
173complete -f -c diskutil -n __fish_use_subcommand -a appleRAID -d 'Create, manipulate and destroy AppleRAID volumes'
174complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a list -d 'Display the current status of RAID sets'
175complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a create -d 'Create a RAID set on multiple disks'
176complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a delete -d 'Delete an existing RAID set'
177complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a repairMirror -d 'Repair a damaged RAID mirror set'
178complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a add -d 'Add a spare or member disk to an existing RAID'
179complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a remove -d 'Remove a spare or member disk from an existing RAID'
180complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a enable -d 'Convert a volume into a single disk RAID set'
181complete -f -c diskutil -n '__fish_seen_subcommand_from appleRAID' -a update -d 'Update the settings of an existing RAID'
182
183# coreStorage
184complete -f -c diskutil -n __fish_use_subcommand -a coreStorage -d 'Create, manipulate and destroy CoreStorage volumes'
185complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a list -d 'Show status of CoreStorage volumes'
186complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a info -d 'Get CoreStorage information by UUID or disk'
187complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a convert -d 'Convert a volume into a CoreStorage volume'
188complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a revert -d 'Revert a CoreStorage volume to its native type'
189complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a create -d 'Create a new CoreStorage logical volume group'
190complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a delete -d 'Delete a CoreStorage logical volume group'
191complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a rename -d 'Rename a CoreStorage logical volume group'
192complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a createVolume -d 'Create a new CoreStorage logical volume'
193complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a deleteVolume -d 'Delete a volume from a logical volume group'
194complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a encryptVolume -d 'Start encrypting a CoreStorage logical volume'
195complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a decryptVolume -d 'Start decrypting a CoreStorage logical volume'
196complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a unlockVolume -d 'Attach/mount a locked CoreStorage logical volume'
197complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a changeVolumePassphrase -d 'Change a CoreStorage logical volume\'s passphrase'
198complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a resizeVolume -d 'Resize a CoreStorage volume'
199complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a resizeDisk -d 'Resize a CoreStorage physical volume disk'
200complete -f -c diskutil -n '__fish_seen_subcommand_from coreStorage' -a resizeStack -d 'Resize a CoreStorage logical/physical volume set'