Repository navigation
Browser property from gh config #12598
Replies: 2 comments
|
You can set Chrome (and a specific profile) with gh config set browser: Chrome (default profile): gh config set browser "google-chrome" On macOS you can also use: gh config set browser 'open -a "Google Chrome"' Chrome with a specific profile: Chrome uses profile names like Default, Profile 1, Profile 2, etc. (they may appear as "Person 1" in the UI). macOS: gh config set browser 'open -a "Google Chrome" --args --profile-directory="Default"' Linux: gh config set browser 'google-chrome --profile-directory=Default' Windows: gh config set browser '"C:\Program Files\Google\Chrome\Application\chrome.exe" --profile-directory=Default' Replace Default with your profile name (e.g. Profile 1). You can check profile folders in: macOS: ~/Library/Application Support/Google/Chrome/ Verify with: gh config get browser |
|
On macOS, you can put the profile argument in a small wrapper. Save this as #!/bin/sh
exec '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' \
--profile-directory='Profile 1' "$@"Then point gh at it: chmod +x /absolute/path/gh-chrome-profile
gh config set browser /absolute/path/gh-chrome-profile
Also check Tested argument forwarding with a mock executable. |
Uh oh!
There was an error while loading. Please reload this page.
How to add Google Chrome to my gh config list with a default profile name
All reactions