0

This command works well in Bash and Zsh:

expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg xorg; expac -l '\n' '%E' base; } | sort -u)) | sort -n

But in Fish, it leads to this error:

fish: Invalid redirection target: 
comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg xorg; expac -l '\n' '%E' base; } | sort -u)
         ^~~~~~~~~~~~~~~~~~~~~^
in command substitution
fish: Unknown error while evaluating command substitution
expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg xorg; expac -l '\n' '%E' base; } | sort -u)) | sort -n
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

What is this error? and how can I fix the command to work in Fish? Thanks!

2

1 Answer 1

2

Thanks to muru and the description of a later error, I found my answer. two things in the command need to be changed to work correctly:

  1. fish doesn't support <(), instead should use '| psub'.
  2. fish doesn't support '{ ... }' for grouping commands, should use 'begin; ...; end'.

so the correct command would be:

expac -H M "%011m\t%-20n\t%10d" $(comm -23 (pacman -Qqen | sort | psub) (begin; pacman -Qqg xorg; expac -l '\n' '%E' base; end | sort -u | psub)) | sort -n

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .