Is there a bunch * after * a hook?

I would like ctags to generate a TAGS file for all of my combined gems or all gems in the rvm gemset directory, which sets its gems. Ideally, installing a package or service pack should generate a TAGS file in the last step using the ruby ​​script I provided. After that, joy.

Is there any picker after the hook that I can use?

+3
source share
3 answers

You can see what Tim Papa does in his project Hookup:

https://github.com/tpope/hookup

I would suggest that it will not be too difficult for an extra step after starting the launch.

Makefile Ruby:

.PHONY: tags

tags:
    ETAGS=ctags
    rm -rf TAGS
    ctags -a -e -f TAGS --tag-relative -R app lib vendor

script , dev, make tags.

+1

:

1) rake, , :

desc 'Create ctags'
task :tags do
  system "ctags -R --language-force=ruby app config lib `rvm gemdir`/gems"
end

2) "" ( ), inotifywait , :

tags: while inotifywait -q -r -e MODIFY --exclude swp$ app/ config/ lib/ ; do bundle exec rake tags; done

If you are not using the wizard, you can, of course, simply run this line without the first part of the "tags:" manually in the shell.

0
source

All Articles