Add Nix flake and fish shell completions - #1
Closed
schickling-assistant wants to merge 1 commit into
Closed
Conversation
- Add flake.nix with buildNpmPackage derivation for the pty CLI - Add fish shell completions (completions/pty.fish) covering all subcommands and flags - Install bash, zsh, and fish completions to standard Nix paths - Add `result` to .gitignore for nix build output Usage as a flake input: nix run github:myobie/pty -- --help nix shell github:myobie/pty Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
@schickling-assistant thanks for this, I've now got something in main inspired from this PR and are grateful for your help 🫡 |
This was referenced Jul 12, 2026
myobie
added a commit
that referenced
this pull request
Jul 21, 2026
…k parity + wire vitest CI (#114) Un-breaks the post-exit parity contract that #111 (exit-reap) broke on main, per Nathan's call: make reap-vs-preserve-on-exit CONFIGURABLE rather than a fixed default. - PTY_REAP_ON_EXIT env knob (network/global; the daemon inherits it via spawn.ts) sets the default: false/0/no/off -> preserve, unset/else -> reap (shipped default). Per-session keep=true (force preserve) / --ephemeral (force reap) override it. shouldReapAtExit gains an OPTIONAL defaultReap param (defaults to reapOnExitDefault()) so the re-exported 2-arg API (relay/layout/supervisors) stays backward-compatible. - parity #1 now asserts BOTH modes (preserve keeps the final screen; reap reaps). exit-reap.test.ts keeps the reap-default suite + adds a preserve-mode block. isolate-env.ts scrubs PTY_REAP_ON_EXIT for a deterministic default. - help.test.ts: completions -> NON_COMMAND_CASES (fixes pre-existing #106 help drift; completions ships its own lightweight usage, not the strict per-subcommand format). - CI: add .github/workflows/test.yml gating the vitest suite (Node 22, matches flake.nix) on PR + push-to-main. Installs the test-only binaries ubuntu-latest lacks (zsh/fish for shells.test.ts; a no-op claude stub for restart-guardrail). The push CI was Nix-build-only, which is how both breaks reached main invisibly. Supersedes #113. - Docs: README "Session lifecycle and cleanup" + CHANGELOG rewritten for the configurable setting. Full suite green: 1408 passed, 21 pre-existing env-gated skips.
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.
Summary
flake.nixwithbuildNpmPackagederivation for theptyCLIcompletions/pty.fish) covering all subcommands and flagsshare/bash-completion/,share/zsh/site-functions/,share/fish/vendor_completions.d/)resultto.gitignorefor nix build outputRationale
This makes
ptyinstallable via Nix flakes, which enables reproducible builds and easy consumption as a flake input in other projects:The derivation uses
buildNpmPackage(nixpkgs) which handles thenode-ptynative prebuilds correctly and patches the shebang to use a Nix-provided Node.js.Test plan
nix build .#ptysucceedspty --helpworks from the built outputpty run -d test sleep 5 && pty list && pty kill test— full session lifecycle worksNote
This PR was created on behalf of @schickling
🤖 Generated with Claude Code