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
text/gemini
This content has been proxied by September (ba2dc).