about summary refs log tree commit diff
path: root/Completion/Builtins/_fc
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_fc')
-rw-r--r--Completion/Builtins/_fc8
1 files changed, 5 insertions, 3 deletions
diff --git a/Completion/Builtins/_fc b/Completion/Builtins/_fc
index f0d2c03fd..f8cf4dde8 100644
--- a/Completion/Builtins/_fc
+++ b/Completion/Builtins/_fc
@@ -1,7 +1,9 @@
 #defcomp fc
 
-if [[ -mcurrent -1 -*e ]]; then
-  complist -c
-elif [[ -mcurrent -1 -[ARWI]## ]]; then
+local prev="$words[CURRENT-1]"
+
+if [[ "$prev" = -*e ]]; then
+  compgen -c
+elif [[ "$prev" = -[ARWI]## ]]; then
   _files
 fi