From 1877253f475e4b31ca4931af7037eb8c3fe5d8ba Mon Sep 17 00:00:00 2001 From: Nils K <24257556+septatrix@users.noreply.github.com> Date: Tue, 28 Dec 2021 05:56:31 +0100 Subject: [PATCH] Pass all of $argv to pk-command-not-found (#8591) Fixes #8579. --- CHANGELOG.rst | 1 + share/functions/fish_command_not_found.fish | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 451b1c70c..6522eba8b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -109,6 +109,7 @@ Interactive improvements - The command line is drawn in the correct place if the prompt has a trailing empty line (:issue:`8298`). - ``history`` learned a new subcommand ``clear-session`` to erase all history from the current session (:issue:`5791`). - Pressing :kbd:`Control-C` in ``fish_key_reader`` will no longer print the incorrect "Press [ctrl-C] again to exit" message (:issue:`8510`). +- The default command-not-found handler for Fedora/PackageKit now passes the whole command line, allowing for functionality such as running the suggested command directly (:issue:`8579`). New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/share/functions/fish_command_not_found.fish b/share/functions/fish_command_not_found.fish index 83c854c51..b3dcd6fe7 100644 --- a/share/functions/fish_command_not_found.fish +++ b/share/functions/fish_command_not_found.fish @@ -32,7 +32,7 @@ else if contains -- suse $os || contains -- sles $os && type -q command-not-foun # Check for Fedora's handler else if test -f /usr/libexec/pk-command-not-found function fish_command_not_found - /usr/libexec/pk-command-not-found $argv[1] + /usr/libexec/pk-command-not-found $argv end # Check in /usr/lib, where Ubuntu places this command else if test -f /usr/lib/command-not-found