Skip to content

Open in Terminal/Shell #809

Closed
Closed

Description

@joshaber

Just a menu item, nothing too fancy.

Activity

  1. modified the milestones: , M1: The First One, M2: Dev Another Day on Jan 19, 2017
  2. iAmWillShepherd commented on Jan 23, 2017

    @iAmWillShepherd
    Contributor

    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?

  3. pmn commented on Jan 24, 2017

    @pmn

    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?

  4. niik commented on Jan 25, 2017

    @niik
    Member

    how does this work on the Windows client today?

    We currently ship with our own version of Git and we let the users pick which terminal emulator and shell to open it in.

    image

    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.

    image

    @haacked wrote an article about setting up a custom "smoking" shell with GitHub for Windows.

  5. iAmWillShepherd commented on Jan 25, 2017

    @iAmWillShepherd
    Contributor

    @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)?

  6. niik commented on Jan 25, 2017

    @niik
    Member

    @iAmWillShepherd sorry, copy paste link fail. Should work now

  7. iAmWillShepherd commented on Jan 26, 2017

    @iAmWillShepherd
    Contributor

    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?

  8. shiftkey commented on Jan 26, 2017

    @shiftkey
    Member

    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.

  9. joshaber commented on Jan 26, 2017

    @joshaber
    ContributorAuthor

    macOS always launched Terminal - it didn't look for iTerm or other alternate shells

    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.

  10. joshaber commented on Jan 26, 2017

    @joshaber
    ContributorAuthor

    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.

    FWIW, that's maybe https://github.com/github/Windows/blob/master/GitHub/shell.ps1? @shiftkey or @niik would know better than I.

  11. haacked commented on Jan 26, 2017

    @haacked
    Contributor

    @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.

  12. iAmWillShepherd commented on Jan 27, 2017

    @iAmWillShepherd
    Contributor

    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.

  13. iAmWillShepherd commented on Jan 27, 2017

    @iAmWillShepherd
    Contributor

    Anyone against me searching for the terminals a user has on their machine and allowing the user to select their preferred default?

  14. joshaber commented on Jan 27, 2017

    @joshaber
    ContributorAuthor

    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.

  15. iAmWillShepherd commented on Jan 27, 2017

    @iAmWillShepherd
    Contributor

    Are we still packaging a portable version of git with the Windows version?

  16. shiftkey commented on Jan 31, 2017

    @shiftkey
    Member

    Are we still packaging a portable version of git with the Windows version?

    Nope. See #813 for that flow.

  17. locked as resolved and limited conversation to collaborators on Jul 23, 2018
  18. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions