File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ import qualified Options.Applicative as Opt
20
20
import Cardano.CLI.OS.Posix
21
21
#endif
22
22
23
+ import System.Console.Terminal.Size (Window (.. ), size )
24
+
23
25
main :: IO ()
24
26
main = toplevelExceptionHandler $ do
25
27
Crypto. cryptoInit
@@ -30,6 +32,12 @@ main = toplevelExceptionHandler $ do
30
32
#ifdef UNIX
31
33
_ <- setFileCreationMask (otherModes `unionFileModes` groupModes)
32
34
#endif
33
- co <- Opt. customExecParser pref (opts envCli)
35
+
36
+ mWin <- size
37
+
38
+ let termWidth = maybe 80 width mWin
39
+ dynamicPrefs = pref { Opt. prefColumns = termWidth }
40
+
41
+ co <- Opt. customExecParser dynamicPrefs (opts envCli)
34
42
35
43
orDie (docToText . renderClientCommandError) $ runClientCommand co
Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ executable cardano-cli
305
305
cardano-cli,
306
306
cardano-crypto-class ^>= 2.2 ,
307
307
optparse-applicative-fork,
308
+ terminal-size,
308
309
transformers-except,
309
310
310
311
library cardano-cli-test-lib
You can’t perform that action at this time.
0 commit comments