Open paulirwin opened 9 years ago
You probably want to look into https://technet.microsoft.com/en-us/library/hh849882.aspx. PowerShell defaults to Unicode output if you use '>', so you must instead pipe to out-file and set the encoding there.
@awarrenlove Workarounds like that are acceptable, but updating the docs/readme to reflect that would be in order (if that's the only option) since the readme as-is doesn't work in PowerShell.
Steps to reproduce:
joe visualstudio > .gitignore
per the documentation in READMEgit add .
git status
. Note that the "bin" folder has been added as a staged change, despite being ignored.This is due to PowerShell using some UTF-8 marks that git doesn't like but for some reason git doesn't warn you. You can see this output in Atom, with some line ending issues as well (note the presumably Unicode-related marks at the beginning of the file):
Note that if you run
echo "bin/" > .gitignore
it also doesn't work - so this is definitely a problem with either PowerShell or git, and not a problem with Joe. Also of note is that the piping works if this is run from Git Bash which is installed with Git for Windows. However, this means that either Joe should have functionality to create the .gitignore without redirecting standard output (such as a --create flag), and the documentation should at least be updated to note that redirecting output with>
in PowerShell results in a file that is not usable by git. Unless there's some other way to work around this limitation in PowerShell.