Running hasktags for plenty of .hs source files for getting CTAGS File (plain Windows)
I want to produce a ETAGS file with hasktags, for that I can use it within Emacs with M-. (Find Tag).
I am using Emacs running on Windows. Since I have no MSYS/Cygwin installed, i I cannot do
find -name \*\*hs | xargs hasktags
How may I generate hasktags ETAGS files 开发者_StackOverflowfor a plenty of .hs source files?
Best regards
In cmd.exe
,
for /f "tokens=*" %i in ('dir /b /s *.hs') do hasktags "%i"
Change %i
to %%i
in a batch script (.bat
/.cmd
).
In PowerShell,
Get-ChildItem -Include '*.hs' -Recurse | Foreach-Object {hasktags $_}
But of course, you could have just written a simple Haskell program to do this (or used GHCi), starting from Real World Haskell - I/O case study: a library for searching the filesystem or System.FilePath.Find, and adding in system
to call hasktags
.
精彩评论