mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
vrepl: suppress the welcome message, if VQUIET is set (#21941)
This commit is contained in:
parent
935ecc3289
commit
1b7b8123ca
4 changed files with 12 additions and 0 deletions
2
.github/workflows/docs_ci.yml
vendored
2
.github/workflows/docs_ci.yml
vendored
|
@ -9,10 +9,12 @@ on:
|
|||
paths-ignore:
|
||||
- '**.yml'
|
||||
- '!**/docs_ci.yml'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.yml'
|
||||
- '!**/docs_ci.yml'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
|
|
4
.github/workflows/vinix_ci.yml
vendored
4
.github/workflows/vinix_ci.yml
vendored
|
@ -5,6 +5,9 @@ on:
|
|||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.yml'
|
||||
- '!**/vinix_ci.yml'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
@ -12,6 +15,7 @@ on:
|
|||
- '**.md'
|
||||
- '**.yml'
|
||||
- '!**/vinix_ci.yml'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
|
|
2
.github/workflows/vup_works.yml
vendored
2
.github/workflows/vup_works.yml
vendored
|
@ -9,6 +9,7 @@ on:
|
|||
- '**.out'
|
||||
- '!**/vup_works.yml'
|
||||
- '!cmd/tools/vup.v'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
@ -17,6 +18,7 @@ on:
|
|||
- '**.out'
|
||||
- '!**/vup_works.yml'
|
||||
- '!cmd/tools/vup.v'
|
||||
- 'cmd/tools/vrepl.v'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
|
||||
|
|
|
@ -41,6 +41,7 @@ mut:
|
|||
|
||||
const is_stdin_a_pipe = os.is_atty(0) == 0
|
||||
const vexe = os.getenv('VEXE')
|
||||
const vquiet = os.getenv('VQUIET') != ''
|
||||
const vstartup = os.getenv('VSTARTUP')
|
||||
const repl_folder = os.join_path(os.vtmp_dir(), 'repl')
|
||||
|
||||
|
@ -345,6 +346,9 @@ fn highlight_repl_command(command string) string {
|
|||
}
|
||||
|
||||
fn print_welcome_screen() {
|
||||
if vquiet {
|
||||
return
|
||||
}
|
||||
cmd_exit := highlight_repl_command('exit')
|
||||
cmd_list := highlight_repl_command('list')
|
||||
cmd_help := highlight_repl_command('help')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue