From bb6f4ae0c203da06fc7c4563dfe8bda5afefcdae Mon Sep 17 00:00:00 2001 From: Stian Date: Sun, 19 Jan 2025 00:45:45 +0100 Subject: [PATCH] Update --- Cmder/config/clink_settings | 19 ++++- Cmder/config/cmder_prompt_config.lua | 117 ++++++++++++++------------- Cmder/config/user-ConEmu.xml | 11 +-- Cmder/config/user_aliases.cmd | 7 +- 4 files changed, 85 insertions(+), 69 deletions(-) diff --git a/Cmder/config/clink_settings b/Cmder/config/clink_settings index 4b1f7d9..8710b38 100755 --- a/Cmder/config/clink_settings +++ b/Cmder/config/clink_settings @@ -8,6 +8,15 @@ clink.autoupdate = off # options: delete,space,ampersand,crlf clink.paste_crlf = space +# name: Auto-answer terminate prompt +# type: enum +# options: off,answer_yes,answer_no +cmd.auto_answer = answer_yes + +# name: Retrieve last exit code +# type: boolean +cmd.get_errorlevel = False + # name: Argument color # type: color color.arg = bold @@ -95,7 +104,7 @@ history.expand_mode = not_dquoted # name: Skip adding lines prefixed with whitespace # type: boolean -history.ignore_space = False +history.ignore_space = True # name: The number of history lines to save # type: integer @@ -103,11 +112,13 @@ history.max_lines = 10000 # name: Share history between instances # type: boolean -history.shared = True +history.shared = False + +# name: Expand envvars when completing +# type: boolean +match.expand_envvars = True # name: Support Windows' Ctrl-Alt substitute for AltGr # type: boolean terminal.use_altgr_substitute = True -# Don't echo errorlevel to file -cmd.get_errorlevel = False \ No newline at end of file diff --git a/Cmder/config/cmder_prompt_config.lua b/Cmder/config/cmder_prompt_config.lua index 6847f25..c22b1bb 100755 --- a/Cmder/config/cmder_prompt_config.lua +++ b/Cmder/config/cmder_prompt_config.lua @@ -1,55 +1,62 @@ --- 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 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 - --- OPTIONAL. If true then Cmder includes git, mercurial, and subversion status in the prompt. - -- default is true -prompt_includeVersionControl = true - --- Prompt Attributes --- --- Colors --- Green: "\x1b[1;33;40m" --- Yellow: "\x1b[1;32;40m" --- Light Grey: "\x1b[1;30;40m" - --- Prompt Element Colors -uah_color = "\x1b[1;33;40m" -- Green = uah = [user]@[hostname] -cwd_color = "\x1b[1;32;40m" -- Yellow cwd = Current Working Directory -lamb_color = "\x1b[1;30;40m" -- Light Grey = Lambda Color -clean_color = "\x1b[1;37;40m" -dirty_color = "\x1b[33;3m" -conflict_color = "\x1b[31;1m" -unknown_color = "\x1b[37;1m" -- White = No VCS Status Branch Color +-- 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 + +-- OPTIONAL. If true then always ignore the cmder.status and cmder.cmdstatus svn config settings and run the svn prompt commands in the background. + -- default is false + -- NOTE: This only takes effect if using Clink v1.2.10 or higher. +prompt_overrideSvnStatusOptIn = 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;33;49m" +-- Yellow: "\x1b[1;32;49m" +-- Light Grey: "\x1b[1;30;49m" + +-- Prompt Element Colors +uah_color = "\x1b[1;33;49m" -- Green = uah = [user]@[hostname] +cwd_color = "\x1b[1;32;49m" -- Yellow 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 = No VCS Status Branch Color diff --git a/Cmder/config/user-ConEmu.xml b/Cmder/config/user-ConEmu.xml index 1fd87d6..aa33985 100755 --- a/Cmder/config/user-ConEmu.xml +++ b/Cmder/config/user-ConEmu.xml @@ -1,7 +1,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -126,8 +126,8 @@ - - + + @@ -944,9 +944,6 @@ - - - diff --git a/Cmder/config/user_aliases.cmd b/Cmder/config/user_aliases.cmd index d70659c..6bfdfd1 100755 --- a/Cmder/config/user_aliases.cmd +++ b/Cmder/config/user_aliases.cmd @@ -17,7 +17,10 @@ ga=git add -A $* gc=git commit $* gs=git status $* gg=global /1 /E .git $* +gh=git hist $* +gl=git log --oneline --all --graph --decorate --color $* home=cd /d "%USERPROFILE%" +kill=pskill $? la=ls -la --color=auto --group-directories-first $* ll=ls -l --color=auto --group-directories-first $* ls=ls --color=auto --group-directories-first $* @@ -33,6 +36,7 @@ putty=d:\bin\putty\putty.exe $* pwd=cd python=d:\bin\python\python.exe $* rm=rm -i $* +shn=curl -F "shorten=$*" "https://envs.sh" sublime=d:\bin\Sublime\sublime_text.exe $* sudo=elevate -k $* tc=d:\bin\totalcmd\totalcmd.exe $* @@ -41,6 +45,3 @@ tshark=d:\bin\Wireshark\tshark.exe $* unalias=alias /d $1 vi=vim $* winscp=d:\bin\WinSCP\winscp.exe $* -gh=git hist $* -gl=git log --oneline --all --graph --decorate --color $* -shn=curl -F "shorten=$*" "https://envs.sh"