Repository: junegunn/fzf (language: go)

Issue:
"possible retry loop" again?
### Checklist

- [X] I have read through the manual page (`man fzf`)
- [X] I have searched through the existing issues
- [X] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

### Output of `fzf --version`

0.55.0 (v0.55.0)

### OS

- [X] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.

### Shell

- [X] bash
- [ ] zsh
- [ ] fish

### Problem / Steps to reproduce

Hello,

Since a few days (weeks?), I am hitting again the "possible retry loop" issue but only when using the `aws` command.

I have no idea if this is the result of a misconfiguration of fzf or if this is a reminiscence of what was fixed by @akinomyoga with the PR #3667 but the behavior seems really close to #3674.

<details>
<summary>Here is what happens when enabling shell traces (`set -x` - beware, this is quite long).</summary>

```console
❯ aws + __fzf_generic_path_completion _fzf_compgen_path -m '' aws '' aws
+ local cur base dir leftover matches trigger cmd
+ cmd=aws
+ [[ aws == \\* ]]
+ COMPREPLY=()
+ trigger='**'
+ [[ 1 -ge 0 ]]
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion aws aws '' aws
+ local cmd ret REPLY orig_cmd orig_complete
+ cmd=aws
+ shift
+ orig_cmd=aws
+ __fzf_orig_completion_get_orig_func aws
+ local cmd orig_var orig
+ cmd=aws
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ REPLY=
+ [[ -n '' ]]
+ [[ -n _comp_load ]]
++ complete -p aws
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion aws'
+ _comp_load aws '' aws
+ local flag_fallback_default= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n '' ]]
+ _old_size=0
+ eval 'paths=($2)'
++ paths=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=7
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ dirs+=("${paths[@]/%//bash-completion/completions}")
+ local 'IFS=
'
+ shift
+ local i prefix compspec
+ for prefix in "" _
+ for i in ${!dirs[*]}
+ dir=/home/del/.local/share/bash-completion/completions
+ [[ ! -d /home/del/.local/share/bash-completion/completions ]]
+ unset -v 'dirs[i]'
+ continue
+ for i in ${!dirs[*]}
+ dir=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions
+ [[ ! -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ for i in ${!dirs[*]}
+ dir=/home/del/.nix-profile/share/bash-completion/completions
+ [[ ! -d /home/del/.nix-profile/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws.bash
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ . /home/del/.nix-profile/share/bash-completion/completions/aws.bash /home/del/.nix-profile/bin/aws '' aws
++ complete -C /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer aws
++ complete -p -- /home/del/.nix-profile/bin/aws
+ compspec='complete -C '\''/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer'\'' /home/del/.nix-profile/bin/aws'
+ [[ -n '' ]]
+ [[ aws != */* ]]
+ complete -p -- aws
+ return 0
+ ret=0
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws != \c\o\m\p\l\e\t\e\ \-\o\ \b\a\s\h\d\e\f\a\u\l\t\ \-\o\ \d\e\f\a\u\l\t\ \-\F\ \_\f\z\f\_\p\a\t\h\_\c\o\m\p\l\e\t\i\o\n\ \a\w\s ]]
+ __fzf_orig_completion
+ local l comp f cmd
+ read -r l
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws =~ ^(.* -F) *([^ ]*).* ([^ ]*)$ ]]
+ read -r l
+ [[ complete -o bashdefault -o default -F _fzf_path_completion aws =~  -F (_fzf_[^ ]+)  ]]
+ __fzf_orig_completion_instantiate aws _fzf_path_completion
+ local cmd func orig_var orig
+ cmd=aws
+ func=_fzf_path_completion
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ orig=
+ [[ '' == *\ \%\s\ * ]]
+ return 1
+ [[ '' = *\ \a\w\s\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion aws'
++ complete -o bashdefault -o default -F _fzf_path_completion aws
+ [[ 0 -eq 0 ]]
+ return 124
+ __fzf_generic_path_completion _fzf_compgen_path -m '' aws '' aws
+ local cur base dir leftover matches trigger cmd
+ cmd=aws
+ [[ aws == \\* ]]
+ COMPREPLY=()
+ trigger='**'
+ [[ 1 -ge 0 ]]
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion aws aws '' aws
+ local cmd ret REPLY orig_cmd orig_complete
+ cmd=aws
+ shift
+ orig_cmd=aws
+ __fzf_orig_completion_get_orig_func aws
+ local cmd orig_var orig
+ cmd=aws
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ REPLY=
+ [[ -n '' ]]
+ [[ -n _comp_load ]]
++ complete -p aws
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion aws'
+ _comp_load aws '' aws
+ local flag_fallback_default= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n '' ]]
+ _old_size=0
+ eval 'paths=($2)'
++ paths=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=7
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ dirs+=("${paths[@]/%//bash-completion/completions}")
+ local 'IFS=
'
+ shift
+ local i prefix compspec
+ for prefix in "" _
+ for i in ${!dirs[*]}
+ dir=/home/del/.local/share/bash-completion/completions
+ [[ ! -d /home/del/.local/share/bash-completion/completions ]]
+ unset -v 'dirs[i]'
+ continue
+ for i in ${!dirs[*]}
+ dir=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions
+ [[ ! -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ for i in ${!dirs[*]}
+ dir=/home/del/.nix-profile/share/bash-completion/completions
+ [[ ! -d /home/del/.nix-profile/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws.bash
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ . /home/del/.nix-profile/share/bash-completion/completions/aws.bash /home/del/.nix-profile/bin/aws '' aws
++ complete -C /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer aws
++ complete -p -- /home/del/.nix-profile/bin/aws
+ compspec='complete -C '\''/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer'\'' /home/del/.nix-profile/bin/aws'
+ [[ -n '' ]]
+ [[ aws != */* ]]
+ complete -p -- aws
+ return 0
+ ret=0
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws != \c\o\m\p\l\e\t\e\ \-\o\ \b\a\s\h\d\e\f\a\u\l\t\ \-\o\ \d\e\f\a\u\l\t\ \-\F\ \_\f\z\f\_\p\a\t\h\_\c\o\m\p\l\e\t\i\o\n\ \a\w\s ]]
+ __fzf_orig_completion
+ local l comp f cmd
+ read -r l
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws =~ ^(.* -F) *([^ ]*).* ([^ ]*)$ ]]
+ read -r l
+ [[ complete -o bashdefault -o default -F _fzf_path_completion aws =~  -F (_fzf_[^ ]+)  ]]
+ __fzf_orig_completion_instantiate aws _fzf_path_completion
+ local cmd func orig_var orig
+ cmd=aws
+ func=_fzf_path_completion
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ orig=
+ [[ '' == *\ \%\s\ * ]]
+ return 1
+ [[ '' = *\ \a\w\s\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion aws'
++ complete -o bashdefault -o default -F _fzf_path_completion aws
+ [[ 0 -eq 0 ]]
+ return 124
+ __fzf_generic_path_completion _fzf_compgen_path -m '' aws '' aws
+ local cur base dir leftover matches trigger cmd
+ cmd=aws
+ [[ aws == \\* ]]
+ COMPREPLY=()
+ trigger='**'
+ [[ 1 -ge 0 ]]
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion aws aws '' aws
+ local cmd ret REPLY orig_cmd orig_complete
+ cmd=aws
+ shift
+ orig_cmd=aws
+ __fzf_orig_completion_get_orig_func aws
+ local cmd orig_var orig
+ cmd=aws
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ REPLY=
+ [[ -n '' ]]
+ [[ -n _comp_load ]]
++ complete -p aws
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion aws'
+ _comp_load aws '' aws
+ local flag_fallback_default= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'



<...... CUT BECAUSE TO LONG......>



+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n '' ]]
+ _old_size=0
+ eval 'paths=($2)'
++ paths=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=7
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ dirs+=("${paths[@]/%//bash-completion/completions}")
+ local 'IFS=
'
+ shift
+ local i prefix compspec
+ for prefix in "" _
+ for i in ${!dirs[*]}
+ dir=/home/del/.local/share/bash-completion/completions
+ [[ ! -d /home/del/.local/share/bash-completion/completions ]]
+ unset -v 'dirs[i]'
+ continue
+ for i in ${!dirs[*]}
+ dir=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions
+ [[ ! -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ for i in ${!dirs[*]}
+ dir=/home/del/.nix-profile/share/bash-completion/completions
+ [[ ! -d /home/del/.nix-profile/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws.bash
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ . /home/del/.nix-profile/share/bash-completion/completions/aws.bash /home/del/.nix-profile/bin/aws '' aws
++ complete -C /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer aws
++ complete -p -- /home/del/.nix-profile/bin/aws
+ compspec='complete -C '\''/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer'\'' /home/del/.nix-profile/bin/aws'
+ [[ -n '' ]]
+ [[ aws != */* ]]
+ complete -p -- aws
+ return 0
+ ret=0
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws != \c\o\m\p\l\e\t\e\ \-\o\ \b\a\s\h\d\e\f\a\u\l\t\ \-\o\ \d\e\f\a\u\l\t\ \-\F\ \_\f\z\f\_\p\a\t\h\_\c\o\m\p\l\e\t\i\o\n\ \a\w\s ]]
+ __fzf_orig_completion
+ local l comp f cmd
+ read -r l
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws =~ ^(.* -F) *([^ ]*).* ([^ ]*)$ ]]
+ read -r l
+ [[ complete -o bashdefault -o default -F _fzf_path_completion aws =~  -F (_fzf_[^ ]+)  ]]
+ __fzf_orig_completion_instantiate aws _fzf_path_completion
+ local cmd func orig_var orig
+ cmd=aws
+ func=_fzf_path_completion
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ orig=
+ [[ '' == *\ \%\s\ * ]]
+ return 1
+ [[ '' = *\ \a\w\s\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion aws'
++ complete -o bashdefault -o default -F _fzf_path_completion aws
+ [[ 0 -eq 0 ]]
+ return 124
+ __fzf_generic_path_completion _fzf_compgen_path -m '' aws '' aws
+ local cur base dir leftover matches trigger cmd
+ cmd=aws
+ [[ aws == \\* ]]
+ COMPREPLY=()
+ trigger='**'
+ [[ 1 -ge 0 ]]
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion aws aws '' aws
+ local cmd ret REPLY orig_cmd orig_complete
+ cmd=aws
+ shift
+ orig_cmd=aws
+ __fzf_orig_completion_get_orig_func aws
+ local cmd orig_var orig
+ cmd=aws
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ REPLY=
+ [[ -n '' ]]
+ [[ -n _comp_load ]]
++ complete -p aws
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion aws'
+ _comp_load aws '' aws
+ local flag_fallback_default= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n '' ]]
+ _old_size=0
+ eval 'paths=($2)'
++ paths=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=7
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ dirs+=("${paths[@]/%//bash-completion/completions}")
+ local 'IFS=
'
+ shift
+ local i prefix compspec
+ for prefix in "" _
+ for i in ${!dirs[*]}
+ dir=/home/del/.local/share/bash-completion/completions
+ [[ ! -d /home/del/.local/share/bash-completion/completions ]]
+ unset -v 'dirs[i]'
+ continue
+ for i in ${!dirs[*]}
+ dir=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions
+ [[ ! -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ for i in ${!dirs[*]}
+ dir=/home/del/.nix-profile/share/bash-completion/completions
+ [[ ! -d /home/del/.nix-profile/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws.bash
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ . /home/del/.nix-profile/share/bash-completion/completions/aws.bash /home/del/.nix-profile/bin/aws '' aws
++ complete -C /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer aws
++ complete -p -- /home/del/.nix-profile/bin/aws
+ compspec='complete -C '\''/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer'\'' /home/del/.nix-profile/bin/aws'
+ [[ -n '' ]]
+ [[ aws != */* ]]
+ complete -p -- aws
+ return 0
+ ret=0
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws != \c\o\m\p\l\e\t\e\ \-\o\ \b\a\s\h\d\e\f\a\u\l\t\ \-\o\ \d\e\f\a\u\l\t\ \-\F\ \_\f\z\f\_\p\a\t\h\_\c\o\m\p\l\e\t\i\o\n\ \a\w\s ]]
+ __fzf_orig_completion
+ local l comp f cmd
+ read -r l
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws =~ ^(.* -F) *([^ ]*).* ([^ ]*)$ ]]
+ read -r l
+ [[ complete -o bashdefault -o default -F _fzf_path_completion aws =~  -F (_fzf_[^ ]+)  ]]
+ __fzf_orig_completion_instantiate aws _fzf_path_completion
+ local cmd func orig_var orig
+ cmd=aws
+ func=_fzf_path_completion
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ orig=
+ [[ '' == *\ \%\s\ * ]]
+ return 1
+ [[ '' = *\ \a\w\s\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion aws'
++ complete -o bashdefault -o default -F _fzf_path_completion aws
+ [[ 0 -eq 0 ]]
+ return 124
+ __fzf_generic_path_completion _fzf_compgen_path -m '' aws '' aws
+ local cur base dir leftover matches trigger cmd
+ cmd=aws
+ [[ aws == \\* ]]
+ COMPREPLY=()
+ trigger='**'
+ [[ 1 -ge 0 ]]
+ cur=
+ [[ '' == *\*\* ]]
+ shift
+ shift
+ shift
+ _fzf_handle_dynamic_completion aws aws '' aws
+ local cmd ret REPLY orig_cmd orig_complete
+ cmd=aws
+ shift
+ orig_cmd=aws
+ __fzf_orig_completion_get_orig_func aws
+ local cmd orig_var orig
+ cmd=aws
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ REPLY=
+ [[ -n '' ]]
+ [[ -n _comp_load ]]
++ complete -p aws
+ orig_complete='complete -o bashdefault -o default -F _fzf_path_completion aws'
+ _comp_load aws '' aws
+ local flag_fallback_default= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 opt
+ getopts :D opt aws '' aws
+ shift 0
+ local cmd=aws cmdname=aws dir compfile
+ local -a paths
+ [[ -n aws ]]
+ local backslash=
+ [[ aws == \\* ]]
+ local REPLY pathcmd origcmd=aws
++ type -P -- aws
+ pathcmd=/home/del/.nix-profile/bin/aws
+ _comp_abspath /home/del/.nix-profile/bin/aws
+ REPLY=/home/del/.nix-profile/bin/aws
+ case $REPLY in
+ [[ /home/del/.nix-profile/bin/aws == */./* ]]
+ REPLY=/home/del/.nix-profile/bin/aws
+ cmd=/home/del/.nix-profile/bin/aws
+ dirs=()
+ local -a dirs
+ [[ -n '' ]]
+ dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions")
+ [[ /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ paths=()
+ [[ /home/del/.nix-profile/bin/aws == /* ]]
+ paths+=("${cmd%/*}")
+ _comp_realcommand /home/del/.nix-profile/bin/aws
+ REPLY=
+ local file
++ type -P -- /home/del/.nix-profile/bin/aws
+ file=/home/del/.nix-profile/bin/aws
+ type -p realpath
++ realpath /home/del/.nix-profile/bin/aws
+ REPLY=/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws
+ paths+=("${REPLY%/*}")
+ _comp_split -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ _append=set
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -aF : paths /run/wrappers/bin:/home/del/.nix-profile/bin:/nix/profile/bin:/home/del/.local/state/nix/profile/bin:/etc/profiles/per-user/del/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/del/.local/bin
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n set ]]
+ eval 'paths+=()'
++ paths+=()
+ eval '_old_size=${#paths[@]}'
++ _old_size=2
+ eval 'paths+=($2)'
++ paths+=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=10
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/wrappers/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.nix-profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/state/nix/profile/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /etc/profiles/per-user/del/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /nix/var/nix/profiles/default/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /run/current-system/sw/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ for dir in "${paths[@]%/}"
+ [[ /home/del/.local/bin == ?*/@(bin|sbin) ]]
+ dirs+=("${dir%/*}/share/bash-completion/completions")
+ _comp_split -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ local _append= 'IFS=
'
+ local OPTIND=1 OPTARG= OPTERR=0 _opt
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ case $_opt in
+ IFS=:
+ getopts :alF: _opt -F : paths /nix/store/7xmkd3baw6k5m44yd0qg83383ckb7wq7-desktops/share:/home/del/.nix-profile/share:/nix/profile/share:/home/del/.local/state/nix/profile/share:/etc/profiles/per-user/del/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share
+ shift 2
+ (( 2 != 2 ))
+ [[ paths == @(*[^_a-zA-Z0-9]*|[0-9]*||_*|IFS|OPTIND|OPTARG|OPTERR) ]]
+ local _original_opts=braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace
+ set -o noglob
+ local _old_size _new_size
+ [[ -n '' ]]
+ _old_size=0
+ eval 'paths=($2)'
++ paths=($2)
+ eval '_new_size=${#paths[@]}'
++ _new_size=7
+ [[ :braceexpand:histexpand:history:interactive-comments:monitor:vi:xtrace: == *:noglob:* ]]
+ set +o noglob
+ (( _new_size > _old_size ))
+ dirs+=("${paths[@]/%//bash-completion/completions}")
+ local 'IFS=
'
+ shift
+ local i prefix compspec
+ for prefix in "" _
+ for i in ${!dirs[*]}
+ dir=/home/del/.local/share/bash-completion/completions
+ [[ ! -d /home/del/.local/share/bash-completion/completions ]]
+ unset -v 'dirs[i]'
+ continue
+ for i in ${!dirs[*]}
+ dir=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions
+ [[ ! -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash
+ [[ -d /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ [[ -e /nix/store/djpa2z5b7ag8z89zql3bib4mbr6gprwf-bash-completion-2.14.0/share/bash-completion/completions/aws.bash ]]
+ for i in ${!dirs[*]}
+ dir=/home/del/.nix-profile/share/bash-completion/completions
+ [[ ! -d /home/del/.nix-profile/share/bash-completion/completions ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws ]]
+ for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"
+ compfile=/home/del/.nix-profile/share/bash-completion/completions/aws.bash
+ [[ -d /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ [[ -e /home/del/.nix-profile/share/bash-completion/completions/aws.bash ]]
+ . /home/del/.nix-profile/share/bash-completion/completions/aws.bash /home/del/.nix-profile/bin/aws '' aws
++ complete -C /nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer aws
++ complete -p -- /home/del/.nix-profile/bin/aws
+ compspec='complete -C '\''/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer'\'' /home/del/.nix-profile/bin/aws'
+ [[ -n '' ]]
+ [[ aws != */* ]]
+ complete -p -- aws
+ return 0
+ ret=0
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws != \c\o\m\p\l\e\t\e\ \-\o\ \b\a\s\h\d\e\f\a\u\l\t\ \-\o\ \d\e\f\a\u\l\t\ \-\F\ \_\f\z\f\_\p\a\t\h\_\c\o\m\p\l\e\t\i\o\n\ \a\w\s ]]
+ __fzf_orig_completion
+ local l comp f cmd
+ read -r l
++ complete -p aws
+ [[ complete -C '/nix/store/wfpm0k836p09zdqbfy5wk013gvjb2di5-awscli2-2.17.42/bin/aws_completer' aws =~ ^(.* -F) *([^ ]*).* ([^ ]*)$ ]]
+ read -r l
+ [[ complete -o bashdefault -o default -F _fzf_path_completion aws =~  -F (_fzf_[^ ]+)  ]]
+ __fzf_orig_completion_instantiate aws _fzf_path_completion
+ local cmd func orig_var orig
+ cmd=aws
+ func=_fzf_path_completion
+ orig_var=_fzf_orig_completion_aws
+ orig=
+ orig=
+ [[ '' == *\ \%\s\ * ]]
+ return 1
+ [[ '' = *\ \a\w\s\ * ]]
+ eval 'complete -o bashdefault -o default -F _fzf_path_completion aws'
++ complete -o bashdefault -o default -F _fzf_path_completion aws
+ [[ 0 -eq 0 ]]
+ return 124
-bash: warning: programmable_completion: aws: possible retry loop
```
</details>

The distribution used is NixOS hence the multiple references to `/nix/store`, I have also no idea if the issue might come from the multiple symlinks that Nix sets up.
So reproducing the issue might not be an easy task.

Any advice to diagnose the issue is welcome :slightly_smiling_face:.


Discussion / hints:
### Minimal reproducer

The error message happens when the completion loader of bash-completion loads a completion setting that doesn't use `complete -F func`. For example, with the following `~/.bashrc`, the error message is shown by `test1 [TAB]`.

```bash
# bashrc

BASH_COMPLETION_USER_DIR=$PWD/test1
mkdir -p "$BASH_COMPLETION_USER_DIR"/completions
echo 'complete -W hello test1' > "$BASH_COMPLETION_USER_DIR/completions/test1"

source /path/to/bash_completion
eval "$(fzf --bash)"
_fzf_setup_completion path test1
```

### Problem

This is related to the implementation of `_fzf_handle_dynamic_completion`. When the original completion function specified in the form `complete -F <name>` is known, `_fzf_handle_dynamic_completion` calls the original completion function (line 259). When the original completion function hasn't yet been extracted, `_fzf_handle_dynamic_completion` calls the completion loader of `bash-completion` (line 262) and tries to extract the original completion function from the new setting (line 266). Then `_fzf_handle_dynamic_completion` requests restarting the completion by returning 124, and the function `_fzf_handle_dynamic_completion` will be called again. In the second call, `_fzf_handle_dynamic_completion` is supposed to run the extracted original completion function. The problem is that `_fzf_handle_dynamic_completion` returns 124 even when the original completion function is not extracted. Then, it falls into an infinite loop.

https://github.com/junegunn/fzf/blob/855f90727af7827d9934b7fa00ea5ed51f5e4e81/shell/completion.bash#L258-L281

### Fix

A possible fix would be to return 124 only when the original completion function has been successfully extracted. However, this would ignore the completion settings that do not use `complete -F <name>`. To properly handle the completion settings that do not use `complete -F <name>` (including the one for `aws`), the `fzf` completion needs to support it explicitly.

```diff
diff --git a/shell/completion.bash b/shell/completion.bash
index abeb2e9..5eebdef 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -264,6 +264,7 @@ _fzf_handle_dynamic_completion() {
     # _completion_loader may not have updated completion for the command
     if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
       __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
+      __fzf_orig_completion_get_orig_func "$cmd" || ret=1

       # Update orig_complete by _fzf_orig_completion entry
       [[ $orig_complete =~ ' -F '(_fzf_[^ ]+)' ' ]] &&
```
Hello @akinomyoga, thanks a lot for the issue analysis!

This seems to also point the fact that something changed on my side regarding the way the `aws` command is completed. I need to check the latest system updates in order to find which one caused this behavior modification.

As for the way `fzf` hooks into the existing completion, I am not so familiar with bash completion. From what you describe, I understand there are different ways of configuring it, one using `complete -F` supported by fzf and another one using `complete -W` as in your minimal reproducer. Looking at the bash manual page, the `complete` command seems quite complex and I have some difficulties wrapping my head around it.

When you say that `fzf` has to support this use case explicitly, does this mean that in order for this to work, some additional configuration of `fzf` should be added in order for `fzf` to know what to do when trying to provide additional hints for the `aws` command?

Another thing I am wondering about, is it possible to just tell `fzf` to ignore the `aws` command completion for now and just let the original completion finish its job?
> When you say that `fzf` has to support this use case explicitly, does this mean that in order for this to work, some additional configuration of `fzf` should be added in order for `fzf` to know what to do when trying to provide additional hints for the `aws` command?

Basically, multiple completion settings cannot be registered for a single command in Bash. When the `fzf` completion is set up for a command, `fzf` replaces the existing completion setting technically. However, the `fzf` completion tries to *mimic* the behavior of the original completion setting when it doesn't perform the `fzf`-specific completion. The current implementation only considers `-F <function_name>` in mimicking the original completion setting.

More specifically, the original completion setting is parsed in the following loop:

https://github.com/junegunn/fzf/blob/855f90727af7827d9934b7fa00ea5ed51f5e4e81/shell/completion.bash#L59-L69

where you can observe that only the pattern `^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$` is extracted. This means all the other types of completion settings such as `-W "wordlist"` and `-C "completer-command"` will be ignored in mimicking. The `aws` completion setting uses `-C <command_name>`, so even if the above-mentioned infinite-loop issue would be resolved, the existing completion setting for `aws` will not be correctly mimicked by the fzf completion.

> is it possible to just tell `fzf` to ignore the `aws` command completion for now and just let the original completion finish its job?

I think the fzf completion works that way by default; i.e., the fzf completion doesn't affect the completion for `aws` unless the user requests it. Since the fzf completion seems to be triggered for the command `aws` in your setup, I suspect you have `_fzf_setup_completion path aws` or `FZF_COMPLETION_PATH_COMMANDS="... aws ..."` somewhere in your settings. You can just remove it.

What is the result of the following command in your environment?

```bash
$ echo "$FZF_COMPLETION_PATH_COMMANDS"
```

The `FZF_COMPLETION_PATH_COMMANDS` variable doesn't seem to be defined in my environment:

```console
❯ echo "$FZF_COMPLETION_PATH_COMMANDS"


❯ env | grep FZF_COMPLETION_PATH_COMMANDS

❯
```

How can I check the part that would be related to `_fzf_setup_completion path aws`?
Maybe you can temporarily overwrite the function `_fzf_setup_completion`.

```bash
eval "$(fzf --bash)"
function _fzf_setup_completion { echo "${BASH_SOURCE[1]}:$BASH_LINENO: $FUNCNAME $*" >> ~/debug.log; }
```

Then you can start a Bash session and immediately exit from it. After that, you can examine the contents of `~/debug.log`.

**Edit**: Of course, one needs to overwrite the function `_fzf_setup_completion` *before it is actually used* to set up the completion for `aws`. It depends on how you load the fzf completion setting, but it should preferably be overwritten immediately after the fzf completion setting is loaded.

I'm sorry. I noticed that it is actually set up by the fzf completion in the following part:

https://github.com/junegunn/fzf/blob/855f90727af7827d9934b7fa00ea5ed51f5e4e81/shell/completion.bash#L499-L505

In my environment, another completion setting seems to overwrite the default completion setting (`-D`), so the fzf completion was not activated for `aws`.

Oh that perhaps explains why I didn't get any `debug.log` file.

Sorry, I am bit lost, does this mean that I cannot modify the `_fzf_setup_completion` before it is actually used to setup the `fzf` completion?
Or do I need to add this in my `.bashrc` before the part that is evaluating the result of `fzf --bash`?
Now that we identified the place where the completion setting for `aws` is set up by the fzf completion, we wouldn't need to further investigate it. I'm sorry. Nevertheless, in case you are interested in the behavior you observe in testing, I leave the explanation below:

> Oh that perhaps explains why I didn't get any `debug.log` file.

The reason that you didn't get `debug.log` file would be that `_fzf_setup_completion` is dynamically called when you first attempt a completion for `aws` in the session. If you are curious, you can check if the file `debug.log` is created after attempting a completion for `aws`.

> Sorry, I am bit lost, does this mean that I cannot modify the `_fzf_setup_completion` before it is actually used to setup the `fzf` completion?

The part I mentioned in https://github.com/junegunn/fzf/issues/4003#issuecomment-2367516691 is actually a hook, so the function `_fzf_setup_completion` wouldn't be immediately called. The function will still be called after you overwrite the function.

The "fix" that I provided in https://github.com/junegunn/fzf/issues/4003#issuecomment-2367205737 seems to also suppress the unwanted overwriting of the existing completion setting for `aws`. With this fix, a problem wouldn't happen unless the user explicitly calls `_fzf_setup_completion` or sets `FZF_COMPLETION_PATH_COMMANDS`, so I think the fix in https://github.com/junegunn/fzf/issues/4003#issuecomment-2367205737 should be a proper fix for now.


Fix patch:
diff --git a/shell/completion.bash b/shell/completion.bash
index abeb2e9a08b..5eebdef54d5 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -264,6 +264,7 @@ _fzf_handle_dynamic_completion() {
     # _completion_loader may not have updated completion for the command
     if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
       __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
+      __fzf_orig_completion_get_orig_func "$cmd" || ret=1
 
       # Update orig_complete by _fzf_orig_completion entry
       [[ $orig_complete =~ ' -F '(_fzf_[^ ]+)' ' ]] &&


Test patch: