I can launch a file after searching through fzf by doing xdg-open (fzf) (I'm using fish) or fzf | xargs xdg-open. But these do not work if I try to create a shortcut for opening a terminal and executing this.

If I launch alacritty -e xdg-open (fzf) or alacritty -e fzf | xargs xdg-open, nothing happens. Same with mimeopen. It doesn't work if I do xargs -I {} xdg-open {} either. Please help.

  • 2
    You need to understand the order things happen. Taking just one case - without quoting alacritty -e fzf | xargs xdg-open the command will be split at the pipe symbol, so it will run alacritty -e fzf and feed the output of that into xdg-open. Try alacritty -e sh -c 'fzf | xargs xdg-open' (untested).
    – icarus
    Jun 29, 2021 at 19:59


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.