Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c9eac1

Browse files
authored
Merge pull request#2449 from daxgames/alias_fix
Alias fix
2 parentse0b8ebc +ae0b772 commit9c9eac1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
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.

‎vendor/bin/alias.cmd‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ set alias_name=!alias_name:~1!
8181
:: trailing quotes added while validating
8282
setalias_value=!alias_value:~0,-1!
8383

84+
:: '.' escaped
85+
setalias_name_esc=!alias_name:.=\.!
86+
8487
::remove spaces
8588
set_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"
9598
echo%alias_name%=%alias_value%>>"%ALIASES%.tmp"&&type"%ALIASES%.tmp">"%ALIASES%"&@del /f /q"%ALIASES%.tmp"
9699
doskey /macrofile="%ALIASES%"
97100
endlocal
98101
exit /b
99102

100103
:p_del
101104
setdel_alias=%~1
102-
%WINDIR%\System32\findstr /b /v /i"%del_alias%=""%ALIASES%">>"%ALIASES%.tmp"
105+
106+
:: '.' escaped
107+
setdel_alias_esc=!del_alias:.=\.!
108+
109+
%WINDIR%\System32\findstr /v /i"^%del_alias_esc%=""%ALIASES%">>"%ALIASES%.tmp"
103110
type"%ALIASES%".tmp>"%ALIASES%"&@del /f /q"%ALIASES%.tmp"
104111
doskey%del_alias%=
105112
doskey /macrofile="%ALIASES%"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp