2 added 424 characters in body
source | link

As thrig already mentioned in a comment:

zsh -c 'prog *.txt(P:-f:)'

This uses the glob qualifier P which prepends a separate word to each glob match. Like almost all of zsh's glob qualifiers, bash has nothing similar.

If you want to have completion for prog, run zsh interactively then type prog *.txt(P:-f:). The very first time you run zsh interactively, it'll prompt you to set a configuration. If you don't care about zsh, either pick the option to make a blank .zshrc (but then you'll miss on some zsh features that need to be activated explicitly) or pick 1 and go through the menus to activate the recommended defaults.

As thrig already mentioned in a comment:

zsh -c 'prog *.txt(P:-f:)'

This uses the glob qualifier P which prepends a separate word to each glob match. Like almost all of zsh's glob qualifiers, bash has nothing similar.

As thrig already mentioned in a comment:

zsh -c 'prog *.txt(P:-f:)'

This uses the glob qualifier P which prepends a separate word to each glob match. Like almost all of zsh's glob qualifiers, bash has nothing similar.

If you want to have completion for prog, run zsh interactively then type prog *.txt(P:-f:). The very first time you run zsh interactively, it'll prompt you to set a configuration. If you don't care about zsh, either pick the option to make a blank .zshrc (but then you'll miss on some zsh features that need to be activated explicitly) or pick 1 and go through the menus to activate the recommended defaults.

1
source | link

As thrig already mentioned in a comment:

zsh -c 'prog *.txt(P:-f:)'

This uses the glob qualifier P which prepends a separate word to each glob match. Like almost all of zsh's glob qualifiers, bash has nothing similar.