Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: remove deps command #5544

Merged
merged 1 commit into from
Jan 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 1 addition & 14 deletions etc/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _crystal()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"

commands="init build deps docs eval play run spec tool help version --help --version"
commands="init build docs eval play run spec tool help version --help --version"

case "${cmd}" in
init)
Expand All @@ -32,19 +32,6 @@ _crystal()
COMPREPLY=($(_crystal_compgen_files $cur))
fi
;;
deps)
if [[ ${cur} == -* ]] ; then
local opts="--no-color --version --production"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
else
if [[ "${prev}" == "deps" ]] ; then
local subcommands="check install list update"
COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
else
COMPREPLY=($(_crystal_compgen_files $cur))
fi
fi
;;
run)
if [[ ${cur} == -* ]] ; then
local opts="--debug --define --emit --format --help --ll --link-flags --mcpu --no-color --no-codegen --prelude --release --stats --single-module --threads --verbose"
Expand Down
13 changes: 0 additions & 13 deletions etc/completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ _crystal_commands() {
commands=(
"init:generate new crystal project"
"build:build an executable"
"deps:install project dependencies"
"docs:generate documentation"
"env:print Crystal environment information"
"eval:eval code from args or standard input"
Expand Down Expand Up @@ -100,18 +99,6 @@ _crystal-build() {
&& ret=0
}

_crystal-deps() {
_arguments \
'1:type:(build check init install list prune update)' \
$help_args \
$no_color_args \
'(--version)--version[version]' \
'(--production)--production[production mode]' \
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
'(-q --quiet)'{-q,--quiet}'[quiet mode]' \
&& ret=0
}

_crystal-env() {
_arguments \
'(--help)--help[prints help]' \
Expand Down
11 changes: 2 additions & 9 deletions man/crystal.1
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ The optimizations are not turned on by default because the compile times are muc
.Bl -tag -width "12345678" -compact
.Pp
.Sh OPTIONS
The crystal command accepts the following options
The crystal command accepts the following options

.Bl -tag -width "12345678" -compact
.Pp
.It
.It
.Cm init
TYPE
NAME
Expand Down Expand Up @@ -141,13 +141,6 @@ Display the commands executed by the system.
Source file name to be read from STDIN.
.El

.Pp
.It
.Cm deps
.Op options
.Ar <command>
.Pp
Alias for shards, the dependency manager for Crystal language.
.Pp
.It
.Cm docs
Expand Down
5 changes: 2 additions & 3 deletions src/compiler/crystal/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Crystal::Command
Command:
init generate a new project
build build an executable
deps install project dependencies
docs generate documentation
env print Crystal environment information
eval eval code from args or standard input
Expand Down Expand Up @@ -72,8 +71,8 @@ class Crystal::Command
options.shift
playground
when "deps".starts_with?(command)
options.shift
deps
STDERR.puts "Please use 'shards': 'crystal deps' has been removed"
exit 1
when "docs".starts_with?(command)
options.shift
docs
Expand Down
14 changes: 0 additions & 14 deletions src/compiler/crystal/command/deps.cr

This file was deleted.