<commit_before>complete -e -c cargo

complete -c cargo -s h -l help
complete -c cargo -s V -l version
complete -c cargo -l list
complete -c cargo -s v -l verbose
complete -c cargo -s q -l quiet

set _cargo_commands (cargo --list | tail -n +2 | tr -d " ")

function _is
	if contains $argv (commandline -cop);
		return 0
	end
	return 1
end

# Help
complete -c cargo -n '_is help' -s h -l help

complete -f -c cargo -a '$_cargo_commands'

# Build
complete -c cargo -n '_is build' -s h -l help

complete -f -c cargo -n '_is build' -s p -l package \
	-d 'Package to build'

complete -f -c cargo -n '_is build' -s j -l jobs \
	-d 'The number of jobs to run in parallel'

complete -c cargo -n '_is build' -l lib \
	-d 'Build only this package\'s library'

complete -f -c cargo -n '_is build' -l bin \
	-d 'Build only the specified binary'

complete -f -c cargo -n '_is build' -l example \
	-d 'Build only the specified example'

complete -f -c cargo -n '_is build' -l test \
	-d 'Build only the specified test'

complete -f -c cargo -n '_is build' -l bench \
	-d 'Build only the specified benchmark'

complete -c cargo -n '_is build' -l release \
	-d 'Build artifacts in release mode, with optimizations'

complete -f -c cargo -n '_is build' -l features \
	-d 'Space-separated list of features to also build'

complete -c cargo -n '_is build' -l no-default-features \
	-d 'Do not build the `default` feature'

complete -f -c cargo -n '_is build' -l target \
	-d 'Build for the target triple'

complete -f -c cargo -n '_is build' -l manifest-path \
	-d 'Path to the manifest to compile'<commit_msg>Added cargo clean.<commit_after>complete -e -c cargo

complete -c cargo -s h -l help 
complete -c cargo -s V -l version -d 'Print version info and exit'
complete -c cargo -l list -d 'List installed commands'
complete -c cargo -s v -l verbose -d 'Use verbose output'
complete -c cargo -s q -l quiet -d 'No output printed to stdout'

set _cargo_commands (cargo --list | tail -n +2 | tr -d " ")

function _is
	if contains $argv (commandline -cop);
		return 0
	end
	return 1
end

function _c
	complete $argv
end

_c -f -c cargo -a '$_cargo_commands'

# Help
_c -f -c cargo -n '_is help' -s h -l help

# Build and Bench are the same.
set _cmds build bench
for x in $_cmds;
	_c -c cargo -n "_is $x" -s h -l help

	_c -f -c cargo -n "_is $x" -s p -l package \
		-d "Package to $x"

	_c -f -c cargo -n "_is $x" -s j -l jobs \
		-d 'The number of jobs to run in parallel'

	_c -c cargo -n "_is $x" -l lib \
		-d "only this package's library"

	_c -f -c cargo -n "_is $x" -l bin \
		-d "only the specified binary"

	_c -f -c cargo -n "_is $x" -l example \
		-d 'only the specified example'

	_c -f -c cargo -n "_is $x" -l test \
		-d 'only the specified test'

	_c -f -c cargo -n "_is $x" -l bench \
		-d 'only the specified benchmark'

	_c -c cargo -n "_is $x" -l release \
		-d 'artifacts in release mode, with optimizations'

	_c -f -c cargo -n "_is $x" -l features \
		-d 'Space-separated list of features to also build'

	_c -c cargo -n "_is $x" -l no-default-features \
		-d 'Do not build the `default` feature'

	_c -f -c cargo -n "_is $x" -l target \
		-d 'Build for the target triple'

	_c -f -c cargo -n "_is $x" -l manifest-path \
		-d 'Path to the manifest to compile'
end

# Clean
_c -f -c cargo -n '_is clean' -s p -l package \
	-d "Package to clean artifacts for"

_c -f -c cargo -n '_is clean' -l manifest-path \
	-d 'Path to the manifest to the package to clean'

_c -f -c cargo -n '_is clean' -l target \
	-d 'Target triple to clean output for (default all)'

{'fraction_non_alphanumeric': 0.12145066066910318, 'fraction_numerical': 0.0016868147315153219, 'mean_word_length': 2.4644595910418694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3538879', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1304, 'n_words': 640}