-
-
Save th507/6649496 to your computer and use it in GitHub Desktop.
making dictionary for vim autocomplete from http://henry.animeo.jp/wp/?p=1764 remove trailing =, ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'uri' | |
| if ARGV.size != 1 | |
| warn "Invalid argument" | |
| exit | |
| end | |
| methods = [] | |
| Dir.glob(File.expand_path(ARGV[0]) + "/**/*.ri").each do |file| | |
| method = URI.decode(File.basename(file)) | |
| if /^(.*)-\w*\.ri$/ =~ method | |
| methods << ($1).sub(/(=|\?|\||~)$/, '') | |
| else | |
| warn file | |
| end | |
| end | |
| methods.uniq!.sort.each do |method| | |
| puts method | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment