File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3- ## [ Unreleased ]
3+ ## [ 1.3.17 ] ( https://github.com/cmderdev/cmder/tree/v1.3.17 ) (2020-12-23)
44
55### Fixes
66
7+ - [ bug] Running ` alias ..=cd .. ` removes other aliases #2394
78- Switch to @chrisant996 [ Clink] ( https://github.com/chrisant996/clink/ ) v1.1.10 to fix Clink newer Windows 10 releases.
89- Fix ` \Git\cmd\git.exe found. was unexpected at this time. `
910- Documentation fixes.
Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ set alias_name=!alias_name:~1!
8181:: trailing quotes added while validating
8282set alias_value = !alias_value:~0 ,-1 !
8383
84+ :: '.' escaped
85+ set alias_name_esc = !alias_name:. =\. !
86+
8487:: remove spaces
8588set _temp = %alias_name: =%
8689
@@ -91,15 +94,19 @@ if not ["%_temp%"] == ["%alias_name%"] (
9194)
9295
9396:: replace already defined alias
94- %WINDIR% \System32\findstr /b / v /i " %alias_name % =" " %ALIASES% " >> " %ALIASES% .tmp"
97+ %WINDIR% \System32\findstr /v /i " ^ %alias_name_esc % =" " %ALIASES% " >> " %ALIASES% .tmp"
9598echo %alias_name% =%alias_value% >> " %ALIASES% .tmp" && type " %ALIASES% .tmp" > " %ALIASES% " & @ del /f /q " %ALIASES% .tmp"
9699doskey /macrofile=" %ALIASES% "
97100endlocal
98101exit /b
99102
100103:p_del
101104set del_alias = %~1
102- %WINDIR% \System32\findstr /b /v /i " %del_alias% =" " %ALIASES% " >> " %ALIASES% .tmp"
105+
106+ :: '.' escaped
107+ set del_alias_esc = !del_alias:. =\. !
108+
109+ %WINDIR% \System32\findstr /v /i " ^%del_alias_esc% =" " %ALIASES% " >> " %ALIASES% .tmp"
103110type " %ALIASES% " .tmp > " %ALIASES% " & @ del /f /q " %ALIASES% .tmp"
104111doskey %del_alias% =
105112doskey /macrofile=" %ALIASES% "
You can’t perform that action at this time.
0 commit comments