From 2b36408440381b7677ce7b640ce9c3dabfb9bc16 Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Mon, 21 May 2018 04:44:32 -0700 Subject: [PATCH] Use fzf to view installed package files. see also #44 --- pacli | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pacli b/pacli index 567ec60..049b3b7 100755 --- a/pacli +++ b/pacli @@ -149,13 +149,11 @@ package_information() #6 List Local Package Files package_list_files() { - declare pkg - pkg=($(print_enter "$(gettext 'Select a packages of which to list all files (use TAB to toggle selection)')" \ - "$(helper '-Qq')" '-m' )) - (($?!=0)) && return 1 - [ -z "$pkg" ] && return 1 - pacman -Ql "${pkg[@]}" #helper -Ql "${pkg[*]}" - print_prompt "$(gettext 'All local files in package listed')." "" 1 + declare pkg + pkg=($(print_enter "$(gettext 'Select a packages of which to list all files (use TAB to toggle selection)')" "$(helper '-Qq')" '-m')) + [[ $? != 0 || -z "$pkg" ]] && return 1 + f=$(print_enter "$(gettext "Files from package(s) '${pkg[*]}'.")" "$(pacman -Ql "${pkg[@]}")") + unset f # we don't actually care about the choice } #13 fix errors