Introduces some options, for example user@host info prompt#36
Closed
TimB87 wants to merge 7 commits intoxcambar:masterfrom
Closed
Introduces some options, for example user@host info prompt#36TimB87 wants to merge 7 commits intoxcambar:masterfrom
TimB87 wants to merge 7 commits intoxcambar:masterfrom
Conversation
Author
|
Looking at #35, I would love to make that an option as well. @nkoehring @tbehner any thoughts? |
This adds an SSH only option for the user/host info prompt. `purs prompt` needs to be run with -u and additionally -s to only show the info if the shell is run inside an SSH session.
Author
|
closed due to inactivity |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So, this started out with me rebasing #35 against current HEAD, but I always want to know which user@host I am currently on, so I made it an option for the prompt
purs prompt -uorpurs prompt --userhostI also gave it a nice colour to go along with the overall theme (hopefully, I'm a bad designer), and the username changes to red if you are root.
Also there is an option to change the default prompts symbol and COMMAND_SYMBOL as well as the option to print the newline prior every precmd or not.
I had problems with reading the information on --git-detailed precmd, as the symbols overlapped the text. I fixed that with one white space each where it was needed for me.
I am fairly new to Rust, so I am happy to discuss changes and or other option choices, but I hope you like the general idea as well.
https://i.imgur.com/zcstti8.png