Fix bug where cd-ing wouldn't work if the changeDir contained a space

This commit is contained in:
David Dworken 2023-11-01 18:02:37 -07:00
parent 166f1eef87
commit 588e2f4405
No known key found for this signature in database

View File

@ -390,7 +390,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 ""
}