Repository navigation
feat: let Command.copy() duplicate a command without argument - #22
Merged
Merged
Conversation
copy() with no argument returns an independent command running the same binary with the same settings, without looking the binary up again. copy(other) keeps copying another command's settings into this one.
The home page install box gets one tab per package manager, the getting started page and the README list the same commands.
Match the other guide titles, which name a topic rather than a module. The page path and its section anchors stay, so existing links still work.
Build the ssh command once and give each host its own copy() of it, instead of looking the binary up on PATH for every host.
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.
🧑💻What is the change being made?
Command.copy()without argument returns an independent command running the same binary with the same settings, without looking the binary up onPATHagain.copy(other)is unchanged.Bind._commanduses it.asyncioguide is renamed "Async execution" in the sidebar and title (path and anchors unchanged).sshonce and run acopy()per host.❓ Why is the change being made?
Reusing a base configuration required
Command("git").copy(base), which repeats the binary name and its lookup.base.copy()is shorter and resolves the binary once, which matters when fanning out many commands.✅ How has this been tested?
copy()still works afterPATHis emptied.uv run poe lintanduv run poe test(233 passed);vitepress buildpasses.📚 How has this been documented?
copy()docstring, the "Reuse a configuration" guide section and aCHANGELOG.mdentry under Unreleased.🔗 Related Issues
None.