Skip to content

Run completion script generation without previous setup #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/Swiftly/Proxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public enum Proxy {
}

guard binName != "swiftly" else {
if CommandLine.arguments.count > 1, CommandLine.arguments[1] == "--generate-completion-script" {
// If the first argument is for completion script generation, we let swiftly handle it and finish.
return await Swiftly.main()
}
// Treat this as a swiftly invocation, but first check that we are installed, bootstrapping
// the installation process if we aren't.
let configResult: Result<Config, any Error>
Expand Down