Add basic bash completion script and framework for others

This commit is contained in:
Jesse Scott 2017-07-26 15:01:53 -07:00
parent 5fa65b6400
commit 6d57a1b5df
5 changed files with 81 additions and 1 deletions

View file

@ -113,4 +113,12 @@ class Utils
puts
puts message.colorize(status['status']['ok'] ? :default : :red)
end
# Adapted from ActiveSupport
def self.strip_heredoc(str)
min_indent = str.scan(/^[ \t]*(?=\S)/).min
min_indent_size = min_indent.nil? ? 0 : min_indent.size
str.gsub(/^[ \t]{#{min_indent_size}}/, '')
end
end