Unable to get multicharacter field in fzf preview
_select () {
apt-cache search '' | fzf \
--prompt='search: '\
--marker="M" \
--ansi \
--layout=reverse \
--cycle \
--multi \
--inline-info \
--preview "(apt show $(echo {} | awk ' - ' '{print $1}' 2>/dev/null) 2>/dev/null)" \
--preview-window="down:wrap:${PREVIEW_BORDER:-border-sharp}" \
-e
}
the following line gives me the first field
_select | awk -F ' - ' '{print $1}'
I want to preview the info of the package but I need the string of characters up to ' - ', in other words, the name of the package, not de description