Skip to content

Commit

Permalink
CLI: remove deps command (#5544)
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite authored and RX14 committed Jan 6, 2018
1 parent 525ea49 commit 3cb4b94
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 53 deletions.
15 changes: 1 addition & 14 deletions etc/completion.bash
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
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
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
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.

0 comments on commit 3cb4b94

Please sign in to comment.