MarcWeber / hasktags

Produces ctags "tags" and etags "TAGS" files for Haskell programs
Other
127 stars 32 forks source link

The `--tags-absolute` option is incompatible with reading files from `stdin`. #22

Open ntc2 opened 8 years ago

ntc2 commented 8 years ago

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.

ntc2 commented 8 years ago

Work around on systems with readlink -f (Linux has it but Mac does not, I think):

<generate files> | xargs -n1 readlink -f | hasktags STDIN