We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5a877e commit 63eac42Copy full SHA for 63eac42
lib/completely/commands/generate.rb
@@ -41,8 +41,10 @@ def run
41
42
if args['--install']
43
install output
44
+ elsif output_path == '-'
45
+ show output
46
else
- show_or_save output
47
+ save output
48
end
49
50
@@ -56,13 +58,11 @@ def install(content)
56
58
say 'You may need to restart your session to test it'
57
59
60
- def show_or_save(content)
- if output_path == '-'
61
- puts content
62
- else
63
- File.write output_path, content
64
- say "Saved m`#{output_path}`"
65
- end
+ def show(content) = puts content
+
+ def save(content)
+ File.write output_path, content
+ say "Saved m`#{output_path}`"
66
syntax_warning unless completions.valid?
67
68
0 commit comments