Run shfmt
This commit is contained in:
		@@ -6,13 +6,13 @@ DEFAULT_FD_OPTS=('--hidden' '--type' 'symlink' '--threads' "$(nproc)")
 | 
				
			|||||||
# $1: directory
 | 
					# $1: directory
 | 
				
			||||||
# $2-n: extra arguments
 | 
					# $2-n: extra arguments
 | 
				
			||||||
find_files() {
 | 
					find_files() {
 | 
				
			||||||
	if [[ -d "$1" ]]; then
 | 
					    if [[ -d "$1" ]]; then
 | 
				
			||||||
		local directory="$1"
 | 
					        local directory="$1"
 | 
				
			||||||
		shift
 | 
					        shift
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type f "$@" -- . "$directory"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type f "$@" -- . "$directory"
 | 
				
			||||||
	else
 | 
					    else
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type f "$@"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type f "$@"
 | 
				
			||||||
	fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Search and return a string with filenames delimited by \n
 | 
					# Search and return a string with filenames delimited by \n
 | 
				
			||||||
@@ -20,13 +20,13 @@ find_files() {
 | 
				
			|||||||
# $1: directory
 | 
					# $1: directory
 | 
				
			||||||
# $2-n: extra arguments
 | 
					# $2-n: extra arguments
 | 
				
			||||||
find_directories() {
 | 
					find_directories() {
 | 
				
			||||||
	if [[ -d "$1" ]]; then
 | 
					    if [[ -d "$1" ]]; then
 | 
				
			||||||
		local directory="$1"
 | 
					        local directory="$1"
 | 
				
			||||||
		shift
 | 
					        shift
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type d "$@" -- . "$directory"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type d "$@" -- . "$directory"
 | 
				
			||||||
	else
 | 
					    else
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type d "$@"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type d "$@"
 | 
				
			||||||
	fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Search all files and directories, determine what type of files to search
 | 
					# Search all files and directories, determine what type of files to search
 | 
				
			||||||
@@ -37,11 +37,11 @@ find_directories() {
 | 
				
			|||||||
find_specific() {
 | 
					find_specific() {
 | 
				
			||||||
    local type_opt="$1"
 | 
					    local type_opt="$1"
 | 
				
			||||||
    shift
 | 
					    shift
 | 
				
			||||||
	if [[ -d "$1" ]]; then
 | 
					    if [[ -d "$1" ]]; then
 | 
				
			||||||
		local directory="$1"
 | 
					        local directory="$1"
 | 
				
			||||||
		shift
 | 
					        shift
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type "$type_opt" "$@" -- . "$directory"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type "$type_opt" "$@" -- . "$directory"
 | 
				
			||||||
	else
 | 
					    else
 | 
				
			||||||
		fd "${DEFAULT_FD_OPTS[@]}" --type "$type_opt" "$@"
 | 
					        fd "${DEFAULT_FD_OPTS[@]}" --type "$type_opt" "$@"
 | 
				
			||||||
	fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user