zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Increase $COLUMNS when generating long option completions
@ 2021-08-01 19:24 Marlon Richert
  2021-08-01 23:06 ` Bart Schaefer
  0 siblings, 1 reply; 15+ messages in thread
From: Marlon Richert @ 2021-08-01 19:24 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

Otherwise, option descriptions can appear cropped on wide screens.

[-- Attachment #2: 0001-Increase-COLUMNS-when-generating-long-option-complet.txt --]
[-- Type: text/plain, Size: 1047 bytes --]

From 2075b9f42cb9f0ad3cd1ac330302208048d65a25 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlonrichert@users.noreply.github.com>
Date: Sun, 1 Aug 2021 22:22:14 +0300
Subject: [PATCH] Increase $COLUMNS when generating long option completions

Otherwise, option descriptions can appear cropped on wide screens.
---
 Completion/Base/Utility/_arguments | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 3f1b39304..5db3926fb 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -95,7 +95,9 @@ if (( long )); then
     # option up to the end.
 
    tmp=()
-   _call_program $lflag options ${~words[1]} --help 2>&1 |
+
+   # Increase $COLUMNS, so --help output won't get cropped.
+   _call_program $lflag options COLUMNS=999 ${~words[1]} --help 2>&1 |
      while IFS= read -r opt; do
      if (( ${#tmp} )); then
        # Previous line had no comment.  Is the current one suitable?
-- 
2.30.1 (Apple Git-130)


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-10 19:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 19:24 [PATCH] Increase $COLUMNS when generating long option completions Marlon Richert
2021-08-01 23:06 ` Bart Schaefer
2021-08-03 14:05   ` Marlon Richert
2021-08-04  1:12     ` Lawrence Velázquez
2021-08-04  3:48       ` Bart Schaefer
2021-08-04  6:51       ` Marlon Richert
2021-08-04  7:19         ` Lawrence Velázquez
2021-08-05  6:19           ` Marlon Richert
2021-08-05  6:24             ` Bart Schaefer
2021-08-05 18:11               ` Marlon Richert
2021-08-05 23:44                 ` Bart Schaefer
2021-08-07 19:55                   ` Marlon Richert
2021-08-07 22:41                     ` Bart Schaefer
2021-08-10 19:04                       ` Marlon Richert
2021-08-10 19:17                         ` Marlon Richert

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).