File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const cmd = {
47
47
alias : 'outdir' ,
48
48
type : 'string' ,
49
49
describe : 'Where to save source code' ,
50
- default : '. '
50
+ default : 'fid '
51
51
} )
52
52
. option ( 'q' , core . filters . query )
53
53
. option ( 't' , core . filters . tag )
@@ -119,8 +119,12 @@ function showProblem(problem, argv) {
119
119
}
120
120
121
121
let filename ;
122
+ if ( argv . outdir === 'fid' ) {
123
+ argv . outdir = ( "0000" + problem . fid ) . slice ( - 4 ) + '.' + problem . slug ;
124
+ }
122
125
if ( argv . gen ) {
123
126
file . mkdir ( argv . outdir ) ;
127
+ // file.mkdir(("0000" + problem.fid).slice(-4));
124
128
filename = genFileName ( problem , argv ) ;
125
129
file . write ( filename , code ) ;
126
130
@@ -172,6 +176,7 @@ function showProblem(problem, argv) {
172
176
}
173
177
174
178
cmd . handler = function ( argv ) {
179
+
175
180
session . argv = argv ;
176
181
if ( argv . keyword . length > 0 ) {
177
182
// show specific one
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ const DEFAULT_CONFIG = {
73
73
lang : 'cpp'
74
74
} ,
75
75
file : {
76
- show : '${fid}.${ slug}' ,
76
+ show : '${slug}' ,
77
77
submission : '${fid}.${slug}.${sid}.${ac}'
78
78
} ,
79
79
color : {
You can’t perform that action at this time.
0 commit comments