From aa6017008a58092d2cae894d2dc07d7f1d804ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 17 May 2022 23:38:49 +0300 Subject: [PATCH] style(bash-v2): remove unnecessary trailing linefeed removal No longer needed as of f464d6c82e9af74b7a46301a775163984af32cd1, saves a subshell. --- bash_completionsV2.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bash_completionsV2.go b/bash_completionsV2.go index 87a90667..429aaf71 100644 --- a/bash_completionsV2.go +++ b/bash_completionsV2.go @@ -132,9 +132,8 @@ __%[1]s_process_completion_results() { elif (((directive & shellCompDirectiveFilterDirs) != 0)); then # File completion for directories only - # Use printf to strip any trailing newline local subdir - subdir=$(printf "%%s" "${completions[0]}") + subdir=${completions[0]} if [[ -n $subdir ]]; then __%[1]s_debug "Listing directories in $subdir" pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return