Fix completions workflow
This commit is contained in:
		
							parent
							
								
									6c2eeb4c9b
								
							
						
					
					
						commit
						5cc3d5144d
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +1,9 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
pipe=${args[--pipe]:?}
 | 
			
		||||
completions=${args[--completions]:-}
 | 
			
		||||
target=${args[target]:?}
 | 
			
		||||
url=${args[url]:?}
 | 
			
		||||
completions=${args[completions]:-}
 | 
			
		||||
 | 
			
		||||
if [ "${action:-file}" = "exe" ]
 | 
			
		||||
then
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ then
 | 
			
		|||
	then
 | 
			
		||||
		chmod +x "$target"
 | 
			
		||||
 | 
			
		||||
		if [ -z "$completions" ]
 | 
			
		||||
		if [ -n "$completions" ]
 | 
			
		||||
		then
 | 
			
		||||
			echo "Installing completions for $exe"
 | 
			
		||||
			# shellcheck disable=SC2086
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
group=${args[group]:?}
 | 
			
		||||
clean=${args[--clean]:-}
 | 
			
		||||
 | 
			
		||||
_config_query() {
 | 
			
		||||
	tomlq -c --arg group "$group" \
 | 
			
		||||
| 
						 | 
				
			
			@ -17,16 +18,23 @@ _config_query ".[]" | while read -r entry; do
 | 
			
		|||
	target=$(echo "$entry" | jq -r '.target')
 | 
			
		||||
	hook=$(echo "$entry" | jq -r '.hook // ""')
 | 
			
		||||
	pipe=$(echo "$entry" | jq -r '.pipe // ""')
 | 
			
		||||
	completions=$(echo "$entry" | jq -r '.completions // ""')
 | 
			
		||||
 | 
			
		||||
	if [[ -n "$hook" ]]; then
 | 
			
		||||
		install_args+=("--hook=$hook")
 | 
			
		||||
	fi
 | 
			
		||||
	if [[ -n "$clean" ]]; then
 | 
			
		||||
		install_args+=("--clean")
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	install_args+=("$type")
 | 
			
		||||
 | 
			
		||||
	if [[ -n "$pipe" ]]; then
 | 
			
		||||
		install_args+=("--pipe=$pipe")
 | 
			
		||||
	fi
 | 
			
		||||
	if [[ -n "$completions" ]]; then
 | 
			
		||||
		install_args+=("--completions=$completions")
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	if [[ $source = \$* ]]
 | 
			
		||||
	then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue