summaryrefslogtreecommitdiff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_expand12
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 987a597c7..8bf6d11f4 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -108,9 +108,17 @@ if [[ -z "$compstate[insert]" ]] ;then
else
_tags all-expansions expansions original
- _requested all-expansions expl 'all expansions' &&
- compadd "$expl[@]" -UQ -qS "$suf" - "$exp"
+ if _requested all-expansions expl 'all expansions'; then
+ local disp dstr
+ if [[ $#exp -ge COLUMNS ]]; then
+ disp=( -ld dstr )
+ dstr=( "${(r:COLUMNS-5:)exp} ..." )
+ else
+ disp=()
+ fi
+ compadd "$disp[@]" "$expl[@]" -UQ -qS "$suf" - "$exp"
+ fi
if [[ $#exp -gt 1 ]] && _requested expansions; then
local i normal dir