[bash,zsh] Remove redundant filtering-out of comment/blank lines

Comments are anyway removed in the subsequent call to `sub(/#.*/,
"")`, and it becomes a blank line.  Blank lines do not have fields, so
they are ignored in the next for-loop.
This commit is contained in:
Koichi Murase
2025-06-04 12:20:54 +09:00
committed by Junegunn Choi
parent adc9ad28da
commit 4a61f53b85
2 changed files with 0 additions and 8 deletions

View File

@@ -513,10 +513,6 @@ if ! declare -F __fzf_list_hosts > /dev/null; then
) \
<(
__fzf_exec_awk '
# Note: mawk <= 1.3.3-20090705 does not support the POSIX brackets of
# the form [[:blank:]], and Ubuntu 18.04 LTS still uses this
# 16-year-old mawk unfortunately. We need to use [ \t] instead.
/^[ \t]*(#|$)/ { next }
{
sub(/#.*/, "")
for (i = 2; i <= NF; i++)

View File

@@ -291,10 +291,6 @@ if ! declare -f __fzf_list_hosts > /dev/null; then
) \
<(
__fzf_exec_awk '
# Note: mawk <= 1.3.3-20090705 does not support the POSIX brackets of
# the form [[:blank:]], and Ubuntu 18.04 LTS still uses this
# 16-year-old mawk unfortunately. We need to use [ \t] instead.
/^[ \t]*(#|$)/ { next }
{
sub(/#.*/, "")
for (i = 2; i <= NF; i++)