Menu

#3 windows shell port with simple code proposition

open
nobody
None
5
2014-06-23
2014-06-23
Michal G.
No

Hi,

I touched the following code and it seems that it works on my windows7 shell.
Maybe it is worth adding to repository.

ifeq ($(notdir $(ComSpec)),cmd.exe)
  __PROMPT = $(shell setlocal enabledelayedexpansion \
    & set /p input=$(__HISTORY)^> 1>&2 \
    & if not (!input!)==() echo !input! else echo.)
else
  __PROMPT = $(shell read -p "$(__HISTORY)> " CMD ARG ; echo $$CMD $$ARG)
endif

Thanks,
Michal

Discussion


Log in to post a comment.

Monday.com Logo