You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would this be a Mac only feature or does this need to support Windows? If so, would it make sense to have preferences for which terminal app the user wants opened?
Windows users will need to be able to open a terminal as well, since it's still possible for Windows users to get in a state that requires using Git on the command line. Your question about preferences for terminal is a good one, since they may want to use Powershell or cmd.
We currently ship with our own version of Git and we let the users pick which terminal emulator and shell to open it in.
The Custom option let's users use a custom terminal emulator (such as Console2) which we will then launch with the correct environment variables (PATH) set up to launch our custom version of Git. The custom option will always launch with Git Bash whereas the Powershell option will launch with PoshGit.
@niik I tried to navigate to that article you linked to and got a 404 error. Is it possible that I need access to read that or does it actually mean what 404s are supposed to mean (I've come across other 404s on GitHub that turned out to be closer to a 401/403 in meaning)?
After reading a bit more about how GitHub Desktop worked, I'm thinking it may be worthwhile to get access to the PS1 script the old app used to setup PowerShell to use the bundled version of Git.
For reference, I'm referring to the following paragraph in this article
One thing to note is that if you launch PowerShell via some other means other than our Git Shell shortcut or the Desktop application, our version of Git won’t be there. That’s because we install a portable version of Git that does not change any of your system settings.
Also, how did the last application know what terminal/shell applications a user had installed on their machine - specifically for Mac OS?
Also, how did the last application know what terminal/shell applications a user had installed on their machine - specifically for Mac OS?
macOS always launched Terminal - it didn't look for iTerm or other alternate shells. Windows would track the selected shell in a setting, but that's because we bundle Git Bash in our PortableGit install.
After reading a bit more about how GitHub Desktop worked, I'm thinking it may be worthwhile to get access to the PS1 script the old app used to setup PowerShell to use the bundled version of Git.
@joshaber correct. When the app runs, we drop that file into the %LocalAppData%\GitHub directory which is a stable location (does not change from release to release). Every time we update Git, the Desktop app rewrites that file to replace the substitution string, {{pgit_path}}, with the actual paths.
Windows would track the selected shell in a setting, but that's because we bundle Git Bash in our PortableGit install.
@shiftkey So does this mean I need to create a settings page? Since Windows had one.
@joshaber do we have a way for dropping files in %LocalAppData%\GitHub on Windows right now? I don't remember going into platform specific code to much. My only thought is to include shell.psq in our current project and copy that file somewhere. Assuming doing that in the main process is the best way to go, but knowing for sure would be cool.
So does this mean I need to create a settings page?
Yeah, we currently already have a Preferences component with "Accounts" and "Git" tabs. On macOS, we also had an "Advanced" tab that was a catch-all for this kind of thing.
do we have a way for dropping files in %LocalAppData%\GitHub on Windows right now?
So it looks like all the app stuff is already installed in %LocalAppData\desktop, scoped by version. I assume that's a Squirrel.Windows thing. So if you put the script in app/static/win32, it should be automatically installed with the app.
Activity
iAmWillShepherd commentedon Jan 23, 2017
Would this be a Mac only feature or does this need to support Windows? If so, would it make sense to have preferences for which terminal app the user wants opened?
pmn commentedon Jan 24, 2017
Windows users will need to be able to open a terminal as well, since it's still possible for Windows users to get in a state that requires using Git on the command line. Your question about preferences for terminal is a good one, since they may want to use Powershell or
cmd.@niik @shiftkey @haacked how does this work on the Windows client today?
niik commentedon Jan 25, 2017
We currently ship with our own version of Git and we let the users pick which terminal emulator and shell to open it in.
The
Customoption let's users use a custom terminal emulator (such as Console2) which we will then launch with the correct environment variables (PATH) set up to launch our custom version of Git. The custom option will always launch with Git Bash whereas the Powershell option will launch with PoshGit.@haacked wrote an article about setting up a custom "smoking" shell with GitHub for Windows.
iAmWillShepherd commentedon Jan 25, 2017
@niik I tried to navigate to that article you linked to and got a 404 error. Is it possible that I need access to read that or does it actually mean what 404s are supposed to mean (I've come across other 404s on GitHub that turned out to be closer to a 401/403 in meaning)?
niik commentedon Jan 25, 2017
@iAmWillShepherd sorry, copy paste link fail. Should work now
iAmWillShepherd commentedon Jan 26, 2017
After reading a bit more about how GitHub Desktop worked, I'm thinking it may be worthwhile to get access to the PS1 script the old app used to setup PowerShell to use the bundled version of Git.
For reference, I'm referring to the following paragraph in this article
Also, how did the last application know what terminal/shell applications a user had installed on their machine - specifically for Mac OS?
shiftkey commentedon Jan 26, 2017
macOS always launched Terminal - it didn't look for iTerm or other alternate shells. Windows would track the selected shell in a setting, but that's because we bundle Git Bash in our PortableGit install.
joshaber commentedon Jan 26, 2017
Though, FWIW, we've had a long-standing user request to support choosing an alternative: https://github.com/github/Mac/issues/3048
I'm not saying we need to do that for beta, but more to add context.
joshaber commentedon Jan 26, 2017
FWIW, that's maybe https://github.com/github/Windows/blob/master/GitHub/shell.ps1? @shiftkey or @niik would know better than I.
haacked commentedon Jan 26, 2017
@joshaber correct. When the app runs, we drop that file into the
%LocalAppData%\GitHubdirectory which is a stable location (does not change from release to release). Every time we update Git, the Desktop app rewrites that file to replace the substitution string,{{pgit_path}}, with the actual paths.iAmWillShepherd commentedon Jan 27, 2017
@shiftkey So does this mean I need to create a settings page? Since Windows had one.
@joshaber do we have a way for dropping files in
%LocalAppData%\GitHubon Windows right now? I don't remember going into platform specific code to much. My only thought is to includeshell.psqin our current project and copy that file somewhere. Assuming doing that in the main process is the best way to go, but knowing for sure would be cool.iAmWillShepherd commentedon Jan 27, 2017
Anyone against me searching for the terminals a user has on their machine and allowing the user to select their preferred default?
joshaber commentedon Jan 27, 2017
Yeah, we currently already have a Preferences component with "Accounts" and "Git" tabs. On macOS, we also had an "Advanced" tab that was a catch-all for this kind of thing.
So it looks like all the app stuff is already installed in
%LocalAppData\desktop, scoped by version. I assume that's a Squirrel.Windows thing. So if you put the script inapp/static/win32, it should be automatically installed with the app.iAmWillShepherd commentedon Jan 27, 2017
Are we still packaging a portable version of git with the Windows version?
shiftkey commentedon Jan 31, 2017
Nope. See #813 for that flow.