[all-commits] [llvm/llvm-project] b95150: [lldb] Allow aliases to aliases of raw input commands

Dave Lee via All-commits all-commits at lists.llvm.org
Fri Jan 21 17:57:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b95150418fb6e2d22a0bd84abcdc1f3cc7e5a0bf
      https://github.com/llvm/llvm-project/commit/b95150418fb6e2d22a0bd84abcdc1f3cc7e5a0bf
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2022-01-21 (Fri, 21 Jan 2022)

  Changed paths:
    M lldb/source/Commands/CommandObjectCommands.cpp
    M lldb/test/API/commands/command/nested_alias/TestNestedAlias.py

  Log Message:
  -----------
  [lldb] Allow aliases to aliases of raw input commands

Allow users to create aliases for aliases to raw input commands. That probably
sounds convoluted, so here's an example:

```
command alias some-setup env SOMEVAR=SOMEVALUE
```

This an alias based on `env`, which itself is an alias for `_regex-env`.
`_regex-env` is a `command regex` command, which takes raw input.

The above `some-setup` alias fails with:

```
error: Unable to create requested alias.
```

This change allows such aliases to be created. lldb already supports aliases to
aliases for parsed commands.

Differential Revision: https://reviews.llvm.org/D117259




More information about the All-commits mailing list