Skip to content
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

Miscellaneous Changes and Improvements #43

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

thomasnorris
Copy link

@thomasnorris thomasnorris commented Aug 1, 2018

  • I found that the ~ symbol didn't seem to be working for my Cmder setup. I dug into the code and found that that symbol was being set when the user was in the HOME directory. My HOME directory is set to a location other than C:\users\myname, which would explain why the ~ appeared to not be working for me. I added a config setting that would allow the specification of a different environment variable other than HOME. For me, I have that set to USERPROFILE, but someone might want it to be HOMEDRIVE or another environment variable.
  • Neither the optional git or npm symbols were working; the wrong variables were being used.
  • I changed the way that the smart prompt type worked in git directories:
    • Before, just the folder would show. So if my git directory was C:\Users\me\cmder-powerline-prompt and I was inside the 'docs' folder, the folder would just show as docs. I figured that it would be better if it were to show cmder-powerline-prompt\docs to better give me an idea of where I was in the git directory.

I hope that these changes are useful! I know that they are (at least) to me, but I figured that maybe others would like them too.

@thomasnorris thomasnorris changed the title Add config setting to specify environment variable for ~ replacement New config setting; fix for Git and NPM symbols Aug 2, 2018
@thomasnorris thomasnorris reopened this Aug 6, 2018
@thomasnorris thomasnorris changed the title New config setting; fix for Git and NPM symbols Miscellaneous Changes and Improvements Aug 6, 2018
@thomasnorris thomasnorris reopened this Aug 7, 2018
@chrisant996
Copy link

re: the HOME part of the PR:

The intent for the HOME env var is that one sets it to one's home directory.
If the default value of HOME isn't right, then set it to the right value.

Doing that will make ~ in the prompt and ~ in Clink behave the same.

By using a different env var for ~ in the prompt, it makes the prompt show ~ in one directory, and Clink will expand/collapse ~ for a different directory. That seems confusing and might be more complicated than necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants