2022-01-24 05:51:09 +00:00
|
|
|
function __attributes_disk_complete_args
|
2022-01-27 06:02:23 +00:00
|
|
|
if not __fish_seen_subcommand_from set clear
|
|
|
|
echo -e 'set\tSet the specified attribute of the disk with focus
|
2021-11-26 08:46:02 +00:00
|
|
|
clear\tClear the specified attribute of the disk with focus'
|
2022-01-27 06:02:23 +00:00
|
|
|
return
|
|
|
|
end
|
2021-11-25 04:00:45 +00:00
|
|
|
|
2022-01-27 06:02:23 +00:00
|
|
|
echo -e 'readonly\tSpecify that the disk is read-only
|
2021-11-25 08:12:14 +00:00
|
|
|
noerr\tWhen an error is encountered, DiskPart continues to process commands'
|
2021-11-26 08:46:02 +00:00
|
|
|
end
|
2021-11-25 04:00:45 +00:00
|
|
|
|
2022-01-24 05:51:09 +00:00
|
|
|
function __attributes_volume_complete_args
|
2022-01-27 06:02:23 +00:00
|
|
|
if not __fish_seen_subcommand_from set clear
|
|
|
|
echo -e 'set\tSet the specified attribute of the volume with focus
|
2021-11-25 08:12:14 +00:00
|
|
|
clear\tClear the specified attribute of the volume with focus'
|
2022-01-27 06:02:23 +00:00
|
|
|
return
|
|
|
|
end
|
2021-11-25 04:00:45 +00:00
|
|
|
|
2022-01-27 06:02:23 +00:00
|
|
|
if not __fish_seen_subcommand_from readonly hidden nodefaultdriveletter shadowcopy
|
|
|
|
echo -e 'readonly\tSpecify that the volume is read-only
|
2022-01-24 10:10:56 +00:00
|
|
|
hidden\tSpecify that the volume is hidden
|
2021-11-25 08:12:14 +00:00
|
|
|
nodefaultdriveletter\tSpecify that the volume does not receive a drive letter by default
|
2022-01-24 10:10:56 +00:00
|
|
|
shadowcopy\tSpecify that the volume is a shadow copy volume'
|
2022-01-27 06:02:23 +00:00
|
|
|
end
|
2022-01-24 10:10:56 +00:00
|
|
|
|
2022-01-27 06:02:23 +00:00
|
|
|
echo -e 'noerr\tWhen an error is encountered, DiskPart continues to process commands'
|
2021-11-26 08:46:02 +00:00
|
|
|
end
|
|
|
|
|
2022-01-24 10:10:56 +00:00
|
|
|
function __attributes_complete_args -d 'Function to generate args'
|
2022-01-27 06:02:23 +00:00
|
|
|
if __fish_seen_subcommand_from disk
|
|
|
|
__attributes_disk_complete_args
|
|
|
|
else if __fish_seen_subcommand_from volume
|
|
|
|
__attributes_volume_complete_args
|
|
|
|
end
|
2021-11-25 04:00:45 +00:00
|
|
|
end
|
|
|
|
|
2022-01-24 10:10:56 +00:00
|
|
|
complete -c attributes -f -a '(__attributes_complete_args)'
|
2022-01-24 10:43:28 +00:00
|
|
|
|
|
|
|
complete -c attributes -f -n 'not __fish_seen_subcommand_from disk volume' -a disk \
|
|
|
|
-d 'Display, set, or clear the attributes of a disk'
|
|
|
|
complete -c attributes -f -n 'not __fish_seen_subcommand_from dick volume' -a volume \
|
|
|
|
-d 'Display, set, or clear the attributes of a volume'
|