excalibur1234 / pacui

Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI
GNU General Public License v3.0
168 stars 13 forks source link

fzf --preview breaks when using alternative shells #43

Closed unveiled closed 6 years ago

unveiled commented 6 years ago

fzf --preview spawns a new process. It appears that this new process honors the SHELL env variable, so that if a user has fish as their shell, then the spawned process chokes on what the alternative shell sees as invalid syntax/commands.

I can correct this for myself by wrapping the call to pacui: bash -c 'export SHELL=/usr/bin/bash; pacui'

But I think pacui can correct this itself by putting export SHELL=/usr/bin/bash anywhere before the first call to fzf --preview. I tested this. It worked and I didn't see any negative side-effects.

excalibur1234 commented 6 years ago

thanks for your tip.

i applied it in the latest patch: https://github.com/excalibur1234/pacui/commit/edb44978317f0641a473f3b751be8ef32346356a

exporting the SHELL variable is not really necessary - at least according to my tests. does it work for you, too?

unveiled commented 6 years ago

Yep. I just assumed it needed to be exported in order to apply to subprocesses, but I just tested the latest patch and it works.