get_ordered_context_list - Linux


get_ordered_context_list is a command that returns a sorted list of contexts surrounding the current context. It can be used to understand the hierarchical structure of contexts in the system and to navigate between them.


get_ordered_context_list [options] [<context> [<depth>]]


  • -h, –help: Display help and usage information.
  • -d, –depth: Specify the depth of the traversal. Default: 1
  • -a, –all: Include all contexts in the list, including child and ancestor contexts.


  • List the closest parent and child contexts of the current context:
  • List the parent context and its siblings:
get_ordered_context_list -d 2
  • List all contexts in the system:
get_ordered_context_list -a

Common Issues

  • Context not found: The specified context may not exist. Ensure that the context name is correct.
  • Invalid depth: The depth must be a positive integer.


get_ordered_context_list can be used with the set_context command to navigate between contexts:

set_context <new_context>

Related Commands

  • get_context: Get the current context.
  • set_context: Set the current context.
  • context_help: Display help for contexts.