mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: make the v REPL help screen look nicer (#10833)
This commit is contained in:
@@ -5,6 +5,7 @@ module util
|
||||
|
||||
import os
|
||||
import time
|
||||
import term
|
||||
import v.pref
|
||||
import v.vmod
|
||||
import v.util.recompilation
|
||||
@@ -569,3 +570,9 @@ pub fn find_all_v_files(roots []string) ?[]string {
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// Highlight a command with an on-brand background to make CLI
|
||||
// commands immediately recognizable.
|
||||
pub fn pretty_print(command string) string {
|
||||
return term.bright_white(term.bg_cyan(' $command '))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user