summaryrefslogtreecommitdiff
path: root/templates/show
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-08 17:12:09 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-07-11 12:53:08 -0500
commitd9fdb7f34b949fed8b0773f5da101a76925efe24 (patch)
tree9ba96cd3bca01038daaf9ce0100467c171441714 /templates/show
parent781459feeb3ce1c37fbbfc94c0643d8fce30b1af (diff)
downloadvyatta-op-d9fdb7f34b949fed8b0773f5da101a76925efe24.tar.gz
vyatta-op-d9fdb7f34b949fed8b0773f5da101a76925efe24.zip
Bugfix 7266: make 'show history' work with non interactive shells like webgui
(cherry picked from commit 80258882e7aeaef07bfd2b97496c089c74d34cd7)
Diffstat (limited to 'templates/show')
-rw-r--r--templates/show/history/brief/node.def4
-rw-r--r--templates/show/history/node.def4
-rw-r--r--templates/show/history/node.tag/node.def5
3 files changed, 10 insertions, 3 deletions
diff --git a/templates/show/history/brief/node.def b/templates/show/history/brief/node.def
index c1a81a3..4dc73c1 100644
--- a/templates/show/history/brief/node.def
+++ b/templates/show/history/brief/node.def
@@ -1,2 +1,4 @@
help: recent command history
-run: history 20
+run: HISTFILE="$HOME/.bash_history"
+ \set -o history
+ history 20
diff --git a/templates/show/history/node.def b/templates/show/history/node.def
index 787ebd9..21e79e7 100644
--- a/templates/show/history/node.def
+++ b/templates/show/history/node.def
@@ -1,2 +1,4 @@
help: show command history
-run: history
+run: HISTFILE="$HOME/.bash_history"
+ \set -o history
+ history
diff --git a/templates/show/history/node.tag/node.def b/templates/show/history/node.tag/node.def
index a8c3755..2075cde 100644
--- a/templates/show/history/node.tag/node.def
+++ b/templates/show/history/node.tag/node.def
@@ -1,3 +1,6 @@
help: Display last N commands in history
allowed: echo -n '<NUMBER>'
-run: HISTTIMEFORMAT='%FT%T%z ' history $3
+run: HISTTIMEFORMAT='%FT%T%z '
+ HISTFILE="$HOME/.bash_history"
+ \set -o history
+ history $3