mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Add basic bash completion script and framework for others
This commit is contained in:
parent
5fa65b6400
commit
6d57a1b5df
5 changed files with 81 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue