A
A
Artem Melnykov2019-07-14 10:17:54
cmd/bat
Artem Melnykov, 2019-07-14 10:17:54

How to make unix-style in cmd?

I am writing a cmd customization program:

@echo off
set uhome=%HOMEPATH:\=/%
set ucwd=%cd:\=/%
CALL SET ucwd=%%ucwd:%uhome%=~%%
set ucwd=%ucwd:~2%
prompt=%USERNAME%@%USERDOMAIN%:%ucwd% $$
TITLE Cmd
color F
cmd /k

However, after ~ when moving to a new folder, the name of the old folder remains.
Looks like this:
[email protected]:~Рабочий стол $
cd test
User@machine:~Рабочий стол $

Must:
[email protected]:~Рабочий стол $
cd test
User@machine:~Рабочий стол/test $

And so it should always be
What to do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question