Module lua.prompt.style
prompt style.
Functions
| wakatime (cmd) | wakatime |
| get_distribution () | get distribution |
| get_os () | get os |
| get_icon () | get icon |
| get_version (name, logo, format) | get version |
| get_time (format) | get time |
| get_cwd () | get cwd |
| generate_ps1 (char, sections) | generate ps1. |
Functions
- wakatime (cmd)
-
wakatime
Parameters:
- cmd string | nil
Returns:
-
string
- get_distribution ()
-
get distribution
Returns:
-
string
- get_os ()
-
get os
Returns:
-
string
- get_icon ()
-
get icon
Returns:
-
string
- get_version (name, logo, format)
-
get version
Parameters:
- name string | nil
- logo string | nil
- format string | nil
Returns:
-
string
- get_time (format)
-
get time
Parameters:
- format string | nil
Returns:
-
string
- get_cwd ()
-
get cwd
Returns:
-
string
- generate_ps1 (char, sections)
-
generate ps1.
sectionsis an array whose element is like{ "white", "blue", get_cwd }and its order determine the order of prompt sections.Parameters:
- char string | nil
- sections {(1: integer, 2: integar, 3: string | function(): string) | string}[]
Returns:
-
function(): string