Change semicolon to && so that if the cd fails, the command doesn't run. Per feedback on #83

This commit is contained in:
David Dworken 2023-10-06 16:49:50 -07:00
parent 7a1036ecd1
commit 3efe62401c
No known key found for this signature in database

View File

@ -371,7 +371,7 @@ func (m model) View() string {
SELECTED_COMMAND = m.tableEntries[m.table.Cursor()].Command
if m.selected == SelectedWithChangeDir {
changeDir := m.tableEntries[m.table.Cursor()].CurrentWorkingDirectory
SELECTED_COMMAND = "cd " + changeDir + "; " + SELECTED_COMMAND
SELECTED_COMMAND = "cd " + changeDir + " && " + SELECTED_COMMAND
}
return ""
}