{"action":"created","issue":{"url":"https://api.github.com/repos/scopatz/xonsh/issues/223","labels_url":"https://api.github.com/repos/scopatz/xonsh/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/scopatz/xonsh/issues/223/comments","events_url":"https://api.github.com/repos/scopatz/xonsh/issues/223/events","html_url":"https://github.com/scopatz/xonsh/pull/223","id":74727613,"number":223,"title":"Feature: Windows support","user":{"login":"rbrewer123","id":743058,"avatar_url":"https://avatars.githubusercontent.com/u/743058?v=3","gravatar_id":"","url":"https://api.github.com/users/rbrewer123","html_url":"https://github.com/rbrewer123","followers_url":"https://api.github.com/users/rbrewer123/followers","following_url":"https://api.github.com/users/rbrewer123/following{/other_user}","gists_url":"https://api.github.com/users/rbrewer123/gists{/gist_id}","starred_url":"https://api.github.com/users/rbrewer123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbrewer123/subscriptions","organizations_url":"https://api.github.com/users/rbrewer123/orgs","repos_url":"https://api.github.com/users/rbrewer123/repos","events_url":"https://api.github.com/users/rbrewer123/events{/privacy}","received_events_url":"https://api.github.com/users/rbrewer123/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scopatz/xonsh/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/scopatz/xonsh/milestones/1","html_url":"https://github.com/scopatz/xonsh/milestones/v0.2","labels_url":"https://api.github.com/repos/scopatz/xonsh/milestones/1/labels","id":1013181,"number":1,"title":"v0.2","description":"","creator":{"login":"scopatz","id":320553,"avatar_url":"https://avatars.githubusercontent.com/u/320553?v=3","gravatar_id":"","url":"https://api.github.com/users/scopatz","html_url":"https://github.com/scopatz","followers_url":"https://api.github.com/users/scopatz/followers","following_url":"https://api.github.com/users/scopatz/following{/other_user}","gists_url":"https://api.github.com/users/scopatz/gists{/gist_id}","starred_url":"https://api.github.com/users/scopatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scopatz/subscriptions","organizations_url":"https://api.github.com/users/scopatz/orgs","repos_url":"https://api.github.com/users/scopatz/repos","events_url":"https://api.github.com/users/scopatz/events{/privacy}","received_events_url":"https://api.github.com/users/scopatz/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":183,"state":"open","created_at":"2015-03-09T18:29:10Z","updated_at":"2015-05-10T18:32:18Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-05-09T18:17:25Z","updated_at":"2015-05-12T05:11:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scopatz/xonsh/pulls/223","html_url":"https://github.com/scopatz/xonsh/pull/223","diff_url":"https://github.com/scopatz/xonsh/pull/223.diff","patch_url":"https://github.com/scopatz/xonsh/pull/223.patch"},"body":"This branch gets xonsh working on Windows.  For my use-case of needing\r\na better shell on Windows, this initial port of xonsh is already far\r\nmore usable than cmd.exe.\r\n\r\nI'm running it on Windows 8.1 with Python 3.4.3, ply 3.6, and\r\npyreadline 2.0.  I also have msysGit 1.9.5.20150319 installed which\r\nprovides a number of Unix utilities (e.g. bash, sh, git, ls).  The\r\nnosetests all pass and I created an xonsh.bat script to start it.  I\r\nalso verified the nosetests still pass on Ubuntu 14.04.\r\n\r\nThese are some things to be aware of:\r\n\r\n* GNU readline doesn't seem to be readily available on Windows.\r\n  \"pip install readline\" gives an error.  \"pip install pyreadline\"\r\n  gives a usable pure Python readline that I'm running with.\r\n* bash on Windows changes PATH, PWD, and possibly other\r\n  path-related environment variables to a '/c/Windows/System32'\r\n  style which breaks xonsh's environment.  To solve this, on Windows\r\n  I revert those variables back to the original os.environ settings.\r\n  For compatibility with bash on Windows it might be nice to\r\n  support that syntax in the future.  (Right now the code\r\n  allows paths like 'c:\\\\foo' or 'c:/foo' but not '/c/foo').\r\n* Windows Python doesn't have the signals or process group support\r\n  required by the existing job control mechanism.\r\n  I changed jobs.py to first attempt to import jobs_posix.py\r\n  and fall back to jobs_not_implemented.py\r\n  if that import fails.  My guess is that emulating job control\r\n  on Windows would be a bit involved since the Python infrastructure\r\n  would first need to be created.\r\n\r\nFor the following issues, my preference would be to open a separate\r\nissue for each one to track them.  I think it would be nice to roll\r\nout the initial functionality without waiting for them and perhaps\r\nothers can jump in to help fix these too:\r\n\r\n* Background jobs (via '&') seem to work.  However, if a background\r\n  job is currently running and you issue any of the job-control commands\r\n  (e.g. jobs, bg, fg), the shell hangs until the background job\r\n  completes.  I haven't investigated this much yet.  My current\r\n  workaround is to not start background jobs.\r\n* My initial attempt at retrieving the current git branch was\r\n  too slow to be usable, so I disabled that on Windows.\r\n* I got a shebang script for xonsh to run directly from xonsh\r\n  with the following initial line::\r\n\r\n    #!python -m xonsh.main\r\n\r\n  msysGit comes with various Unix utilities implemented or wrapped\r\n  with /bin/sh scripts which seem to work with its included bash\r\n  tools.  I haven't looked too far into how to get them to run with\r\n  xonsh yet but this would be a nice capability.  Also getting the\r\n  xonsh shebang line to work with a more-standard::\r\n\r\n    #!/usr/bin/env xonsh\r\n\r\n  line would be nice too.\r\n\r\nThe installation process for Windows is roughtly this:\r\n\r\n* install Python 3.4.3 (I use chocolatey.org for this)\r\n* ``pip install ply``\r\n* ``pip install pyreadline``\r\n* ``python setup.py install``\r\n* ``scripts\\xonsh``\r\n\r\nLet me know if you need me to make any additional changes to\r\nsupport merging this.\r\n"},"comment":{"url":"https://api.github.com/repos/scopatz/xonsh/issues/comments/101134415","html_url":"https://github.com/scopatz/xonsh/pull/223#issuecomment-101134415","issue_url":"https://api.github.com/repos/scopatz/xonsh/issues/223","id":101134415,"user":{"login":"rbrewer123","id":743058,"avatar_url":"https://avatars.githubusercontent.com/u/743058?v=3","gravatar_id":"","url":"https://api.github.com/users/rbrewer123","html_url":"https://github.com/rbrewer123","followers_url":"https://api.github.com/users/rbrewer123/followers","following_url":"https://api.github.com/users/rbrewer123/following{/other_user}","gists_url":"https://api.github.com/users/rbrewer123/gists{/gist_id}","starred_url":"https://api.github.com/users/rbrewer123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbrewer123/subscriptions","organizations_url":"https://api.github.com/users/rbrewer123/orgs","repos_url":"https://api.github.com/users/rbrewer123/repos","events_url":"https://api.github.com/users/rbrewer123/events{/privacy}","received_events_url":"https://api.github.com/users/rbrewer123/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T05:11:15Z","updated_at":"2015-05-12T05:11:15Z","body":"@wrywerytwreywery the gitk bug you mention above I can reproduce.  It seems to happen with all shebang scripts in the msysGit package.  I think on Windows we may need to remap absolute paths like '/bin/sh' to just 'sh' and things will work.  And possibly map things like '/usr/bin/env python' to just 'python'.  My preference would be to open a separate issue for this after the initial PR is merged.\r\n\r\nI'm not able to reproduce the 'cd Downloads' issue you're seeing.  Can you provide a little more description of your setup when you're seeing it?  Or are you still seeing it at this point?"}}