# Generated by scripts/generate-completions.ts — do not edit by hand.

# Bash completion for fln. Source this file or install to a bash-completion.d path.
#   source /path/to/completions/fln.bash

_fln() {
	local cur prev words cword
	_init_completion -s || return
	
	local subcmd=""
	if (( cword >= 2 )); then
		local first="${words[1]}"
		for candidate in init why doctor mcp plan diff upgrade; do
			if [[ "${first}" == "${candidate}" ]]; then
				subcmd="${candidate}"
				break
			fi
		done
	fi
	
	case "${subcmd}" in
	init)
		local init_opts="--overwrite --version --help -w -v -h"
		COMPREPLY=( $(compgen -W "${init_opts}" -- "${cur}") )
		return
		;;
	why)
		if [[ "${cur}" == -* ]]; then
			local why_opts="--output --exclude --include --only --relevant --stdin --ext --include-hidden --no-gitignore --max-file-size --max-total-size --max-tokens --budget --max-content-tokens --token-model --security-check --recommend-budget --http --port --strict-limits --strict-toctou --annotate-tree --collect-todo --compress --outline --diff-hunks --encoding --output-split --no-contents --no-tree --format --dry-run --stdout --copy --overwrite --quiet --verbose --debug --no-ansi --follow-symlinks --no-sponsor-message --no-local-state --ignore-config --date --banner --banner-file --footer --footer-file --since --version --help -o -e -i -w -q -V -v -h"
			COMPREPLY=( $(compgen -W "${why_opts}" -- "${cur}") )
			return
		fi
		if (( cword == 2 )); then
			compopt -o filenames
			COMPREPLY=( $(compgen -f -- "${cur}") )
			return
		fi
		if (( cword == 3 )); then
			compopt -o filenames
			COMPREPLY=( $(compgen -d -- "${cur}") )
			return
		fi
		return
		;;
	doctor)
		if [[ "${cur}" == -* ]]; then
			local doctor_opts="--output --exclude --include --only --relevant --stdin --ext --include-hidden --no-gitignore --max-file-size --max-total-size --max-tokens --budget --max-content-tokens --token-model --security-check --recommend-budget --http --port --strict-limits --strict-toctou --annotate-tree --collect-todo --compress --outline --diff-hunks --encoding --output-split --no-contents --no-tree --format --dry-run --stdout --copy --overwrite --quiet --verbose --debug --no-ansi --follow-symlinks --no-sponsor-message --no-local-state --ignore-config --date --banner --banner-file --footer --footer-file --since --version --help -o -e -i -w -q -V -v -h"
			COMPREPLY=( $(compgen -W "${doctor_opts}" -- "${cur}") )
			return
		fi
		if (( cword == 2 )); then
			compopt -o filenames
			COMPREPLY=( $(compgen -d -- "${cur}") )
			return
		fi
		return
		;;
	esac
	
	if (( cword == 1 )); then
		if [[ "${cur}" == -* ]]; then
			local global_opts="--output --exclude --include --only --relevant --stdin --ext --include-hidden --no-gitignore --max-file-size --max-total-size --max-tokens --budget --max-content-tokens --token-model --security-check --recommend-budget --http --port --strict-limits --strict-toctou --annotate-tree --collect-todo --compress --outline --diff-hunks --encoding --output-split --no-contents --no-tree --format --dry-run --stdout --copy --overwrite --quiet --verbose --debug --no-ansi --follow-symlinks --no-sponsor-message --no-local-state --ignore-config --date --banner --banner-file --footer --footer-file --since --version --help -o -e -i -w -q -V -v -h"
			COMPREPLY=( $(compgen -W "${global_opts}" -- "${cur}") )
			return
		fi
		COMPREPLY=( $(compgen -W "init why doctor mcp plan diff upgrade" -- "${cur}") )
		compopt -o filenames
		COMPREPLY+=( $(compgen -d -- "${cur}") )
		return
	fi
	
	if [[ "${cur}" == -* ]]; then
		local global_opts="--output --exclude --include --only --relevant --stdin --ext --include-hidden --no-gitignore --max-file-size --max-total-size --max-tokens --budget --max-content-tokens --token-model --security-check --recommend-budget --http --port --strict-limits --strict-toctou --annotate-tree --collect-todo --compress --outline --diff-hunks --encoding --output-split --no-contents --no-tree --format --dry-run --stdout --copy --overwrite --quiet --verbose --debug --no-ansi --follow-symlinks --no-sponsor-message --no-local-state --ignore-config --date --banner --banner-file --footer --footer-file --since --version --help -o -e -i -w -q -V -v -h"
		COMPREPLY=( $(compgen -W "${global_opts}" -- "${cur}") )
		return
	fi
	
	compopt -o filenames
	COMPREPLY=( $(compgen -d -- "${cur}") )
}

complete -F _fln fln
