Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/man/crystal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,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.
Expand Down
4 changes: 2 additions & 2 deletions etc/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ _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}"
fi
;;
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}"
Expand Down
4 changes: 2 additions & 2 deletions etc/completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion etc/completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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]' \
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down