<commit_before>#!/bin/sh
################################################################################
# bash completion for es - Erigones command-line tool
################################################################################
# Compatible with es >= 1.1
# Copyright (C) 2014 - 2016 Erigones, s. r. o.
#							<EMAIL>
################################################################################

__vm_hostname() {
	local resource=${COMP_WORDS[2]}
	local resource_array=(${resource//// })
	echo "${resource_array[1]}"
}

__vm_hostname_is_valid() {
	local hostname=$(__vm_hostname)
	case "${hostname}" in
		define|status|backup|snapshot)
			return 1
		;;
		*)
			return 0
		;;
	esac
}

_es() {
	local cur prev actions prefix action params
	local es_output="--json --csv --tabulate --tabulate-plain --tabulate-simple --tabulate-grid"
	local vm_define="-hostname -alias -template -ostype -vcpus -owner -node -tags -monitored -installed -snapshot_limit_manual -zpool -cpu_shares -zfs_io_priority -mdata -full -routes"
	local vm_snapshot="-disk_id -note -force"
	local vm_backup="-disk_id -note"

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	prefix=""
	actions="set get create logout login options delete"

    if [ ${COMP_CWORD} -eq 1 ]; then
		COMPREPLY=( $( compgen -W "${actions}" -- "${cur}" ) )<commit_msg>Added forgotten ram parameter in vm_define<commit_after>#!/bin/sh
################################################################################
# bash completion for es - Erigones command-line tool
################################################################################
# Compatible with es >= 1.1
# Copyright (C) 2014 - 2016 Erigones, s. r. o.
#							<EMAIL>
################################################################################

__vm_hostname() {
	local resource=${COMP_WORDS[2]}
	local resource_array=(${resource//// })
	echo "${resource_array[1]}"
}

__vm_hostname_is_valid() {
	local hostname=$(__vm_hostname)
	case "${hostname}" in
		define|status|backup|snapshot)
			return 1
		;;
		*)
			return 0
		;;
	esac
}

_es() {
	local cur prev actions prefix action params
	local es_output="--json --csv --tabulate --tabulate-plain --tabulate-simple --tabulate-grid"
	local vm_define="-hostname -alias -template -ostype -vcpus -ram -owner -node -tags -monitored -installed -snapshot_limit_manual -zpool -cpu_shares -zfs_io_priority -mdata -full -routes"
	local vm_snapshot="-disk_id -note -force"
	local vm_backup="-disk_id -note"

    COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	prefix=""
	actions="set get create logout login options delete"

    if [ ${COMP_CWORD} -eq 1 ]; then
		COMPREPLY=( $( compgen -W "${actions}" -- "${cur}" ) )
{'fraction_non_alphanumeric': 0.30310693641618497, 'fraction_numerical': 0.011560693641618497, 'mean_word_length': 4.891489361702128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6019801', 'n_tokens_mistral': 906, 'n_tokens_neox': 845, 'n_words': 208}