Skip to content

Commit f5c8c57

Browse files
committed
fixes leetcode-tools#17: rename 'lc' to 'leetcode'
Signed-off-by: Eric Wang <[email protected]>
1 parent b08c4df commit f5c8c57

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

.lc-completion.bash

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#
33
# yargs command completion script
44
#
5-
# Installation: bin/lc completion >> ~/.bashrc
6-
# or bin/lc completion >> ~/.bash_profile on OSX.
5+
# Installation: bin/leetcode completion >> ~/.bashrc
6+
# or bin/leetcode completion >> ~/.bash_profile on OSX.
77
#
88
_yargs_completions()
99
{
@@ -13,7 +13,7 @@ _yargs_completions()
1313
args=("${COMP_WORDS[@]}")
1414

1515
# ask yargs to generate completions.
16-
type_list=$(lc --get-yargs-completions "${args[@]}")
16+
type_list=$(leetcode --get-yargs-completions "${args[@]}")
1717

1818
COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
1919

@@ -24,5 +24,5 @@ _yargs_completions()
2424

2525
return 0
2626
}
27-
complete -F _yargs_completions lc
27+
complete -F _yargs_completions leetcode
2828
###-end-lc-completions-###

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ From source code:
3939

4040
## Quick Start
4141

42-
Read help first $ lc help
43-
Login with your leetcode account $ lc user -l
44-
Browse all problems $ lc list
45-
Choose one problem $ lc show 1 -g -l cpp
42+
Read help first $ leetcode help
43+
Login with your leetcode account $ leetcode user -l
44+
Browse all problems $ leetcode list
45+
Choose one problem $ leetcode show 1 -g -l cpp
4646
Coding it!
47-
Run test(s) and pray... $ lc test ./two-sum.cpp -t '[3,2,4]\n7'
48-
Submit final solution! $ lc submit ./two-sum.cpp
47+
Run test(s) and pray... $ leetcode test ./two-sum.cpp -t '[3,2,4]\n7'
48+
Submit final solution! $ leetcode submit ./two-sum.cpp
4949

5050
## There is More...
5151

bin/lc renamed to bin/leetcode

File renamed without changes.

doc/advanced.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Copy `.lc-completion.bash` to your home directory, and source it in .bashrc (Lin
1616
$ echo "source ~/.lc-completion.bash" >> ~/.bashrc
1717
$ source ~/.bashrc
1818

19-
$ lc list --<tab>
19+
$ leetcode list --<tab>
2020
--help --keyword --query --stat
2121

2222
**NOTE: it might become slower in bash with this enabled, personally I would NOT suggest to use it...**

doc/commands.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
Display help message.
1616

17-
* `lc help <command>` to see help on sub command.
18-
* `lc <command> --help` also works.
17+
* `leetcode help <command>` to see help on sub command.
18+
* `leetcode <command> --help` also works.
1919

2020
*Examples*
2121

22-
$ lc help
22+
$ leetcode help
2323

2424
list [keyword] list problems
2525
show <keyword> show problem by name or index
@@ -30,9 +30,9 @@ Display help message.
3030

3131
Show help on sub command:
3232

33-
$ lc help list
33+
$ leetcode help list
3434

35-
lc list [keyword]
35+
leetcode list [keyword]
3636

3737
Options:
3838
--help Show help [boolean]
@@ -54,13 +54,13 @@ Navigate all the problems. The heading `✔` means you have AC-ed the problem, `
5454
* `l` = locked, `L` = not locked.
5555
* `s` = starred, `S` = unstarred.
5656
* `-s` to show statistic counters.
57-
* `lc list <keyword>` to search by keyword matching.
57+
* `leetcode list <keyword>` to search by keyword matching.
5858

5959
*Examples*
6060

6161
Show statistcis:
6262

63-
$ lc list -s
63+
$ leetcode list -s
6464
[385] Mini Parser Medium (26.5%)
6565
✘ [384] Shuffle an Array Medium (45.7%)
6666
✔ [383] Ransom Note Easy (44.5%)
@@ -78,7 +78,7 @@ Show statistcis:
7878

7979
Use keyword search and query:
8080

81-
$ lc list -q Dml array
81+
$ leetcode list -q Dml array
8282

8383
🔒 [360] Sort Transformed Array Medium (41.0%)
8484
🔒 [325] Maximum Size Subarray Sum Equals k Medium (40.9%)
@@ -100,12 +100,12 @@ Display problem details. With `-g`+`-l`, the code template could be auto generat
100100
* ruby
101101
* swift
102102
* Instead of index number, you can use name to select a problem.
103-
* `lc show "Two Sum"`
104-
* `lc show two-sum`
103+
* `leetcode show "Two Sum"`
104+
* `leetcode show two-sum`
105105

106106
*Examples*
107107

108-
$ lc show 1 -g -l cpp
108+
$ leetcode show 1 -g -l cpp
109109

110110
[1] Two Sum (File: two-sum.cpp)
111111

@@ -136,15 +136,15 @@ Mark your favorite problems. The starred problem will be shown with a `★`.
136136

137137
* `-d` to unstar.
138138
* Instead of index number, you can use name to star a problem.
139-
* `lc star "Two Sum"`
140-
* `lc star two-sum`
139+
* `leetcode star "Two Sum"`
140+
* `leetcode star two-sum`
141141

142142
*Example*
143143

144-
$ lc star 1
144+
$ leetcode star 1
145145
[1] Two Sum ★
146146

147-
$ lc star 1 -d
147+
$ leetcode star 1 -d
148148
[1] Two Sum ☆
149149

150150
## submission
@@ -161,13 +161,13 @@ Available options:
161161
* `-a` to work against all problems.
162162
* `-x` to add problem details in the output file.
163163
* Or work against specfic problem only.
164-
* `lc submission 1`
165-
* `lc submission two-sum`
164+
* `leetcode submission 1`
165+
* `leetcode submission two-sum`
166166

167167

168168
*Examples*
169169

170-
$ lc submission -a -o tmp
170+
$ leetcode submission -a -o tmp
171171

172172
[303] Range Sum Query - Immutable tmp/range-sum-query-immutable.52178990.ac.cpp
173173
[319] Bulb Switcher tmp/bulb-switcher.52257927.ac.cpp
@@ -181,7 +181,7 @@ Submit code to leetcode.com.
181181

182182
*Examples*
183183

184-
$ lc submit ./two-sum.cpp
184+
$ leetcode submit ./two-sum.cpp
185185

186186
✔ Accepted
187187
✔ 16/16 cases passed (12 ms)
@@ -195,7 +195,7 @@ Customize your testcase and run it against leetcode. If no testcase provided, a
195195

196196
*Examples*
197197

198-
$ lc test ./two-sum.cpp -t '[3,2,4]\n7'
198+
$ leetcode test ./two-sum.cpp -t '[3,2,4]\n7'
199199

200200
Input data:
201201
[3,2,4]
@@ -218,20 +218,20 @@ Login with your leetcode account (username or email).
218218
* `-l` to login
219219
* `-L` to logout.
220220
* `-s` to show user statistics.
221-
* `lc user` to show current account.
221+
* `leetcode user` to show current account.
222222

223223
*Examples*
224224

225225
Login:
226226

227-
$ lc user -l
227+
$ leetcode user -l
228228
login: <account>
229229
pass:
230230
Successfully login as <account>
231231

232232
Show user statistics:
233233

234-
$ lc user -s
234+
$ leetcode user -s
235235
You are now login as <account>
236236

237237
Easy 72/95 (75.79%) [+++++++++++++++++++++++.......]
@@ -248,12 +248,12 @@ Display version information.
248248

249249
Short:
250250

251-
$ lc version
251+
$ leetcode version
252252
0.6.0
253253

254254
Verbose:
255255

256-
$ lc version -v
256+
$ leetcode version -v
257257
_ _ _
258258
| | | | | |
259259
| | ___ ___| |_ ___ ___ __| | ___

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A cli tool to enjoy leetcode!",
55
"preferGlobal": "true",
66
"bin": {
7-
"lc": "./bin/lc"
7+
"leetcode": "./bin/leetcode"
88
},
99
"scripts": {
1010
"lint": "eslint lib/ test/",

0 commit comments

Comments
 (0)