--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -21,2 +21,8 @@ - r_overlays="$(layman -LkNq 2>/dev/null | grep -v '^$' | cut -d' ' -f3)" - l_overlays="$(layman -lkNq 2>/dev/null | grep -v '^$' | cut -d' ' -f3)" --- + r_overlays() { + local remotes="$(layman -LkNq 2>/dev/null | grep -v '^$' | cut -d' ' -f3)" + echo "$remotes" + } + l_overlays() { + local locals="$(layman -lkNq 2>/dev/null | grep -v '^$' | cut -d' ' -f3)" + echo "$locals" + } @@ -34,1 +40,1 @@ - COMPREPLY=( $(compgen -W "${r_overlays}" -- "${cur}") ) --- + COMPREPLY=( $(compgen -W "$(r_overlays)" -- "${cur}") ) @@ -38,1 +44,1 @@ - COMPREPLY=( $(compgen -W "${l_overlays}" -- "${cur}") ) --- + COMPREPLY=( $(compgen -W "$(l_overlays)" -- "${cur}") ) @@ -42,1 +48,1 @@ - COMPREPLY=( $(compgen -W "${l_overlays} ALL" -- "${cur}") ) --- + COMPREPLY=( $(compgen -W "$(l_overlays) ALL" -- "${cur}") )