Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24
Why
portsalready knows which dev server is yours. Opening it shouldn't mean copying a port number into a browser.ports open 3000(orports open shop) does it, and it checks first that the port really is a web server.What
cmd/open.goports stopdoes.ports doctor;$BROWSERfirst (its first entry,%sfor the URL, no shell). Otherwise:openon macOS;xdg-openon Linux;wslvieworexplorer.exein WSL (explorer.exe's exit status is ignored, since it exits 1 even when it worked);rundll32 url.dll,FileProtocolHandleron Windows (notstart, which reads&as a command separator).internal/inspect/web.go:WebURLnext devcan compile its first page.pickSpec(verb, confirm, blocked, none).ports stopbehaves exactly as before, including its messages.ports opensection and exit-code rows in commands.mdx;Evidence
http://localhost:<port>/through a$BROWSERrecorder;$BROWSERexits 1 and keeps the URL.$BROWSERparsing;TestOpen: open by port, a non-HTTP port, a free port;TestOpenSeveral: off a TTY it exits 2 listing both ports; on a real PTY, choosing the second server opens it.webbuilds.$BROWSERis split on spaces;Rollback
Revert the squash commit.
ports openis a new command, and the picker refactor goes with it.Generated by Claude Code