mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-11 15:46:39 +02:00
Replace newlines with semicolons to fix #34
This commit is contained in:
parent
3a623e6503
commit
f53e02731d
@ -2500,3 +2500,5 @@ func FuzzTestMultipleUsers(f *testing.F) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: somehow test/confirm that hishtory works even if only bash/only zsh is installed
|
// TODO: somehow test/confirm that hishtory works even if only bash/only zsh is installed
|
||||||
|
|
||||||
|
// TODO: TUI tests for multiline commands
|
||||||
|
@ -228,7 +228,7 @@ func getRows(ctx *context.Context, columnNames []string, query string, numEntrie
|
|||||||
if strings.TrimSpace(entry.Command) == strings.TrimSpace(lastCommand) && config.FilterDuplicateCommands {
|
if strings.TrimSpace(entry.Command) == strings.TrimSpace(lastCommand) && config.FilterDuplicateCommands {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
entry.Command = strings.ReplaceAll(entry.Command, "\n", " ") // TODO: handle multi-line commands better here
|
entry.Command = strings.ReplaceAll(entry.Command, "\n", "; ")
|
||||||
row, err := buildTableRow(ctx, columnNames, *entry)
|
row, err := buildTableRow(ctx, columnNames, *entry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, fmt.Errorf("failed to build row for entry=%#v: %v", entry, err)
|
return nil, 0, fmt.Errorf("failed to build row for entry=%#v: %v", entry, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user