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

powershell read user profile #505

Closed
harkx opened this issue May 25, 2015 · 8 comments
Closed

powershell read user profile #505

harkx opened this issue May 25, 2015 · 8 comments

Comments

@harkx
Copy link

harkx commented May 25, 2015

Using 150513 it seems cmder does not use the Powershell profile.
I have a function in that profile to connect to Ofice365, it would be great if launching cmder reads the powershell proflile.

In my case it's located in:

C:\Users\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

You can query this location in Powershell with this command:

$Profile
@strig
Copy link

strig commented Jun 13, 2015

Go to settings > startup > tasks and remove the --NoProfile from the PowerShell command arguments.

@harkx
Copy link
Author

harkx commented Jun 13, 2015

Perfect! Thanks!

@harkx harkx closed this as completed Jun 13, 2015
@nevion
Copy link

nevion commented Oct 14, 2015

@strig why is this not default?

@Stanzilla
Copy link
Member

I guess one could argue that to keep cmder properly portable it should ignore the local PS profile, not sure though

@jankatins
Copy link
Contributor

Would it be a nice compromise to add someting like this into user_profile.ps:

# cmder runs the powershell with '--NoProfile', so $Profile isn't called on startup.
# If you want to use your $Profile, you can either uncomment the next lines or 
# change the startup to use $Profile (in cmder under settings > startup > tasks -> 
# remove the '--NoProfile' from the PowerShell command arguments).
#if (Test-Path $PROFILE) {
#    . $PROFILE
#} 

@Jackbennett
Copy link
Contributor

What about a separate pre-configured task that doesn't have --noProfile. People can test with it and just move the default over if they choose.

@LexVocoder
Copy link

I was very puzzled why running PowerShell from the Start menu behaved differently from running it in Cmder. This cost me some time and effort to research the issue. Please fix. Thank you.

@daxgames
Copy link
Member

daxgames commented Oct 25, 2018

@alexhankins Add to the %cmder_root%\user_profile.ps1:

. $profile

kai2nenobu added a commit to kai2nenobu/dotfiles that referenced this issue Jun 7, 2019
-NoProfile をつけているとユーザのプロファイルを読み込まなくなる。
しかし読み込んでほしかったのではずした。

ref. cmderdev/cmder#505
kai2nenobu added a commit to kai2nenobu/dotfiles that referenced this issue Jul 19, 2019
-NoProfile をつけているとユーザのプロファイルを読み込まなくなる。
しかし読み込んでほしかったのではずした。

ref. cmderdev/cmder#505
kai2nenobu added a commit to kai2nenobu/dotfiles that referenced this issue Aug 11, 2020
-NoProfile をつけているとユーザのプロファイルを読み込まなくなる。
しかし読み込んでほしかったのではずした。

ref. cmderdev/cmder#505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants