Completion for attributes command

This commit is contained in:
EmilySeville7cfg 2021-11-25 14:00:45 +10:00 committed by ridiculousfish
parent 4f07bb8824
commit bf72247e1a

View file

@ -0,0 +1,36 @@
function __attributes_generate_args --description 'Function to generate args'
if ! __fish_seen_subcommand_from disk volume
echo -e 'disk\tManipulate disk attributes
volume\tManipulate volume attributes'
return
end
if __fish_seen_subcommand_from disk
if ! __fish_seen_subcommand_from set clear
echo -e 'set\tSet an attribute of the disk with focus
clear\tUnset an attribute of the disk with focus'
return
end
echo -e 'readonly\tUse readonly attribute
noerr\tSuppress errors for DiskPart'
return
end
if __fish_seen_subcommand_from volume
if ! __fish_seen_subcommand_from set clear
echo -e 'set\tSet an attribute of the volume with focus
clear\tUnset an attribute of the disk volume focus'
return
end
echo -e 'readonly\tUse readonly attribute
readonly\tUse hidden attribute
nodefaultdriveletter\tDon\'t use a drive letter by default
shadowcopy\tSet volume type to shadow copy volume
noerr\tSuppress errors for DiskPart'
return
end
end
complete --command attributes --no-files --arguments '(__attributes_generate_args)'