-
-
Save MVoz/30c53716970fbdaf0f047a78cf57bca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
for /F %%a IN ('echo %1^|findstr /R ^[0-9][0-9]*$') DO set arg1num=%%a | |
IF "%1"=="%arg1num%" ( | |
doskey /history | findstr /N /R .* | findstr /B %1: > %TEMP%\__history.tmp | |
FOR /F "delims=: tokens=1*" %%a IN (%TEMP%\__history.tmp) DO @echo %%b | |
) ELSE ( | |
IF "%1"=="" ( | |
doskey /history | findstr /N /R .* | |
) ELSE ( | |
doskey /history | findstr /N /R %1 | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment