Commit 55d13eb 1 parent d969840 commit 55d13eb Copy full SHA for 55d13eb
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export async function main() {
131
131
await scriptFromHttp ( firstArg , argv . ext )
132
132
return
133
133
}
134
- const filepath = firstArg . startsWith ( 'file:/// ' )
134
+ const filepath = firstArg . startsWith ( 'file://' )
135
135
? url . fileURLToPath ( firstArg )
136
136
: path . resolve ( firstArg )
137
137
await importPath ( filepath )
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ import { inspect } from 'node:util'
19
19
import { ProcessOutput , defaults } from './core.js'
20
20
import { chalk } from './vendor-core.js'
21
21
22
- export async function startRepl ( ) {
22
+ const HISTORY = path . join ( os . homedir ( ) , '.zx_repl_history' )
23
+
24
+ export async function startRepl ( history = HISTORY ) {
23
25
defaults . verbose = false
24
26
const r = repl . start ( {
25
27
prompt : chalk . greenBright . bold ( '❯ ' ) ,
@@ -32,5 +34,5 @@ export async function startRepl() {
32
34
return inspect ( output , { colors : true } )
33
35
} ,
34
36
} )
35
- r . setupHistory ( path . join ( os . homedir ( ) , '.zx_repl_history' ) , ( ) => { } )
37
+ r . setupHistory ( history , ( ) => { } )
36
38
}
You can’t perform that action at this time.
0 commit comments