hasktags
hasktags copied to clipboard
The `--tags-absolute` option is incompatible with reading files from `stdin`.
Doing
hasktags --tags-absolute STDIN
results in the error
hasktags: STDIN: canonicalizePath: does not exist (No such file or directory)
because canonicalizePath
is applied to all files at https://github.com/MarcWeber/hasktags/blob/7a492fcabcc1ed839be442f43350dcd967f6169e/src/Main.hs#L77.
It think the correct behavior is to first convert STDIN
into a list of files read from stdin
and then call canonicalizePath
. If you agree with this solution and don't want to implement it yourself, I would be happy to submit a pull request.
Work around on systems with readlink -f
(Linux has it but Mac does not, I think):
<generate files> | xargs -n1 readlink -f | hasktags STDIN