Page MenuHomeVyOS Platform

vbash: beautify tab completion output/line breaks
Closed, ResolvedPublicFEATURE REQUEST

Description

This is a followup on a comment from me in T1604.

Right now tab completion is "ugly" on long named node names. e.g.

vyos@vyos# set interfaces wireless wlan0
Possible completions:
+  address      Address for this interface
 > bridge-group Interface bridge group
 > capabilities HT and VHT capabilities for your card
   channel      Wireless radio channel
   debug        Enable hostapd logging to syslog
   description  Description for this interface
 > dhcpv6-options
                DHCPv6 options
   disable-broadcast-ssid
                Disable broadcast of SSID from access-point
   disable-link-detect
                Ignore link state changes on this interface
   expunge-failing-stations
                Disassociate stations based on excessive transmission failures.
 > firewall     Firewall options
   hw-id        Media Access Control (MAC) address
 > ip           IPv4 routing parameters
 > ipv6         IPv6 routing parameters
   isolate-stations
                Isolate stations on the AP so they cannot see each other
   mac          Media Access Control (MAC) address
   max-stations Maximum number of wireless radio stations
   mgmt-frame-protection
                Management Frame Protection (MFP) according to IEEE 802.11w
   mode         Wireless radio mode
   physical-device
                Wireless physical device
 > policy       Policy route options
   redirect     Incoming packet redirection destination
   reduce-transmit-power
                Transmission power reduction in dBm
 > security     Wireless security settings
   ssid         Wireless access-point service set identifier (SSID)
 > traffic-policy
                Traffic-policy for interface
   type         Wireless device type for this interface [REQUIRED]
+> vif          Virtual Local Area Network (VLAN) ID

I'd expect a more eye-candied output like:

vyos@vyos# set interfaces wireless wlan0
Possible completions:
+  address                  Address for this interface
 > bridge-group             Interface bridge group
 > capabilities             HT and VHT capabilities for your card
   channel                  Wireless radio channel
   debug                    Enable hostapd logging to syslog
   description              Description for this interface
 > dhcpv6-options           DHCPv6 options
   disable-broadcast-ssid   Disable broadcast of SSID from access-point
   disable-link-detect      Ignore link state changes on this interface
   expunge-failing-stations Disassociate stations based on excessive 
                            transmission failures.
 > firewall                 Firewall options
   hw-id                    Media Access Control (MAC) address
 > ip                       IPv4 routing parameters
 > ipv6                     IPv6 routing parameters
   isolate-stations         Isolate stations on the AP so they cannot see each
                            other
   mac                      Media Access Control (MAC) address
   max-stations             Maximum number of wireless radio stations
   mgmt-frame-protection    Management Frame Protection (MFP) according to IEEE
                            802.11w
   mode                     Wireless radio mode
   physical-device          Wireless physical device
 > policy                   Policy route options
   redirect                 Incoming packet redirection destination
   reduce-transmit-power    Transmission power reduction in dBm
 > security                 Wireless security settings
   ssid                     Wireless access-point service set identifier (SSID)
 > traffic-policy           Traffic-policy for interface
   type                     Wireless device type for this interface [REQUIRED]
+> vif                      Virtual Local Area Network (VLAN) ID

Keeping the 80 characters line break (for serial connections - yes I heavily use them in 2019)

This is just a cosmetic change. I guess migrating the long names of nodes requires unending effort

Details

Difficulty level
Easy (less than an hour)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Cosmetic issue (typos etc.)

Event Timeline

c-po changed the task status from Open to In progress.Feb 24 2020, 6:51 AM
c-po claimed this task.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po removed c-po as the assignee of this task.Apr 10 2020, 1:20 PM
erkin set Issue type to Cosmetic issue (typos etc.).Aug 31 2021, 6:30 PM
c-po triaged this task as Wishlist priority.