Skip to content

Commit 3cb4b94

Browse files
asteriteRX14
authored andcommitted
CLI: remove deps command (#5544)
1 parent 525ea49 commit 3cb4b94

File tree

5 files changed

+5
-53
lines changed

5 files changed

+5
-53
lines changed

etc/completion.bash

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _crystal()
1414
local cur="${COMP_WORDS[COMP_CWORD]}"
1515
local prev="${COMP_WORDS[COMP_CWORD-1]}"
1616

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

1919
case "${cmd}" in
2020
init)
@@ -32,19 +32,6 @@ _crystal()
3232
COMPREPLY=($(_crystal_compgen_files $cur))
3333
fi
3434
;;
35-
deps)
36-
if [[ ${cur} == -* ]] ; then
37-
local opts="--no-color --version --production"
38-
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
39-
else
40-
if [[ "${prev}" == "deps" ]] ; then
41-
local subcommands="check install list update"
42-
COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
43-
else
44-
COMPREPLY=($(_crystal_compgen_files $cur))
45-
fi
46-
fi
47-
;;
4835
run)
4936
if [[ ${cur} == -* ]] ; then
5037
local opts="--debug --define --emit --format --help --ll --link-flags --mcpu --no-color --no-codegen --prelude --release --stats --single-module --threads --verbose"

etc/completion.zsh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ _crystal_commands() {
77
commands=(
88
"init:generate new crystal project"
99
"build:build an executable"
10-
"deps:install project dependencies"
1110
"docs:generate documentation"
1211
"env:print Crystal environment information"
1312
"eval:eval code from args or standard input"
@@ -100,18 +99,6 @@ _crystal-build() {
10099
&& ret=0
101100
}
102101

103-
_crystal-deps() {
104-
_arguments \
105-
'1:type:(build check init install list prune update)' \
106-
$help_args \
107-
$no_color_args \
108-
'(--version)--version[version]' \
109-
'(--production)--production[production mode]' \
110-
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
111-
'(-q --quiet)'{-q,--quiet}'[quiet mode]' \
112-
&& ret=0
113-
}
114-
115102
_crystal-env() {
116103
_arguments \
117104
'(--help)--help[prints help]' \

man/crystal.1

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ The optimizations are not turned on by default because the compile times are muc
5656
.Bl -tag -width "12345678" -compact
5757
.Pp
5858
.Sh OPTIONS
59-
The crystal command accepts the following options
59+
The crystal command accepts the following options
6060

6161
.Bl -tag -width "12345678" -compact
6262
.Pp
63-
.It
63+
.It
6464
.Cm init
6565
TYPE
6666
NAME
@@ -141,13 +141,6 @@ Display the commands executed by the system.
141141
Source file name to be read from STDIN.
142142
.El
143143

144-
.Pp
145-
.It
146-
.Cm deps
147-
.Op options
148-
.Ar <command>
149-
.Pp
150-
Alias for shards, the dependency manager for Crystal language.
151144
.Pp
152145
.It
153146
.Cm docs

src/compiler/crystal/command.cr

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class Crystal::Command
1818
Command:
1919
init generate a new project
2020
build build an executable
21-
deps install project dependencies
2221
docs generate documentation
2322
env print Crystal environment information
2423
eval eval code from args or standard input
@@ -72,8 +71,8 @@ class Crystal::Command
7271
options.shift
7372
playground
7473
when "deps".starts_with?(command)
75-
options.shift
76-
deps
74+
STDERR.puts "Please use 'shards': 'crystal deps' has been removed"
75+
exit 1
7776
when "docs".starts_with?(command)
7877
options.shift
7978
docs

src/compiler/crystal/command/deps.cr

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)