2013-06-04 16:33:41 +08:00
|
|
|
#completion for apt-mark
|
|
|
|
|
2017-10-12 01:17:35 +08:00
|
|
|
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
|
2024-01-22 14:42:45 +08:00
|
|
|
for i in (commandline -xpc)
|
2024-11-15 06:01:54 +08:00
|
|
|
if contains -- $i auto manual minimize-manual hold unhold showauto showmanual showhold
|
2019-05-05 18:53:09 +08:00
|
|
|
return 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return 0
|
2013-06-04 16:33:41 +08:00
|
|
|
end
|
|
|
|
|
2017-10-12 01:17:35 +08:00
|
|
|
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
|
2024-01-22 14:42:45 +08:00
|
|
|
for i in (commandline -xpc)
|
2019-05-05 18:53:09 +08:00
|
|
|
if contains -- $i contains auto manual hold unhold
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return 1
|
2013-06-04 16:33:41 +08:00
|
|
|
end
|
|
|
|
|
2020-09-23 01:24:04 +08:00
|
|
|
complete -c apt-mark -n __fish_apt_use_package -a '(__fish_print_apt_packages)' -d Package
|
2013-06-04 16:33:41 +08:00
|
|
|
|
2017-10-12 01:17:35 +08:00
|
|
|
complete -c apt-mark -s h -l help -d 'Display help and exit'
|
2020-03-10 02:36:12 +08:00
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a auto -d 'Mark a package as automatically installed'
|
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a manual -d 'Mark a package as manually installed'
|
2024-11-15 06:01:54 +08:00
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a minimize-manual -d 'Mark all dependencies of meta packages as auto'
|
2020-03-10 02:36:12 +08:00
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a hold -d 'Hold a package, prevent automatic installation or removal'
|
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a unhold -d 'Cancel a hold on a package'
|
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a showauto -d 'Show automatically installed packages'
|
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a showmanual -d 'Show manually installed packages'
|
|
|
|
complete -f -n __fish_apt_no_subcommand -c apt-mark -a showhold -d 'Show held packages'
|
2017-10-12 01:17:35 +08:00
|
|
|
complete -c apt-mark -s v -l version -d 'Display version and exit'
|
|
|
|
complete -r -c apt-mark -s c -l config-file -d 'Specify a config file'
|
|
|
|
complete -r -c apt-mark -s o -l option -d 'Set a config option'
|
2024-11-15 06:01:54 +08:00
|
|
|
complete -c apt-mark -l color -d 'Turn colors on'
|
|
|
|
complete -c apt-mark -l no-color -d 'Turn colors off'
|
2017-10-12 01:17:35 +08:00
|
|
|
complete -r -c apt-mark -s f -l file -d 'Write package statistics to a file'
|