docs: rename exec -> execute (#13514)
parent
0236931c78
commit
2b974cdb97
11
doc/docs.md
11
doc/docs.md
|
@ -5695,10 +5695,19 @@ rmdir_all('build') or { }
|
||||||
mkdir('build') ?
|
mkdir('build') ?
|
||||||
|
|
||||||
// Move *.v files to build/
|
// Move *.v files to build/
|
||||||
result := exec('mv *.v build/') ?
|
result := execute('mv *.v build/') ?
|
||||||
if result.exit_code != 0 {
|
if result.exit_code != 0 {
|
||||||
println(result.output)
|
println(result.output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print command then execute it
|
||||||
|
fn sh(cmd string){
|
||||||
|
println("❯ $cmd")
|
||||||
|
print(execute_or_exit(cmd).output)
|
||||||
|
}
|
||||||
|
|
||||||
|
sh('ls')
|
||||||
|
|
||||||
// Similar to:
|
// Similar to:
|
||||||
// files := ls('.') ?
|
// files := ls('.') ?
|
||||||
// mut count := 0
|
// mut count := 0
|
||||||
|
|
Loading…
Reference in New Issue