mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 01:12:11 +08:00 
			
		
		
		
	Update alias.bat to show an existing alias
When calling alias.bat with a single argument, check if that argument is an existing alias and if so, display it. Otherwise, proceed as before.
This commit is contained in:
		| @@ -1,7 +1,13 @@ | ||||
| @echo off | ||||
| if ["%1"] == ["/?"] goto:p_help | ||||
| if ["%1"] == ["/reload"] goto:p_reload | ||||
| if ["%2"] == [""] echo Insufficient parameters. & goto:p_help | ||||
|  | ||||
| :: if arg is an existing alias, display it | ||||
| if ["%2"] == [""] ( | ||||
|   doskey /macros | findstr /b %1= && goto:eof | ||||
|   echo Insufficient parameters. & goto:p_help | ||||
| ) | ||||
|  | ||||
| ::validate alias | ||||
| setlocal | ||||
| for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G | ||||
|   | ||||
		Reference in New Issue
	
	Block a user