Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct way to set up a Windows Terminal profile? #46

Open
GrimGwyllgi opened this issue Jan 2, 2022 · 2 comments
Open

Correct way to set up a Windows Terminal profile? #46

GrimGwyllgi opened this issue Jan 2, 2022 · 2 comments

Comments

@GrimGwyllgi
Copy link

I was wondering if it's possible to create a Windows Terminal profile for GitPortable? The title above mentions "correct way" because while I did manage to get Git Bash to open in WT, I don't know if how I did it is the way to go. I'm pretty new to this stuff.
Here's what I tried and what worked in the end:

  • Created a WT profile with command line set to path\to\PortableApps\GitPortable\GitBashPortable.exe. Opening a Git Bash tab launches mintty.

  • Changed the path to \GitPortable\App\Git\bin\bash.exe. Git Bash runs in the WT tab but the home location isn't the portable one. (That result was pretty obvious since I was bypassing the portable launcher, but I tried anyway)

  • Found out that you need to use bash.exe instead of git-bash.exe if you don't want mintty to run. Then found GitBashPortable.ini and noticed that the ProgramExecutable is Git\git-bash.exe. I changed that to Git\bin\bash.exe and also WaitForEXE2 to bash.exe. Then set the command line in the WT profile back to GitBashPortable.exe. This time when I opened a tab, a new instance of WT launched with the shell running. Running the portable launcher also launches a new WT window.

  • Finally, I changed the new instance behaviour in WT to attach to the most recently used window. So now, opening a tab with the profile I created launches a new tab in the same window. Closing my tab doesn't affect the new tab, but closing the new tab also closes my tab. Running the portable launcher also opens a new tab when WT is already running.

So basically, the WT profile is a shortcut to the portable launcher which in turn runs bash.exe in a new instance of WT.
Is there a better way of getting this to work?
Will editing the launcher INI like that cause any limitations or complications that I'm not able to think of?
And a final question (in case this is the only way), do the INIs get overwritten when GitPortable is updated?

@jgonyea
Copy link
Contributor

jgonyea commented Jan 2, 2022

Typically, anything in the App folder will get overwritten on upgrading via a *.paf.exe

What are you trying to accomplish?

@GrimGwyllgi
Copy link
Author

I want to be able to use Windows Terminal instead of mintty on my personal computer, and mintty on any other computer.

I realise now that the changes I made to the INI mean that using the portable launcher will run bash in the default console host of whatever computer I'm using. So I guess the ultimate goal is to have the portable launcher deal with setting the correct path for HOME, AND also having the option of choosing between mintty and the default console host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants