-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Latest Windows 10 Update Breaks Aliases #1374
Comments
It also appears on my windows 10. Run alias "ll" will get the following error. |
Same problem here, aliases stopped working after the latest major W10 update. The colour highlighting for files/folders (ex: when running |
@Demers94 That's because there's this default alias: |
Same here... |
I really love Cmder, but these broken aliases have really cut into my productivity. I've switched to Git Bash for now but I'd love to see a fix soon. |
Mine started working again this morning. When i opened cmder I got this message
Now all aliases seem to be working just fine and i can also use |
For me this is also a blocker in using cmder - is there a chance this will be fixed? |
As a bash:bash user, I have a .bashrc profile inside my user folder. I put all aliases in there and they work! |
@Foxandxss the only issue with that approach is that the aliases are not portable. Maybe not an issue for you but cmder best practice would be to put the aliases and any other shell specific config in a *.cmd, |
@daxgames please read issue's description. It clearly states that problem is with *.cmd config (for cmd.exe). There is no problem with bash and PS aliases. And (surprise) you can store your aliases for bash along with cmder, but you do it in user-profile.sh file which is in cmder/config folder. BUT if there is the config file in the User home dir, it will have greater priority over cmder dir config. So aliases are portable and you can take it all with you! The following example works great on latest Windows 10 Pro 1703 15063.413.
BTW for PowerShell, there's its own alias format. Check the official docs if you need it. |
@illusive-man not sure why you pointed this at me. I am fully aware of how it works since I wrote the profile.d code in cmder and what the issue is. I was just pointing out to @Foxandxss the definite lack of portability in using an alias store outside the cmder folder. Indeed you can store aliases in config/user-profile.sh, I wrote part of that too, but putting all the config in one monolithic file can get a little messy. You can just drop a file in profile.d whose extension matches the shell you are running and it will become a part of that shells initialization. |
@daxgames Don't get me wrong, but I didn't get it at first that you were talking to Foxandxss. Sorry, my bad! Well, personally I'm using like 10-20 aliases on a daily basis. So for me, config/user-profile.sh is more than enough. But I will try and use your advice on profile.d folder. Thanks for the precious hint! |
The problem with |
@illusive-man No problem. I have like 500+ aliases makes the file a little large. |
@Foxandxss If they load from ~/.bashrc and not from $CMDER_ROOT/config/user-profile.sh then I am betting the issue is not the creator update. The Creator update issue is specifically an issue with cmd.exe doskey macros and clink a component used by cmder to provide bash like command completion and other things to cmd.exe. I will look and see if I have the same issue and let you know. |
@daxgames They were working fine until the creator update. I remember updating to it and they stopped working. I had to |
Just confirmed it. I am on Running bash->bash in cmder loads aliases from both $CMDER_ROOT/config/user_profile.sh and from $CMDER_ROOT/config/profile.d/*.sh. Output from brand new bash->bash with no ~/.bashrc
The same does not work for doskey aliases when launching cmder->cmder as expected.
|
I restart cmder....
Doesn't work for me :/ |
Odd. Maybe we are on diff versions of cmder. Also are you using Cmder's bash or windows 10 ubuntu bash? Just for arguments sake I commented the clink load bits from %CMDER_ROOT%/ventor/init.bat and now launching cmder->cmder aliases now work:
But we lose all the niceties clink provides. Have you tried building cmder from source? It is easy:
You should see:
|
You may need to update powershell if you are running version 2. I can't remember if it will build on powershell 2. To check type $PSVersionTable inside powershell. |
After looking back at your output you appear to not be running the cmder 1.3.2+ or you are not running cmder's bash, or you customized your prompt to not use cmders prompt. Notice the difference in the prompt: You:
Me:
|
Wierd I just built from source and my prompt matches yours which means something is broken. but my aliases still work as expected. |
I am using bash::bash indeed. |
Change to $CMDER_ROOT and type This should make your prompt look like mine. For come reason this is not happening automatically as it should be. You could also type: I have updated mine to include some strategic echo messages to help debug the issue:
Now when I launch bash I get the below:
|
What is But thanks for the git-prompt.sh. I changed it to just include the route and git stuff. So far, I am ok with it sourcing the .bashrc |
If you do not have the cmder.sh then there is something amiss with your cmder install. Possibly it is old as I said earlier. '.' is same as 'source' in bash. I understand you are OK with it because it works for you. I wrote this code so if it is somehow broken for some I want to fix it so I need your help since I cannot reproduce the issue on my own. I just fixed the git prompt not auto-loading and will be doing a PR toy resolve the issue. |
Thanks man. It is not like I have an old cmder. I remember killing the git-for-windows vendor and putting a new one while trying to have back my aliases. |
If you have a git-for-windows folder that did not come from a cmder full binary distro that that explains the issue. We add cmder.sh and replace git-prompt.sh with our own versions during package build. You can copy vendor/cmder.sh to the path I gave you earlier and it will fix your alias loading issue. You may need to get cmder.sh from the zip I asked you to download earlier to attempt a build from source. |
@Foxandxss Was my last message accurate or is there something else that needs to be foxed? |
I bet it is Dax, but honestly, I haven't try to revert. I need cmder to work for well, work :P |
@Foxandxss I understand, I do too. Just so you and others know, no 'revert' is required. We add cmder.sh and replace git-prompt.sh with our own version during package build. These are the only changes we make to the core git-for-windows distribution. You can simply copy cmder.sh to '$CMDER_ROOT/vendor/git-for-windows/etc/profile.d/cmder.sh' and it will make profile settings load when a cmder bash session is started as designed in the following order:
|
@daxgames, there is a PR with a fix for this issue in clink: mridgers/clink#464 |
@daxgames I have exactly the same cmder.sh that you posted in your solution to @Foxandxss but my aliases don't load as per the original issue post. I have just downloaded Cmder from website and then updated cmder.sh to be the same as the cmder.sh you posted just to be sure, restarted cmder and still no aliases working. Anybody else still having this issue? Also is there a workaround which can be implemented in the meantime? Having no aliases is driving me nuts. Thanks for the help |
@thatdoorsajar the fix I posted was for that specific user complaining of aliases not working in Bash if stored in the cmder/config folder because he had deleted cmder.sh. He was trying to fix the issue in this post and inadvertently created a completely unrelated issue. As stated earlier aliases not loading in cmder cmd sessions are related to an issue with clink. See. mridgers/clink#464 for the fix you are looking for. |
@Stanzilla when are we going to start using your clink fork to fix this? I am using "https://ci.appveyor.com/api/buildjobs/9s1asp19s0hoq7g4/artifacts/.build%2Frelease%2F20170816_247112%2Fclink_DEV.zip" in my sources.json and building using scripts/build.ps1 and it fixes my macros in cmder cmd sessions. |
I kinda wanted to wait for the Readline update PR dude to come back but I guess now is a good time as any. |
@Stanzilla your fix still hasn't been applied. I started using the fix from @KayLeung on his Google drive (as per mridgers/clink#464) and am very ecstatic with the result. |
Everything was working just as normal. All my aliases were being read from
\cmder\config\user-aliases.cmd
then I ran the most recent Windows 10 update and the aliases stopped working. Everything else works fine including theuser-profile.cmd
.I deleted cmder and reinstalled but the exact same problem continues. If this is a problem with the Windows 10 update then sorry for posting here but I imagine it will be a problem the cmder team need to address.
EDIT
Aliases can be stored to the file using
alias foo=bar
but cannot be read from the file by usingfoo
.The text was updated successfully, but these errors were encountered: