Repository: fujiapple852/trippy
Pull request #991 (2024-02-07 10:02:20)

fix: incorrect default help text for tui_custom_columns cmd line flag


Patch:
diff --git a/src/config/cmd.rs b/src/config/cmd.rs
index 72e2ff4..c11decd 100644
--- a/src/config/cmd.rs
+++ b/src/config/cmd.rs
@@ -176,7 +176,7 @@ pub struct Args {
     #[arg(value_enum, long)]
     pub tui_as_mode: Option<AsMode>,
 
-    /// Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]
+    /// Custom columns to be displayed in the TUI hops table [default: holsravbwdt]
     #[arg(long)]
     pub tui_custom_columns: Option<String>,
 


Test patch:
diff --git a/test_resources/completions_elvish.txt b/test_resources/completions_elvish.txt
index 9210360..7fa7443 100644
--- a/test_resources/completions_elvish.txt
+++ b/test_resources/completions_elvish.txt
@@ -60,7 +60,7 @@ set edit:completion:arg-completer[trip] = {|@words|
             cand -a 'How to render addresses [default: host]'
             cand --tui-address-mode 'How to render addresses [default: host]'
             cand --tui-as-mode 'How to render AS information [default: asn]'
-            cand --tui-custom-columns 'Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]'
+            cand --tui-custom-columns 'Custom columns to be displayed in the TUI hops table [default: holsravbwdt]'
             cand --tui-icmp-extension-mode 'How to render ICMP extensions [default: off]'
             cand --tui-geoip-mode 'How to render GeoIp information [default: short]'
             cand -M 'The maximum number of addresses to show per hop [default: auto]'
diff --git a/test_resources/completions_fish.txt b/test_resources/completions_fish.txt
index 08e81fd..37b276a 100644
--- a/test_resources/completions_fish.txt
+++ b/test_resources/completions_fish.txt
@@ -22,7 +22,7 @@ complete -c trip -s r -l dns-resolve-method -d 'How to perform DNS queries [defa
 complete -c trip -l dns-timeout -d 'The maximum time to wait to perform DNS queries [default: 5s]' -r
 complete -c trip -s a -l tui-address-mode -d 'How to render addresses [default: host]' -r -f -a "{ip	'Show IP address only',host	'Show reverse-lookup DNS hostname only',both	'Show both IP address and reverse-lookup DNS hostname'}"
 complete -c trip -l tui-as-mode -d 'How to render AS information [default: asn]' -r -f -a "{asn	'Show the ASN',prefix	'Display the AS prefix',country-code	'Display the country code',registry	'Display the registry name',allocated	'Display the allocated date',name	'Display the AS name'}"
-complete -c trip -l tui-custom-columns -d 'Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]' -r
+complete -c trip -l tui-custom-columns -d 'Custom columns to be displayed in the TUI hops table [default: holsravbwdt]' -r
 complete -c trip -l tui-icmp-extension-mode -d 'How to render ICMP extensions [default: off]' -r -f -a "{off	'Do not show `icmp` extensions',mpls	'Show MPLS label(s) only',full	'Show full `icmp` extension data for all known extensions',all	'Show full `icmp` extension data for all classes'}"
 complete -c trip -l tui-geoip-mode -d 'How to render GeoIp information [default: short]' -r -f -a "{off	'Do not display GeoIp data',short	'Show short format',long	'Show long format',location	'Show latitude and Longitude format'}"
 complete -c trip -s M -l tui-max-addrs -d 'The maximum number of addresses to show per hop [default: auto]' -r
diff --git a/test_resources/completions_powershell.txt b/test_resources/completions_powershell.txt
index b52c63d..9916b06 100644
--- a/test_resources/completions_powershell.txt
+++ b/test_resources/completions_powershell.txt
@@ -63,7 +63,7 @@ Register-ArgumentCompleter -Native -CommandName 'trip' -ScriptBlock {
             [CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'How to render addresses [default: host]')
             [CompletionResult]::new('--tui-address-mode', 'tui-address-mode', [CompletionResultType]::ParameterName, 'How to render addresses [default: host]')
             [CompletionResult]::new('--tui-as-mode', 'tui-as-mode', [CompletionResultType]::ParameterName, 'How to render AS information [default: asn]')
-            [CompletionResult]::new('--tui-custom-columns', 'tui-custom-columns', [CompletionResultType]::ParameterName, 'Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]')
+            [CompletionResult]::new('--tui-custom-columns', 'tui-custom-columns', [CompletionResultType]::ParameterName, 'Custom columns to be displayed in the TUI hops table [default: holsravbwdt]')
             [CompletionResult]::new('--tui-icmp-extension-mode', 'tui-icmp-extension-mode', [CompletionResultType]::ParameterName, 'How to render ICMP extensions [default: off]')
             [CompletionResult]::new('--tui-geoip-mode', 'tui-geoip-mode', [CompletionResultType]::ParameterName, 'How to render GeoIp information [default: short]')
             [CompletionResult]::new('-M', 'M ', [CompletionResultType]::ParameterName, 'The maximum number of addresses to show per hop [default: auto]')
diff --git a/test_resources/completions_zsh.txt b/test_resources/completions_zsh.txt
index 9d11b47..2c0186a 100644
--- a/test_resources/completions_zsh.txt
+++ b/test_resources/completions_zsh.txt
@@ -102,7 +102,7 @@ country-code\:"Display the country code"
 registry\:"Display the registry name"
 allocated\:"Display the allocated date"
 name\:"Display the AS name"))' \
-'--tui-custom-columns=[Custom columns to be displayed in the TUI hops table \[default\: HOLSRAVBWDT\]]:TUI_CUSTOM_COLUMNS: ' \
+'--tui-custom-columns=[Custom columns to be displayed in the TUI hops table \[default\: holsravbwdt\]]:TUI_CUSTOM_COLUMNS: ' \
 '--tui-icmp-extension-mode=[How to render ICMP extensions \[default\: off\]]:TUI_ICMP_EXTENSION_MODE:((off\:"Do not show \`icmp\` extensions"
 mpls\:"Show MPLS label(s) only"
 full\:"Show full \`icmp\` extension data for all known extensions"
diff --git a/test_resources/usage_long.txt b/test_resources/usage_long.txt
index 2d9a9eb..1e12253 100644
--- a/test_resources/usage_long.txt
+++ b/test_resources/usage_long.txt
@@ -153,7 +153,7 @@ Options:
           - name:         Display the AS name
 
       --tui-custom-columns <TUI_CUSTOM_COLUMNS>
-          Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]
+          Custom columns to be displayed in the TUI hops table [default: holsravbwdt]
 
       --tui-icmp-extension-mode <TUI_ICMP_EXTENSION_MODE>
           How to render ICMP extensions [default: off]
diff --git a/test_resources/usage_short.txt b/test_resources/usage_short.txt
index 0da552d..5c4d678 100644
--- a/test_resources/usage_short.txt
+++ b/test_resources/usage_short.txt
@@ -45,7 +45,7 @@ Options:
   -a, --tui-address-mode <TUI_ADDRESS_MODE>                How to render addresses [default: host] [possible values: ip, host, both]
       --tui-as-mode <TUI_AS_MODE>                          How to render AS information [default: asn] [possible values: asn, prefix, country-code,
                                                            registry, allocated, name]
-      --tui-custom-columns <TUI_CUSTOM_COLUMNS>            Custom columns to be displayed in the TUI hops table [default: HOLSRAVBWDT]
+      --tui-custom-columns <TUI_CUSTOM_COLUMNS>            Custom columns to be displayed in the TUI hops table [default: holsravbwdt]
       --tui-icmp-extension-mode <TUI_ICMP_EXTENSION_MODE>  How to render ICMP extensions [default: off] [possible values: off, mpls, full, all]
       --tui-geoip-mode <TUI_GEOIP_MODE>                    How to render GeoIp information [default: short] [possible values: off, short, long, location]
   -M, --tui-max-addrs <TUI_MAX_ADDRS>                      The maximum number of addresses to show per hop [default: auto]