environment commands

See “Environment commands” in the 7705 SAR Gen 2 MD-CLI User Guide for more information.

environment 
command-alias 
alias string 
admin-state keyword
cli-command string
description string-not-all-spaces
mount-point (keyword | string) 
python-script reference
command-completion 
enter boolean
space boolean
tab boolean
commit-options 
comment boolean
confirm boolean
console 
length number
width number
history 
recall boolean
size number
info-output 
always-display 
admin-state boolean
match-highlight 
admin-state keyword
style keyword
message-severity-level 
cli keyword
more boolean
progress-indicator 
admin-state keyword
delay number
type keyword
prompt 
context boolean
newline boolean
timestamp boolean
uncommitted-changes-indicator boolean
python 
memory-reservation number
minimum-available-memory number
timeout number
time-display keyword
time-format keyword

environment command descriptions

environment

Synopsis Configure the environment settings for this session
Contextenvironment
Treeenvironment
Introduced25.3.R2

Platforms

SAR Gen 2

command-alias

Synopsis Enter the command-alias context
Contextenvironment command-alias
Treecommand-alias

Description

Commands in this context create aliases to existing MD-CLI commands or to Python scripts.

Aliases may be mounted for use globally or for selected context paths. Arguments and output modifiers may be provided to aliases at configuration or run time.

Introduced25.3.R2

Platforms

SAR Gen 2

alias [alias-name] string
Synopsis Enter the alias list instance
Context environment command-alias alias string
Treealias

Description

Commands in this context create aliases to existing MD-CLI commands or to Python applications.

Aliases may be mounted for use globally or for selected context paths. Arguments and output modifiers may be provided to aliases at configuration or run time.

Introduced25.3.R2

Platforms

SAR Gen 2

[alias-name] string
Synopsis Alias name
Contextenvironment command-alias alias string
Treealias
String length1 to 64
String formatmust only contain alpha-numeric characters, underscore or hyphen (not as the first character)

Notes

This element is part of a list key.

Introduced25.3.R2

Platforms

SAR Gen 2

admin-state keyword
Synopsis Administrative state of the alias
Context environment command-alias alias string admin-state keyword
Treeadmin-state

Description

This command controls the administrative state of the MD-CLI alias.

MD-CLI aliases that are administratively disabled cannot be executed, do not autocomplete in operational mode, and do not appear in ? help.

Optionsenable, disable
Introduced 25.3.R2

Platforms

SAR Gen 2

cli-command string
Synopsis CLI command to run when executing the alias
Contextenvironment command-alias alias string cli-command string
Treecli-command
String length1 to 255

Notes

The following elements are part of a mandatory choice: cli-command or python-script.

Introduced25.3.R2

Platforms

SAR Gen 2

description string-not-all-spaces
Synopsis Text description
Context environment command-alias alias string description string-not-all-spaces
Treedescription
String length1 to 110
String format'string-not-all-spaces' must contain at least one non-space character
Introduced25.3.R2

Platforms

SAR Gen 2

mount-point [path] (keyword | string)
Synopsis Add a list entry for mount-point
Contextenvironment command-alias alias string mount-point (keyword | string)
Treemount-point
Min. instances1
Introduced25.3.R2

Platforms

SAR Gen 2

[path] (keyword | string)
Synopsis Mount point where the alias is available
Contextenvironment command-alias alias string mount-point (keyword | string)
Treemount-point
String length1 to 255
Optionsglobal
String formatmust start with forward slash

Notes

This element is part of a list key.

Introduced25.3.R2

Platforms

SAR Gen 2

python-script reference
Synopsis Python script to run when executing the alias
Contextenvironment command-alias alias string python-script reference
Treepython-script

Reference

state python python-script named-item

Notes

The following elements are part of a mandatory choice: cli-command or python-script.

Introduced26.7.R1

Platforms

SAR Gen 2

command-completion

Synopsis Enter the command-completion context
Contextenvironment command-completion
Treecommand-completion
Introduced25.3.R2

Platforms

SAR Gen 2

tab boolean
Synopsis Complete the command when the Tab key is pressed
Contextenvironment command-completion tab boolean
Treetab

Default

true

Introduced25.3.R2

Platforms

SAR Gen 2

commit-options

Synopsis Enter the commit-options context
Contextenvironment commit-options
Treecommit-options
Introduced25.3.R2

Platforms

SAR Gen 2

console

Synopsis Enter the console context
Context environment console
Treeconsole
Introduced25.3.R2

Platforms

SAR Gen 2

length number
Synopsis Number of lines displayed on the console
Contextenvironment console length number
Treelength
Range24 to 512

Default

24

Introduced25.3.R2

Platforms

SAR Gen 2

width number
Synopsis Number of columns displayed on the console
Contextenvironment console width number
Treewidth
Range80 to 512

Default

80

Introduced25.3.R2

Platforms

SAR Gen 2

history

Synopsis Enter the history context
Context environment history
Treehistory
Introduced25.3.R2

Platforms

SAR Gen 2

recall boolean
Synopsis Allow command history recall and search execution
Contextenvironment history recall boolean
Treerecall

Description

When configured to true, the command history recall (!), substitution (!$), display (:p, Esc+.), and backward search (Ctrl-R) are enabled.

When configured to false, the command history can be displayed using the history command, but commands in the history cannot be executed.

Default

true

Introduced25.3.R2

Platforms

SAR Gen 2

size number
Synopsis Command history size
Context environment history size number
Treesize

Description

This command specifies the maximum size of the command history. A value of 0 disables the command history.

Range0 to 1000

Default

50

Introduced25.3.R2

Platforms

SAR Gen 2

info-output

Synopsis Enter the info-output context
Context environment info-output
Treeinfo-output
Introduced25.3.R2

Platforms

SAR Gen 2

always-display
Synopsis Enter the always-display context
Contextenvironment info-output always-display
Treealways-display

Description

Commands in this context specify elements that are always displayed, regardless of whether they are set to their default value.

Introduced25.3.R2

Platforms

SAR Gen 2

admin-state boolean
Synopsis Always display admin-state elements
Context environment info-output always-display admin-state boolean
Treeadmin-state

Description

When configured to true, the values of the admin-state elements in info output (without the detail option) are always displayed, even if they are the default values.

Default

false

Introduced25.3.R2

Platforms

SAR Gen 2

match-highlight

Synopsis Enter the match-highlight context
Contextenvironment match-highlight
Treematch-highlight
Introduced26.3.R1

Platforms

SAR Gen 2

style keyword
Synopsis Match highlighting style
Context environment match-highlight style keyword
Treestyle
Optionsbold, underline, reverse
Max. instances3
Introduced26.3.R1

Platforms

SAR Gen 2

more boolean

Synopsis Activate the pager when output is longer than a screen
Contextenvironment more boolean
Treemore

Default

true

Introduced25.3.R2

Platforms

SAR Gen 2

progress-indicator

Synopsis Enter the progress-indicator context
Contextenvironment progress-indicator
Treeprogress-indicator
Introduced25.3.R2

Platforms

SAR Gen 2

delay number
Synopsis Delay before the progress indicator is displayed
Contextenvironment progress-indicator delay number
Treedelay
Range0 to 10000
Unitsmilliseconds

Default

1000

Introduced 25.3.R2

Platforms

SAR Gen 2

prompt

Synopsis Enter the prompt context
Context environment prompt
Treeprompt
Introduced25.3.R2

Platforms

SAR Gen 2

context boolean
Synopsis Show the current command context in the prompt
Contextenvironment prompt context boolean
Treecontext

Default

true

Introduced25.3.R2

Platforms

SAR Gen 2

newline boolean
Synopsis Add a new line before every prompt line
Contextenvironment prompt newline boolean
Treenewline

Default

true

Introduced25.3.R2

Platforms

SAR Gen 2

timestamp boolean
Synopsis Show the timestamp before the first prompt line
Contextenvironment prompt timestamp boolean
Treetimestamp

Default

false

Introduced25.3.R2

Platforms

SAR Gen 2

python

Synopsis Enter the python context
Context environment python
Treepython
Introduced25.3.R2

Platforms

SAR Gen 2

timeout number
Synopsis Maximum run time before a Python application is stopped
Contextenvironment python timeout number
Treetimeout
Range30 to 86400
Unitsseconds

Default

3600

Introduced25.3.R2

Platforms

SAR Gen 2

time-display keyword

Synopsis Time zone to display time
Context environment time-display keyword
Treetime-display

Description

This command configures the time zone for a timestamp displayed in outputs, such as event logs and show commands for the current CLI session.

In event logs, the selected time is used to control the timestamps in the CLI output of show log log-id and in YANG state in the /state/log/log-id branch (for logs such as session, cli, memory, SNMP, and NETCONF).

Also see the configure log log-id time-format command.

Optionslocal, utc

Default

local

Introduced 25.3.R2

Platforms

SAR Gen 2

time-format keyword

Synopsis Format to display the date and time
Context environment time-format keyword
Treetime-format

Description

This command specifies the format of the time display in the prompt, configuration, state, and certain show command output in the current CLI session.

Optionsiso-8601, rfc-1123, rfc-3339

Default

rfc-3339

Introduced25.3.R2

Platforms

SAR Gen 2