-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wxGUI/console: Adding prompt string to command prompt #2718
wxGUI/console: Adding prompt string to command prompt #2718
Conversation
|
Hi Linda! |
Hi Vero, I am not sure about |
|
Perhaps the |
I tend to agree, either |
Just realized that for example the Python Shell prompt in Spyder is also interesting - it uses "In [1]:" where the number 1, 2, etc. refers to the order of executed commands. |
|
Or we can distinguish between console prompt symbol according OS: GNU/Linux and Unix-like (Free/OpenBSD, macOS) terminal uses the prompt symbol MS Windows CMD uses the prompt symbol |
I am still not sure if this one sign (may it be |
I'm ok with it, but for GRASS GIS under MS Windows, it would be better to use e.g. |
Yes @tmszi, I agree. I looked under Windows and GRASS's independent CMD actually also uses this When I looked under my Ubuntu, it is different, it uses First I thought to preserve that style exactly as it is. The first style for Windows and the second one for Unix-like systems. But for Unix-like systems, I am not sure how the Console prompt should behave when a user switches to a different mapset. Should the prompt string be also changed? Probably yes and then it is getting a bit complicated. :-) So maybe the variant with |
I overlooked that even on Unix-like OS systems (terminal) GRASS GIS use the Yes I agree as you suggest, let's use the |
|
Honestly, I am not convinced about this. It's basically a workaround because we can't use real shell here, it introduces a lot of new code to maintain and it will likely introduce new bugs. For example type something, select everything and use backspace - it doesn't work. Another one: select all and type any letter - I am not able to use the console anymore. This approach requires handling a lot of edge cases to make it work in a robust way. I was wondering a different solution would work better (maybe not): When there is no focus on the console and it's empty, it would display grayish text (e.g. something like "Type command here and press Enter") and then on focus the text would disappear. When the widget looses focus, it would test if it's empty and if yes, it would show the help text again. I think this could potentially be easier to implement. If that doesn't work we could try to keep this solution but it needs to be really well tested. In terms of the prompt I think ' > ' should be enough. |
I concur here regarding usability |
|
Implemented according to the suggestion #2718 (comment) in #2728 . |

This PR adds input prompt to Console in order to clarify beginners that they are supposed to write their commands here. Follows the idea given in #2585.