diff --git a/doc/man/crystal-build.adoc b/doc/man/crystal-build.adoc index 5b0d5e3c0844..b75c8e84a11b 100644 --- a/doc/man/crystal-build.adoc +++ b/doc/man/crystal-build.adoc @@ -68,7 +68,7 @@ pass a --code-model flag to LLVM. Disable colored output. *--no-codegen*:: Don't do code generation, just parse the file. -*-o*:: Specify filename of output. +*-o* _FILE_, *--output* _FILE_:: Specify filename of output. *--prelude*:: Specify prelude to use. The default one initializes the garbage collector. You can also use --prelude=empty to use no preludes. diff --git a/etc/completion.bash b/etc/completion.bash index b64bd110a205..eb611851b76d 100644 --- a/etc/completion.bash +++ b/etc/completion.bash @@ -46,7 +46,7 @@ _crystal() ;; build) if [[ "${cur}" == -* ]] ; then - local opts="--cross-compile --debug --emit --error-on-warnings --exclude-warnings --ll --link-flags --mcpu --no-color --no-codegen --prelude --release --single-module --threads --target --verbose --warnings --help" + local opts="--cross-compile --debug --emit --error-on-warnings --exclude-warnings --ll --link-flags --mcpu --no-color --no-codegen --output --prelude --release --single-module --threads --target --verbose --warnings --help" _crystal_compgen_options "${opts}" "${cur}" else _crystal_compgen_sources "${cur}" @@ -54,7 +54,7 @@ _crystal() ;; run) if [[ "${cur}" == -* ]] ; then - local opts="--debug --define --emit --error-on-warnings --exclude-warnings --format --help --ll --link-flags --mcpu --no-color --no-codegen --prelude --release --stats --single-module --threads --verbose --warnings" + local opts="--debug --define --emit --error-on-warnings --exclude-warnings --format --help --ll --link-flags --mcpu --no-color --no-codegen --output --prelude --release --stats --single-module --threads --verbose --warnings" _crystal_compgen_options "${opts}" "${cur}" else _crystal_compgen_sources "${cur}" diff --git a/etc/completion.fish b/etc/completion.fish index a74d6ecf3cac..5cc7f2dc2186 100644 --- a/etc/completion.fish +++ b/etc/completion.fish @@ -25,7 +25,7 @@ complete -c crystal -n "__fish_seen_subcommand_from build" -l error-on-warnings complete -c crystal -n "__fish_seen_subcommand_from build" -l exclude-warnings -d "Exclude warnings from path (default: lib)" complete -c crystal -n "__fish_seen_subcommand_from build" -l no-color -d "Disable colored output" complete -c crystal -n "__fish_seen_subcommand_from build" -l no-codegen -d "Don't do code generation" -complete -c crystal -n "__fish_seen_subcommand_from build" -s o -d "Output filename" +complete -c crystal -n "__fish_seen_subcommand_from build" -s o -l output -d "Output filename" complete -c crystal -n "__fish_seen_subcommand_from build" -l prelude -d "Use given file as prelude" complete -c crystal -n "__fish_seen_subcommand_from build" -l release -d "Compile in release mode" complete -c crystal -n "__fish_seen_subcommand_from build" -s s -l stats -d "Enable statistics output" @@ -106,7 +106,7 @@ complete -c crystal -n "__fish_seen_subcommand_from run" -l error-on-warnings -d complete -c crystal -n "__fish_seen_subcommand_from run" -l exclude-warnings -d "Exclude warnings from path (default: lib)" complete -c crystal -n "__fish_seen_subcommand_from run" -l no-color -d "Disable colored output" complete -c crystal -n "__fish_seen_subcommand_from run" -l no-codegen -d "Don't do code generation" -complete -c crystal -n "__fish_seen_subcommand_from run" -s o -d "Output filename" +complete -c crystal -n "__fish_seen_subcommand_from run" -s o -l output -d "Output filename" complete -c crystal -n "__fish_seen_subcommand_from run" -l prelude -d "Use given file as prelude" complete -c crystal -n "__fish_seen_subcommand_from run" -l release -d "Compile in release mode" complete -c crystal -n "__fish_seen_subcommand_from run" -s s -l stats -d "Enable statistics output" diff --git a/etc/completion.zsh b/etc/completion.zsh index 0d9ff58a67c2..c8b3efe484cb 100644 --- a/etc/completion.zsh +++ b/etc/completion.zsh @@ -89,7 +89,7 @@ local -a shared_run_build; shared_run_build=( '(--mcpu)--mcpu[target specific cpu type]:' \ '(--mattr)--mattr[target specific features]:' \ "(--no-codegen)--no-codegen[don't do code generation]" \ - '(-o)-o[output filename]:' \ + '(-o --output)'{-o,--output}'[output filename]:' \ '(--single-module)--single-module[generate a single llvm module]' \ '(--threads)--threads[maximum number of threads to use]' \ '(--verbose)--verbose[display executed commands]' \ diff --git a/src/compiler/crystal/command.cr b/src/compiler/crystal/command.cr index cc6f39657f64..3c76bd89935f 100644 --- a/src/compiler/crystal/command.cr +++ b/src/compiler/crystal/command.cr @@ -508,7 +508,7 @@ class Crystal::Command opts.on("--no-codegen", "Don't do code generation") do compiler.no_codegen = true end - opts.on("-o ", "Output filename") do |an_output_filename| + opts.on("-o FILE", "--output FILE", "Output filename") do |an_output_filename| opt_output_filename = an_output_filename specified_output = true end