mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-09 15:15:08 +02:00
Print a message telling people they must restart their shell per #37
This commit is contained in:
@ -2043,11 +2043,8 @@ func testControlR(t *testing.T, tester shellTester, shellName string, onlineStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Re-enable control-r
|
// Re-enable control-r
|
||||||
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory config-set enable-control-r true`)
|
_, err := tester.RunInteractiveShellRelaxed(t, `hishtory config-set enable-control-r true`)
|
||||||
testutils.Check(t, err)
|
testutils.Check(t, err)
|
||||||
if out != "" {
|
|
||||||
t.Fatalf("config-set out is unexpected: %#v", out)
|
|
||||||
}
|
|
||||||
|
|
||||||
// And check that the control-r bindings work again
|
// And check that the control-r bindings work again
|
||||||
out = captureTerminalOutputWithShellName(t, tester, "fish", []string{"C-R", "-pipefail SPACE -exit_code:0"})
|
out = captureTerminalOutputWithShellName(t, tester, "fish", []string{"C-R", "-pipefail SPACE -exit_code:0"})
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/ddworken/hishtory/client/hctx"
|
"github.com/ddworken/hishtory/client/hctx"
|
||||||
@ -31,6 +32,7 @@ var setEnableControlRCmd = &cobra.Command{
|
|||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
config.ControlRSearchEnabled = (val == "true")
|
config.ControlRSearchEnabled = (val == "true")
|
||||||
lib.CheckFatalError(hctx.SetConfig(config))
|
lib.CheckFatalError(hctx.SetConfig(config))
|
||||||
|
fmt.Println("Updated the control-r integration, please restart your shell for this to take effect...")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user