MarcWeber / hasktags

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

-o- oddity #86

Open joeyh opened 2 years ago

joeyh commented 2 years ago
hasktags . -o-
hasktags: <stdout>: hPutStr: illegal operation (handle is closed)

This is surprising and seems broken. I eventually figured out that, since hasktags defaults to generating both ctags and etags (-b is default), with -o- it first outputs one, and then tries to output the other. Apparently the output of the first ends by closing stdout, so the output of the second one fails.

The workaround is to use -c or -e. But I think it would probably make sense to make -b not be the default when using -o. As it is, -o foo first writes the ctags to foo, then overwrites that file with the etags.