Move up the hishtory disable so as to avoid recording the query

This commit is contained in:
David Dworken 2022-10-29 18:34:16 -07:00
parent 51096276b6
commit 6ad60f4e58
6 changed files with 26 additions and 31 deletions

View File

@ -998,11 +998,11 @@ func testDisplayTable(t *testing.T, tester shellTester) {
manuallySubmitHistoryEntry(t, userSecret, entry2)
// Query and check the table
tester.RunInteractiveShell(t, ` hishtory disable`)
out := hishtoryQuery(t, tester, "table")
compareGoldens(t, out, "testDisplayTable-defaultColumns")
// Adjust the columns that should be displayed
tester.RunInteractiveShell(t, ` hishtory disable`)
tester.RunInteractiveShell(t, `hishtory config-set displayed-columns Hostname Command`)
// And check the table again

View File

@ -1,4 +1,3 @@
Hostname Command
ghaction-runner-hostname hishtory query table
localhost table_cmd2
localhost table_cmd1
Hostname Command
localhost table_cmd2
localhost table_cmd1

View File

@ -1,4 +1,3 @@
Hostname Exit Code Command
ghaction-runner-hostname 0 hishtory query table
localhost 3 table_cmd2
localhost 2 table_cmd1
Hostname Exit Code Command
localhost 3 table_cmd2
localhost 2 table_cmd1

View File

@ -1,4 +1,3 @@
Hostname Exit Code Command CWD
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/
Hostname Exit Code Command CWD
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/

View File

@ -1,8 +1,7 @@
Hostname Exit Code Command CWD
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 2 while : /tmp/
do
ls /table/
done
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/
Hostname Exit Code Command CWD
localhost 2 while : /tmp/
do
ls /table/
done
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/

View File

@ -1,10 +1,9 @@
Hostname Exit Code Command CWD foo
ghaction-runner-hostname 0 echo table-2 / aaaaaaaaaaaaa
ghaction-runner-hostname 0 echo table-1 / aaaaaaaaaaaaa
ghaction-runner-hostname 0 hishtory query table ~/code/hishtory
localhost 2 while : /tmp/
do
ls /table/
done
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/
Hostname Exit Code Command CWD foo
ghaction-runner-hostname 0 echo table-2 / aaaaaaaaaaaaa
ghaction-runner-hostname 0 echo table-1 / aaaaaaaaaaaaa
localhost 2 while : /tmp/
do
ls /table/
done
localhost 3 table_cmd2 ~/foo/
localhost 2 table_cmd1 /tmp/