Skip to content
Advertisement

How to get unix style prompt in windows (batch)

I am trying to make dos shell which displayes a unix/linux promt. The code is:

JavaScript

I want it to display directory name like in unix/linux but it displays a ~. What is wrong in my code? Can you please help me improve it?

Advertisement

Answer

Probably not quite on the ball with the prompts specific situational substring modification, but the Method of setting the Prompt is.

JavaScript

The above does not refresh the command prompt with the working directory, however will result in commands behaving as expected without expansion issues.

This linked Macro will refresh the Prompt when the working Directory changes, however the act of expanding commands within a user defined variable can result in unexpected results.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement