Using Command Aliases; Defining Command Aliases - Cisco nexus 5000 series Cli Configuration Manual

Hide thumbs Also See for nexus 5000 series:
Table of Contents

Advertisement

Using Command Aliases

S e n d f e e d b a c k t o n x 5 0 0 0 - d o c f e e d b a c k @ c i s c o . c o m
Use the show cli variables command to display user-defined CLI session variables. The following
example displays user-defined CLI session variables:
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.29.33"
testinterface="fc 1/1"
Use the cli no var name command to remove user-defined CLI session variables. The following example
removes a user-defined CLI session variable:
switch# cli no var name testinterface
Using Command Aliases
Command alias support has the following characteristics:

Defining Command Aliases

You can define command aliases using the cli alias name command in configuration mode.
This following example shows how to define command aliases:
switch# configure terminal
switch(config)# cli alias name eth interface ethernet
switch(config)# cli alias name shintbr show interface brief
switch(config)# cli alias name shfcintup shintbr | include up | include fc
You can display the command aliases defined on the switch using the alias default command alias.
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
1-10
0 CRC,
0 unknown class
0 too long, 0 too short
232691 frames output, 7448692 bytes
0 discards, 0 errors
0 input OLS, 0 LRR, 0 NOS, 0 loop inits
1 output OLS, 1 LRR, 0 NOS, 1 loop inits
16 receive B2B credit remaining
7 transmit B2B credit remaining
Command aliases are global for all user sessions.
Command aliases are saved across reboots.
Commands being aliased must be typed in full without abbreviation.
Command alias translation always takes precedence over any keyword in any configuration mode or
submode.
Command alias support is only available on the supervisor module, not the switching modules.
Command alias configuration takes effect for other user sessions immediately.
You cannot override the default command alias alias, which aliases the show cli alias command.
Nesting of command aliases is permitted to a maximum depth of 1. One command alias can refer to
another command alias that must refer to a valid command, not to another command alias.
A command alias always replaces the first command keyword on the command line.
You can define command aliases for commands in any configuration submode or the EXEC mode.
Chapter 1
Using the Command-Line Interface
OL-16597-01

Advertisement

Table of Contents
loading

Table of Contents