--preview-window=right:55%:wrap
)
fzfHint=$'\nTAB toggle | ENTER proceed | ESC cancel'
-fzfPrev1='xbps-query -R {1}; echo -e "\nReverse dependencies:"; \
- xbps-query -RX {1} | awk {print\(\"\ \ \ \ \"\$0\)}'
-fzfPrev2='xbps-query -R {2}; echo -e "\nReverse dependencies:"; \
+fzfPrev1='xbps-query {1}; echo -e "\nReverse dependencies:"; \
+ xbps-query -X {1} | awk {print\(\"\ \ \ \ \"\$0\)}'
+fzfPrev2='xbps-query {2}; echo -e "\nReverse dependencies:"; \
+ xbps-query -X {2} | awk {print\(\"\ \ \ \ \"\$0\)}'
+fzfPrev2a='xbps-query -R {2}; echo -e "\nReverse dependencies:"; \
xbps-query -RX {2} | awk {print\(\"\ \ \ \ \"\$0\)}'
# Install new packages:
awk '{print $1, $2}' |
sort -u |
fzf "${fzfOpt[@]}" \
- --preview "$fzfPrev2" \
+ --preview "$fzfPrev2a" \
--header="Select packages to install.$fzfHint" |
awk '{print $2}'
)"