Creating an alias for show VLAN commands

Create an alias for a frequently used show vlans custom command to avoid entering the selected columns each time you use the command.

Using a VLAN alias

HP Switch(config)#: alias showvlanstatus = “show vlan custom A1-A3 id name:20 status”

HP Switch(config)#: show vlan status
Status and Counters - VLAN Information - Custom view

VLANID VLAN name            Status
------ -------------------- ----------
1      DEFAULT_VLAN         Port-based
33     Vlan33               Port-based

Using pattern matching with the show VLANs custom command

If a pattern matching command is in a search for a field in the output of the show vlan custom command and it produces an error, the error message may not be visible. For example, if you enter a command with the pattern matching include option that contains an error (such as 'vlan' is misspelled) as in the following example, the output may be empty:

HP Switch(config)#: show vlans custom 1-3 name vlun include vlan1

HP recommends that you try the show vlans custom command first to ensure there is output, and then enter the command again with the pattern matching option.