mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: moved as a tool and using readline
This commit is contained in:

committed by
Alexander Medvednikov

parent
114953f28d
commit
55f6e810cf
@ -1048,6 +1048,23 @@ pub fn install_v(args[]string) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_repl() {
|
||||
vexec := vexe_path()
|
||||
vroot := os.dir(vexec)
|
||||
vrepl := '$vroot/tools/vrepl'
|
||||
|
||||
os.chdir(vroot + '/tools')
|
||||
vrepl_compilation := os.exec('"$vexec" -o $vrepl vrepl.v') or {
|
||||
verror(err)
|
||||
return
|
||||
}
|
||||
if vrepl_compilation.exit_code != 0 {
|
||||
verror(vrepl_compilation.output)
|
||||
return
|
||||
}
|
||||
vreplresult := os.system('$vrepl "$vexec"')
|
||||
}
|
||||
|
||||
pub fn create_symlink() {
|
||||
vexe := vexe_path()
|
||||
link_path := '/usr/local/bin/v'
|
||||
|
Reference in New Issue
Block a user