Toot

Written by Rob Napier on 2024-12-17 at 22:38

When developing cli tools with ArgumentParser, I generally create a two scripts in the source directory like this (for a tool called "fin"):

$ cat fin

swift run -c release fin $*

$ cat install

swift build -c release && rm -f ~/bin/fin && cp .build/release/fin ~/bin

fin --generate-completion-script zsh > ~/.oh-my-zsh/completions/_fin

This way while developing, I can run ./fin to get the dev version, and I can get shell completion.

Is there a more built-in way to do that w/o custom scripts?

=> More informations about this toot | View the thread | More toots from cocoaphony@mastodon.social

Mentions

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113670561609334955
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
224.529543 milliseconds
Gemini-to-HTML Time
0.365563 milliseconds

This content has been proxied by September (ba2dc).