From b8740bf1468e68912c3bcb04fc46ffe4074d519e Mon Sep 17 00:00:00 2001 From: neoniobium <98603365+neoniobium@users.noreply.github.com> Date: Sun, 26 Oct 2025 18:14:19 +0100 Subject: [PATCH 1/4] Update debug_overrides.sh with new content --- src/debug_overrides.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/debug_overrides.sh b/src/debug_overrides.sh index 2be5676..2934e70 100644 --- a/src/debug_overrides.sh +++ b/src/debug_overrides.sh @@ -1,19 +1,26 @@ # Debug overriding to activate debug logging for qubes-completion +# This file is intended as an opt-in developer/test helper. +# By default it should NOT enable debug logging for users who install the completion package. +# To enable debug mode, copy this file to the installation directory (next to qubes-completion.sh) +# and set QB_DEBUG_MODE=1 here, or create your own override file and export QB_DEBUG_OVERRIDE_FILE environment +# variable pointing to it. This avoids surprising users with debug logs enabled by default. -QB_DEBUG_MODE=1 +# Default: debug off +QB_DEBUG_MODE=0 +# Example: enable debug by changing the value above to 1 and editing paths below. if (( QB_DEBUG_MODE != 0 )); then __debug_overrides_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)" # Relative paths (one way to use it): - QVMTOOL_QVM_FIREWALL="${__debug_overrides_script_dir}/../stubs/qvm-firewall" - QVMTOOL_QVM_LS="${__debug_overrides_script_dir}/../stubs/qvm-ls" - QVMTOOL_QVM_TAGS="${__debug_overrides_script_dir}/../stubs/qvm-tags" - QVMTOOL_QVM_DEVICE="${__debug_overrides_script_dir}/../stubs/qvm-device" - QVMTOOL_QVM_POOL="${__debug_overrides_script_dir}/../stubs/qvm-pool" - QVMTOOL_QVM_TEMPLATE="${__debug_overrides_script_dir}/../stubs/qvm-template" + QVMTOOL_QVM_FIREWALL=""){__debug_overrides_script_dir}/../stubs/qvm-firewall" + QVMTOOL_QVM_LS=""){__debug_overrides_script_dir}/../stubs/qvm-ls" + QVMTOOL_QVM_TAGS=""){__debug_overrides_script_dir}/../stubs/qvm-tags" + QVMTOOL_QVM_DEVICE=""){__debug_overrides_script_dir}/../stubs/qvm-device" + QVMTOOL_QVM_POOL=""){__debug_overrides_script_dir}/../stubs/qvm-pool" + QVMTOOL_QVM_TEMPLATE=""){__debug_overrides_script_dir}/../stubs/qvm-template" # These full paths of stubs are provided as an example, # if you want absolute paths, you should change them according to your locations: @@ -24,10 +31,10 @@ if (( QB_DEBUG_MODE != 0 )); then # QVMTOOL_QVM_POOL='/home/user/projects/bash/qubes-completion/stubs/qvm-pool' QB_DEBUG_LOG=1 - QB_DEBUG_LOG_PATH="${__debug_overrides_script_dir}/../log/qubes_completion_debug.log" + QB_DEBUG_LOG_PATH=""){__debug_overrides_script_dir}/../log/qubes_completion_debug.log" QB_DEBUG_STUB_FILEDIR_OUTPUT='dir1 dir2 _dir file1 file2 file33 file _file something' - QB_DEBUG_STUB_PROFILES_DIR="${__debug_overrides_script_dir}/../stubs/profiles" + QB_DEBUG_STUB_PROFILES_DIR=""){__debug_overrides_script_dir}/../stubs/profiles" QB_DEBUG_STUB_RPM_KERNELS_OUTPUT=$'kernel-6.11.11-1.qubes.fc37.x86_64\nkernel-6.12.20-1.qubes.fc37.x86_64\nkernel-6.12.40-1.qubes.fc37.x86_64' fi From f52fdfe315c6465c5f2865823bd1737f7ac86a28 Mon Sep 17 00:00:00 2001 From: neoniobium Date: Tue, 24 Feb 2026 13:39:56 +0100 Subject: [PATCH 2/4] update for Q4.3 --- src/qubes-completion.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qubes-completion.sh b/src/qubes-completion.sh index 8b32147..960e6f6 100644 --- a/src/qubes-completion.sh +++ b/src/qubes-completion.sh @@ -2411,12 +2411,12 @@ function _qvm_features() { __is_prev_flag_not_empty && return 0; # unknown prev flag expects sub-argument (e.g. --unknown_flag=) # cSpell:disable - local -r vm_common_features='gui gui-emulated gui-default-allow-utf8-titles input-dom0-proxy qrexec rpc-clipboard no-monitor-layout internal appmenus-legacy appmenus-dispvm qubes-firewall updates-available video-model net.fake-ip net.fake-gateway net.fake-netmask pci-e820-host linux-stubdom tag-created-vm-with set-created-guivm check-updates menu-items qubesmanager.maxmem_value servicevm service.clocksync service.qubes-update-check default-menu-items netvm-menu-items os vmexec audio-model stubdom-qrexec timezone timer-period out.latency out.buffer-length gui-videoram-min gui-videoram-overhead gui-default-secure-copy-sequence gui-default-secure-paste-sequence last-update last-update-check selinux apparmor' + local -r vm_common_features='anon-timezone app-dispvm. apparmor appmenus-dispvm appmenus-legacy audio-model boot-mode.active boot-mode.appvm-default boot-mode.kernelopts.sysmaint boot-mode.kernelopts.unrestricted boot-mode.kernelopts.user boot-mode.default-user.sysmaint boot-mode.name.sysmaint boot-mode.name.unrestricted boot-mode.name.user check-update custom-persist. default-menu-items expert-mode gui gui-default-allow-utf8-titles gui-default-secure-copy-sequence gui-default-secure-paste-sequence gui-emulated gui-videoram-min gui-videoram-overhead input-dom0-proxy internal last-update last-updates-check linux-stubdom memory-hotplug menu-items net.fake-gateway net.fake-ip net.fake-netmask netvm-menu-items no-monitor-layout os out.buffer-length out.latency pci-e820-host pci-e820-host preload-dispvm preload-dispvm-completed preload-dispvm-max preload-dispvm-threshold preload-dispvm-completed preload-dispvm-in-progress prohibit-start qemu-extra-args qrexec qubes-agent-version qubes-firewall qubesmanager.maxmem_value rpc-clipboard selinux service.clocksync service.qubes-update-check servicevm set-created-guivm skip-start stubdom-qrexec supported-feature. tag-created-vm-with timer-period timezone updates-available video-model video-model vm-config. vmexec os-distribution os-version os-eol' local -r vm_template_features='template-name template-epoch template-version template-release template-reponame template-buildtime template-installtime template-license template-url template-summary template-description' - local -r vm_service_features='supported-service.apparmor supported-service.crond supported-service.network-manager supported-service.pipewire supported-service.cups supported-service.gui-agent-clipboard-wipe supported-service.guivm-gui-agent supported-service.qubes-update-check supported-service.qubes-updates-proxy supported-service.qubes-firewall supported-service.qubes-network supported-service.clocksync supported-service.updates-proxy-setup supported-service.meminfo-writer supported-service.modem-manager supported-service.blueman' - local -r vm_rpc_features='supported-rpc.qubes.SetMonitorLayout supported-rpc.qubes.SelectFile supported-rpc.qubes.UpdatesProxy supported-rpc.qubes.TemplateDownload supported-rpc.qubes.PostInstall supported-rpc.qubes.VMExec supported-rpc.qubes.Backup supported-rpc.qubes.ShowInTerminal supported-rpc.qubes.RegisterBackupLocation supported-rpc.qubes.WaitForSession supported-rpc.qubes.SetDateTime supported-rpc.qubes.TemplateSearch supported-rpc.qubes.GetAppmenus supported-rpc.qubes.DetachPciDevice supported-rpc.qubes.SuspendPost supported-rpc.qubes.OpenURL supported-rpc.qubes.StartApp supported-rpc.qubes.ConnectTCP supported-rpc.qubes.ResizeDisk supported-rpc.qubes.SuspendPreAll supported-rpc.qubes.SelectDirectory supported-rpc.qubes.VMRootShell supported-rpc.qubes.Gpg supported-rpc.qubes.PdfConvert supported-rpc.qubes.USBDetach supported-rpc.qubes.RestoreById supported-rpc.qubes.GpgImportKey supported-rpc.qubes.GuiVMSession supported-rpc.qubes.VMExecGUI supported-rpc.qubes.USB supported-rpc.qubes.Filecopy supported-rpc.qubes.SuspendPostAll supported-rpc.qubes.VMShell supported-rpc.qubes.GetImageRGBA supported-rpc.qubes.GetDate supported-rpc.qubes.SuspendPre supported-rpc.qubes.USBAttach supported-rpc.qubes.InstallUpdatesGUI supported-rpc.qubes.OpenInVM supported-rpc.qubes.SaltLinuxVM supported-rpc.qubes.Restore supported-rpc.qubes.AudioInputEnable supported-rpc.qubes.AudioInputDisable' + local -r vm_service_features='supported-feature.keyboard-layout supported-feature.memory-hotplug supported-service.apparmor supported-service.blueman supported-service.clocksync supported-service.crond supported-service.cups supported-service.gui-agent-clipboard-wipe supported-service.guivm-gui-agent supported-service.meminfo-writer supported-service.minimal-netvm supported-service.minimal-usbvm supported-service.modem-manager supported-service.network-manager supported-service.no-qubesincoming-cleanup supported-service.pipewire supported-service.qubes-firewall supported-service.qubes-network supported-service.qubes-update-check supported-service.qubes-updates-proxy supported-service.updates-proxy-setup' + local -r vm_rpc_features='supported-rpc.qubes.AudioInputDisable supported-rpc.qubes.AudioInputEnable supported-rpc.qubes.Backup supported-rpc.qubes.ConnectTCP supported-rpc.qubes.DetachPciDevice supported-rpc.qubes.Filecopy supported-rpc.qubes.GetAppmenus supported-rpc.qubes.GetDate supported-rpc.qubes.GetImageRGBA supported-rpc.qubes.Gpg supported-rpc.qubes.GpgImportKey supported-rpc.qubes.GuiVMSession supported-rpc.qubes.InstallUpdatesGUI supported-rpc.qubes.OpenInVM supported-rpc.qubes.OpenURL supported-rpc.qubes.PdfConvert supported-rpc.qubes.PostInstall supported-rpc.qubes.RegisterBackupLocation supported-rpc.qubes.RemoveAppMenusFor supported-rpc.qubes.ResizeDisk supported-rpc.qubes.Restore supported-rpc.qubes.RestoreById supported-rpc.qubes.SaltLinuxVM supported-rpc.qubes.SelectDirectory supported-rpc.qubes.SelectFile supported-rpc.qubes.SetDateTime supported-rpc.qubes.SetMonitorLayout supported-rpc.qubes.ShowInTerminal supported-rpc.qubes.StartApp supported-rpc.qubes.SuspendPost supported-rpc.qubes.SuspendPostAll supported-rpc.qubes.SuspendPre supported-rpc.qubes.SuspendPreAll supported-rpc.qubes.SyncAppMenus supported-rpc.qubes.TemplateDownload supported-rpc.qubes.TemplateSearch supported-rpc.qubes.USB supported-rpc.qubes.USBAttach supported-rpc.qubes.USBDetach supported-rpc.qubes.UpdateAppMenusFor supported-rpc.qubes.UpdatesProxy supported-rpc.qubes.VMExec supported-rpc.qubes.VMExecGUI supported-rpc.qubes.VMRootExec supported-rpc.qubes.VMRootShell supported-rpc.qubes.VMShell supported-rpc.qubes.WaitForRunningSystem supported-rpc.qubes.WaitForSession' + local -r whonix_features='whonix-gw whonix-ws' # cSpell:enable - local -r flags='--unset --default --delete -D' __complete_all_starting_flags_if_needed "${flags}" && return 0 @@ -2428,7 +2428,7 @@ function _qvm_features() { if (( QB_alone_args_count == 1 )); then # provide all common features. The list is not full nor it can be, # as everything can be used as a name and value actually. - __complete_string "${vm_common_features} ${vm_service_features} ${vm_rpc_features} ${vm_template_features}" + __complete_string "${vm_common_features} ${vm_service_features} ${vm_rpc_features} ${vm_template_features} ${whonix_features}" return 0 fi From 976a6572f08bc5beb99996ba83334b316f1f3f9d Mon Sep 17 00:00:00 2001 From: neoniobium Date: Tue, 24 Feb 2026 14:25:19 +0100 Subject: [PATCH 3/4] undo --- src/debug_overrides.sh | 25 +++++++++---------------- src/qubes-completion.sh | 10 +++++----- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/debug_overrides.sh b/src/debug_overrides.sh index 2934e70..2be5676 100644 --- a/src/debug_overrides.sh +++ b/src/debug_overrides.sh @@ -1,26 +1,19 @@ # Debug overriding to activate debug logging for qubes-completion -# This file is intended as an opt-in developer/test helper. -# By default it should NOT enable debug logging for users who install the completion package. -# To enable debug mode, copy this file to the installation directory (next to qubes-completion.sh) -# and set QB_DEBUG_MODE=1 here, or create your own override file and export QB_DEBUG_OVERRIDE_FILE environment -# variable pointing to it. This avoids surprising users with debug logs enabled by default. -# Default: debug off -QB_DEBUG_MODE=0 +QB_DEBUG_MODE=1 -# Example: enable debug by changing the value above to 1 and editing paths below. if (( QB_DEBUG_MODE != 0 )); then __debug_overrides_script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)" # Relative paths (one way to use it): - QVMTOOL_QVM_FIREWALL=""){__debug_overrides_script_dir}/../stubs/qvm-firewall" - QVMTOOL_QVM_LS=""){__debug_overrides_script_dir}/../stubs/qvm-ls" - QVMTOOL_QVM_TAGS=""){__debug_overrides_script_dir}/../stubs/qvm-tags" - QVMTOOL_QVM_DEVICE=""){__debug_overrides_script_dir}/../stubs/qvm-device" - QVMTOOL_QVM_POOL=""){__debug_overrides_script_dir}/../stubs/qvm-pool" - QVMTOOL_QVM_TEMPLATE=""){__debug_overrides_script_dir}/../stubs/qvm-template" + QVMTOOL_QVM_FIREWALL="${__debug_overrides_script_dir}/../stubs/qvm-firewall" + QVMTOOL_QVM_LS="${__debug_overrides_script_dir}/../stubs/qvm-ls" + QVMTOOL_QVM_TAGS="${__debug_overrides_script_dir}/../stubs/qvm-tags" + QVMTOOL_QVM_DEVICE="${__debug_overrides_script_dir}/../stubs/qvm-device" + QVMTOOL_QVM_POOL="${__debug_overrides_script_dir}/../stubs/qvm-pool" + QVMTOOL_QVM_TEMPLATE="${__debug_overrides_script_dir}/../stubs/qvm-template" # These full paths of stubs are provided as an example, # if you want absolute paths, you should change them according to your locations: @@ -31,10 +24,10 @@ if (( QB_DEBUG_MODE != 0 )); then # QVMTOOL_QVM_POOL='/home/user/projects/bash/qubes-completion/stubs/qvm-pool' QB_DEBUG_LOG=1 - QB_DEBUG_LOG_PATH=""){__debug_overrides_script_dir}/../log/qubes_completion_debug.log" + QB_DEBUG_LOG_PATH="${__debug_overrides_script_dir}/../log/qubes_completion_debug.log" QB_DEBUG_STUB_FILEDIR_OUTPUT='dir1 dir2 _dir file1 file2 file33 file _file something' - QB_DEBUG_STUB_PROFILES_DIR=""){__debug_overrides_script_dir}/../stubs/profiles" + QB_DEBUG_STUB_PROFILES_DIR="${__debug_overrides_script_dir}/../stubs/profiles" QB_DEBUG_STUB_RPM_KERNELS_OUTPUT=$'kernel-6.11.11-1.qubes.fc37.x86_64\nkernel-6.12.20-1.qubes.fc37.x86_64\nkernel-6.12.40-1.qubes.fc37.x86_64' fi diff --git a/src/qubes-completion.sh b/src/qubes-completion.sh index bcf6ab3..33f9ad2 100644 --- a/src/qubes-completion.sh +++ b/src/qubes-completion.sh @@ -2417,12 +2417,12 @@ function _qvm_features() { __is_prev_flag_not_empty && return 0; # unknown prev flag expects sub-argument (e.g. --unknown_flag=) # cSpell:disable - local -r vm_common_features='anon-timezone app-dispvm. apparmor appmenus-dispvm appmenus-legacy audio-model boot-mode.active boot-mode.appvm-default boot-mode.kernelopts.sysmaint boot-mode.kernelopts.unrestricted boot-mode.kernelopts.user boot-mode.default-user.sysmaint boot-mode.name.sysmaint boot-mode.name.unrestricted boot-mode.name.user check-update custom-persist. default-menu-items expert-mode gui gui-default-allow-utf8-titles gui-default-secure-copy-sequence gui-default-secure-paste-sequence gui-emulated gui-videoram-min gui-videoram-overhead input-dom0-proxy internal last-update last-updates-check linux-stubdom memory-hotplug menu-items net.fake-gateway net.fake-ip net.fake-netmask netvm-menu-items no-monitor-layout os out.buffer-length out.latency pci-e820-host pci-e820-host preload-dispvm preload-dispvm-completed preload-dispvm-max preload-dispvm-threshold preload-dispvm-completed preload-dispvm-in-progress prohibit-start qemu-extra-args qrexec qubes-agent-version qubes-firewall qubesmanager.maxmem_value rpc-clipboard selinux service.clocksync service.qubes-update-check servicevm set-created-guivm skip-start stubdom-qrexec supported-feature. tag-created-vm-with timer-period timezone updates-available video-model video-model vm-config. vmexec os-distribution os-version os-eol' + local -r vm_common_features='gui gui-emulated gui-default-allow-utf8-titles input-dom0-proxy qrexec rpc-clipboard no-monitor-layout internal appmenus-legacy appmenus-dispvm qubes-firewall updates-available video-model net.fake-ip net.fake-gateway net.fake-netmask pci-e820-host linux-stubdom tag-created-vm-with set-created-guivm check-updates menu-items qubesmanager.maxmem_value servicevm service.clocksync service.qubes-update-check default-menu-items netvm-menu-items os vmexec audio-model stubdom-qrexec timezone timer-period out.latency out.buffer-length gui-videoram-min gui-videoram-overhead gui-default-secure-copy-sequence gui-default-secure-paste-sequence last-update last-update-check selinux apparmor' local -r vm_template_features='template-name template-epoch template-version template-release template-reponame template-buildtime template-installtime template-license template-url template-summary template-description' - local -r vm_service_features='supported-feature.keyboard-layout supported-feature.memory-hotplug supported-service.apparmor supported-service.blueman supported-service.clocksync supported-service.crond supported-service.cups supported-service.gui-agent-clipboard-wipe supported-service.guivm-gui-agent supported-service.meminfo-writer supported-service.minimal-netvm supported-service.minimal-usbvm supported-service.modem-manager supported-service.network-manager supported-service.no-qubesincoming-cleanup supported-service.pipewire supported-service.qubes-firewall supported-service.qubes-network supported-service.qubes-update-check supported-service.qubes-updates-proxy supported-service.updates-proxy-setup' - local -r vm_rpc_features='supported-rpc.qubes.AudioInputDisable supported-rpc.qubes.AudioInputEnable supported-rpc.qubes.Backup supported-rpc.qubes.ConnectTCP supported-rpc.qubes.DetachPciDevice supported-rpc.qubes.Filecopy supported-rpc.qubes.GetAppmenus supported-rpc.qubes.GetDate supported-rpc.qubes.GetImageRGBA supported-rpc.qubes.Gpg supported-rpc.qubes.GpgImportKey supported-rpc.qubes.GuiVMSession supported-rpc.qubes.InstallUpdatesGUI supported-rpc.qubes.OpenInVM supported-rpc.qubes.OpenURL supported-rpc.qubes.PdfConvert supported-rpc.qubes.PostInstall supported-rpc.qubes.RegisterBackupLocation supported-rpc.qubes.RemoveAppMenusFor supported-rpc.qubes.ResizeDisk supported-rpc.qubes.Restore supported-rpc.qubes.RestoreById supported-rpc.qubes.SaltLinuxVM supported-rpc.qubes.SelectDirectory supported-rpc.qubes.SelectFile supported-rpc.qubes.SetDateTime supported-rpc.qubes.SetMonitorLayout supported-rpc.qubes.ShowInTerminal supported-rpc.qubes.StartApp supported-rpc.qubes.SuspendPost supported-rpc.qubes.SuspendPostAll supported-rpc.qubes.SuspendPre supported-rpc.qubes.SuspendPreAll supported-rpc.qubes.SyncAppMenus supported-rpc.qubes.TemplateDownload supported-rpc.qubes.TemplateSearch supported-rpc.qubes.USB supported-rpc.qubes.USBAttach supported-rpc.qubes.USBDetach supported-rpc.qubes.UpdateAppMenusFor supported-rpc.qubes.UpdatesProxy supported-rpc.qubes.VMExec supported-rpc.qubes.VMExecGUI supported-rpc.qubes.VMRootExec supported-rpc.qubes.VMRootShell supported-rpc.qubes.VMShell supported-rpc.qubes.WaitForRunningSystem supported-rpc.qubes.WaitForSession' - local -r whonix_features='whonix-gw whonix-ws' + local -r vm_service_features='supported-service.apparmor supported-service.crond supported-service.network-manager supported-service.pipewire supported-service.cups supported-service.gui-agent-clipboard-wipe supported-service.guivm-gui-agent supported-service.qubes-update-check supported-service.qubes-updates-proxy supported-service.qubes-firewall supported-service.qubes-network supported-service.clocksync supported-service.updates-proxy-setup supported-service.meminfo-writer supported-service.modem-manager supported-service.blueman' + local -r vm_rpc_features='supported-rpc.qubes.SetMonitorLayout supported-rpc.qubes.SelectFile supported-rpc.qubes.UpdatesProxy supported-rpc.qubes.TemplateDownload supported-rpc.qubes.PostInstall supported-rpc.qubes.VMExec supported-rpc.qubes.Backup supported-rpc.qubes.ShowInTerminal supported-rpc.qubes.RegisterBackupLocation supported-rpc.qubes.WaitForSession supported-rpc.qubes.SetDateTime supported-rpc.qubes.TemplateSearch supported-rpc.qubes.GetAppmenus supported-rpc.qubes.DetachPciDevice supported-rpc.qubes.SuspendPost supported-rpc.qubes.OpenURL supported-rpc.qubes.StartApp supported-rpc.qubes.ConnectTCP supported-rpc.qubes.ResizeDisk supported-rpc.qubes.SuspendPreAll supported-rpc.qubes.SelectDirectory supported-rpc.qubes.VMRootShell supported-rpc.qubes.Gpg supported-rpc.qubes.PdfConvert supported-rpc.qubes.USBDetach supported-rpc.qubes.RestoreById supported-rpc.qubes.GpgImportKey supported-rpc.qubes.GuiVMSession supported-rpc.qubes.VMExecGUI supported-rpc.qubes.USB supported-rpc.qubes.Filecopy supported-rpc.qubes.SuspendPostAll supported-rpc.qubes.VMShell supported-rpc.qubes.GetImageRGBA supported-rpc.qubes.GetDate supported-rpc.qubes.SuspendPre supported-rpc.qubes.USBAttach supported-rpc.qubes.InstallUpdatesGUI supported-rpc.qubes.OpenInVM supported-rpc.qubes.SaltLinuxVM supported-rpc.qubes.Restore supported-rpc.qubes.AudioInputEnable supported-rpc.qubes.AudioInputDisable' # cSpell:enable + local -r flags='--unset --default --delete -D' __complete_all_starting_flags_if_needed "${flags}" && return 0 @@ -2434,7 +2434,7 @@ function _qvm_features() { if (( QB_alone_args_count == 1 )); then # provide all common features. The list is not full nor it can be, # as everything can be used as a name and value actually. - __complete_string "${vm_common_features} ${vm_service_features} ${vm_rpc_features} ${vm_template_features} ${whonix_features}" + __complete_string "${vm_common_features} ${vm_service_features} ${vm_rpc_features} ${vm_template_features}" return 0 fi From 4ce1562086136318a42f247c98c119e68c75efd6 Mon Sep 17 00:00:00 2001 From: neoniobium Date: Wed, 25 Feb 2026 09:37:58 +0100 Subject: [PATCH 4/4] [qubes-new-qube] implementation --- src/qubes-completion.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/qubes-completion.sh b/src/qubes-completion.sh index 33f9ad2..13dfdbe 100644 --- a/src/qubes-completion.sh +++ b/src/qubes-completion.sh @@ -136,6 +136,7 @@ declare -a SUPPORTED_COMMANDS_LIST=( 'qubes-fwupdmgr' # R4.2. Tests: Basic # Features: 100% # NOTE: Does not run without root even for --help. And has no man. 'qubes-prepare-vm-kernel' # R4.2. Tests: Basic # Features: 100% 'qubes-app-menu' # R4.2. Tests: Basic # Features: 100% # No man, GUI app + 'qubes-new-qube' # R4.3. Tests: Basic # Features: 100% # No man, GUI app 'qubes-policy-lint' # R4.2. Tests: Basic # Features: 100% # No man 'qubes-policy-editor' # R4.2. Tests: Basic # Features: 100% # No man 'qubes-update-gui' # R4.2. Tests: Basic # Features: 100% # No man @@ -4400,6 +4401,43 @@ function _qubes_app_menu() { } +function _qubes_new_qube() { + + # NOTE: This command does not support --quiet and --verbose args. + # So, we have to do things manually + + local -r flags_require_zero='--help -h --help-all --help-gapplication --help-gtk --g-fatal-warnings --gapplication-service' + local -r flags_require_one='--class --name --gtk-module --display' + __init_qubes_completion "${flags_require_one}" || return 0 + + case "${QB_prev_flag}" in + --class) + # no completion for class + return 0 + ;; + --name) + # no completion for name + return 0 + ;; + --gtk-module) + # no completion for gtk-module + return 0 + ;; + --display) + # No completion for display + return 0 + ;; + ?*) + # unknown prev flag expects sub-argument + return 0 + ;; + esac + + __complete_string "${flags_require_zero} ${flags_require_one}" + return 0 +} + + function _qubes_policy_lint() { # NOTE: This command does not support --quiet and --verbose args.