elepil
asked on
Git config issue, won't use my text editor called Notepad++.exe
Of all my luck, my favorite text editor in Windows has a filename of Notepad++.exe. I think those plus signs are causing a problem. Here is the kind of error I'm getting:
When I do a git config --list, this is how the entry for my text editor looks like:
I've tried doing a git config core.editor="D:\\shareware \\Notepad\ +\+\\notep ad\+\+.exe ", thinking that I had to escape out the plus signs, but it still won't work.
Can anyone tell me what's wrong? I'm hoping someone out there is using notepad++.exe as their text editor for Git, were you able to make it work?
Thanks.
/* I'm trying to revert a commit ... */
D:\git_root\explore_california [master]> git revert fabab344b6fd94c77
/* I get this message, that it can't find my text editor, notepad++.exe */
d:\Sharware\Notepad++\notepad++.exe: line 1: d:SharwareNotepad++notepad++.exe: command not found
error: There was a problem with the editor 'd:\Sharware\Notepad++\notepad++.exe'.
When I do a git config --list, this is how the entry for my text editor looks like:
core.editor=d:\Sharware\Notepad++\notepad++.exe
I've tried doing a git config core.editor="D:\\shareware
Can anyone tell me what's wrong? I'm hoping someone out there is using notepad++.exe as their text editor for Git, were you able to make it work?
Thanks.
Have you tried single quotes without escape characters? Is this a .bash file in Linux? A .bat file in Windows? PowerShell?
'sharware' != 'shareware'.
ASKER
I know. That directory name dates back to when Windows was still limited to 8-character filenames. And I just kind of stuck with it.
ASKER
To Phil Davidson, thanks for responding.
Yes, this is PowerShell. I just downloaded Git and I'm running it on Windows, that's why there is a drive letter and I was using backslashes for directory delimiters. The config file originally did not have quotes around the pathname to the text editor. Putting double or single quotes causes Git to fail to load the config file.
Yes, this is PowerShell. I just downloaded Git and I'm running it on Windows, that's why there is a drive letter and I was using backslashes for directory delimiters. The config file originally did not have quotes around the pathname to the text editor. Putting double or single quotes causes Git to fail to load the config file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Phil, I got it resolved. What I had to do was add the directory name to my PATH environment variable, and then:
git config --global core.editor notepad++.exe
It seems to work without the pathname, it somehow just wants the .exe filename.
Thanks for your efforts though.
git config --global core.editor notepad++.exe
It seems to work without the pathname, it somehow just wants the .exe filename.
Thanks for your efforts though.