mirror of
https://github.com/cmderdev/cmder.git
synced 2025-11-08 21:29:02 +08:00
Cmder's hg prompt didn't use async prompt filtering yet.
Cmder's svn prompt only used async prompt filtering if a special config
variable was set (the commit which contributed it seems to have
misunderstood the git config settings for the git async prompt).
This commit makes the following changes:
1. Adds async prompt filtering for hg.
2. Makes async prompt filtering for svn the default.
3. Removes the prompt_overrideSvnStatusOptIn variable.
4. Fixes a bug where any errors during `svn status` in the svn prompt
accidentally show up in the terminal.
5. Fixes a bug where any errors during `hg branch` in the hg prompt
turn into Lua errors.
6. Simplifies the code for colors in the hg and svn prompts.
7. Clean up the svn prompt code and make it consistent with the git
and hg prompt code.
58 lines
2.1 KiB
Plaintext
58 lines
2.1 KiB
Plaintext
-- All of the below was 'borrowed' from https://github.com/AmrEldib/cmder-powerline-prompt
|
|
|
|
--- REQUIRED. config_prompt_type is whether the displayed prompt is the full path or only the folder name
|
|
-- Use:
|
|
-- "full" for full path like C:\Windows\System32
|
|
-- "folder" for folder name only like System32
|
|
-- default is full
|
|
prompt_type = "full"
|
|
|
|
--- REQUIRED. config_prompt_useHomeSymbol is whether to show ~ instead of the full path to the user's home folder
|
|
-- Use true or false
|
|
-- default is false
|
|
prompt_useHomeSymbol = false
|
|
|
|
-- Symbols
|
|
-- REQUIRED. Prompt displayed instead of user's home folder e.g. C:\Users\username
|
|
-- default is '~'
|
|
prompt_homeSymbol = "~"
|
|
|
|
-- REQUIRED. Symbol displayed in the new line below the prompt.
|
|
-- default is 'λ'
|
|
prompt_lambSymbol = "λ"
|
|
|
|
-- REQUIRED. Adds [user]@[host] to the beginning of the prompt like bash
|
|
-- default is false
|
|
prompt_useUserAtHost = false
|
|
|
|
-- REQUIRED. If true prompt is a single line instead of default two line prompt.
|
|
-- default is false
|
|
prompt_singleLine = false
|
|
|
|
-- OPTIONAL. If true then Cmder includes git, mercurial, and subversion status in the prompt.
|
|
-- default is true
|
|
prompt_includeVersionControl = true
|
|
|
|
-- OPTIONAL. If true then always ignore the cmder.status and cmder.cmdstatus git config settings and run the git prompt commands in the background.
|
|
-- default is false
|
|
-- NOTE: This only takes effect if using Clink v1.2.10 or higher.
|
|
prompt_overrideGitStatusOptIn = false
|
|
|
|
-- Prompt Attributes
|
|
--
|
|
-- Colors: https://github.com/cmderdev/cmder/wiki/Customization#list-of-colors
|
|
-- Effects: https://github.com/cmderdev/cmder/wiki/Customization#list-of-effects
|
|
--
|
|
-- Green: "\x1b[1;32;49m"
|
|
-- Yellow: "\x1b[1;33;49m"
|
|
-- Light Grey: "\x1b[1;30;49m"
|
|
|
|
-- Prompt Element Colors
|
|
uah_color = "\x1b[1;33;49m" -- Yellow uah = [user]@[hostname]
|
|
cwd_color = "\x1b[1;32;49m" -- Green cwd = Current Working Directory
|
|
lamb_color = "\x1b[1;30;49m" -- Light Grey = Lambda Color
|
|
clean_color = "\x1b[37;1m"
|
|
dirty_color = "\x1b[33;3m" -- Yellow, Italic
|
|
conflict_color = "\x1b[31;1m" -- Red, Bold
|
|
unknown_color = "\x1b[37;1m" -- White, Bold = No VCS Status Branch Color
|