From 059811d096f0051d911f884d47ebc6147630990a Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 31 Aug 2021 12:51:40 +0200
Subject: [PATCH] su: (bash-completion) offer usernames rather than files

Fixes: https://github.com/karelzak/util-linux/issues/1424
Signed-off-by: Karel Zak <kzak@redhat.com>
---
 bash-completion/su | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bash-completion/su b/bash-completion/su
index 309505085d..913e445230 100644
--- a/bash-completion/su
+++ b/bash-completion/su
@@ -41,7 +41,7 @@ _su_module()
 	esac
 	local IFS=$'\n'
 	compopt -o filenames
-	COMPREPLY=( $(compgen -f -- $cur) )
+	COMPREPLY=( $(compgen -u -- $cur) )
 	return 0
 }
 complete -F _su_module su
