mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-22 22:28:51 +01: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: 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 {
|
||||
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)
|
||||
if err != nil {
|
||||
return nil, 0, fmt.Errorf("failed to build row for entry=%#v: %v", entry, err)
|
||||
|
Loading…
Reference in New Issue
Block a user