summaryrefslogtreecommitdiff
path: root/op-mode-definitions/show-history.xml
blob: 7fb2862644da54dbd22696794233d3c03d174bff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="show">
    <children>
      <node name="history">
        <properties>
          <help>Show command history</help>
        </properties>
        <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history</command>
        <children>
          <leafNode name="brief">
            <properties>
              <help>Show recent command history</help>
            </properties>
            <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history 20</command>
          </leafNode>
        </children>
      </node>

      <tagNode name="history">
        <properties>
          <help>Show last N commands in history</help>
          <completionHelp>
            <list>&lt;NUMBER&gt;</list>
          </completionHelp>
        </properties>
        <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history $3</command>
      </tagNode>
    </children>
  </node>
</interfaceDefinition>