summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2025-06-04 12:20:54 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-06-09 21:46:53 +0900
commit4a61f53b85d4a6640b656f8442c40fb9cfb8df2d (patch)
tree339580c0e1c338f4dc1ae5ea32ceede1f8782401
parentadc9ad28da1fc5b6e7a4b5916442ccf9aa166817 (diff)
downloadfzf-4a61f53b85d4a6640b656f8442c40fb9cfb8df2d.tar.gz
[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.
-rw-r--r--shell/completion.bash4
-rw-r--r--shell/completion.zsh4
2 files changed, 0 insertions, 8 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index c489c5a0..48a34c9b 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -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++)
diff --git a/shell/completion.zsh b/shell/completion.zsh
index e0227007..950fa674 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -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++)