mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2026-01-27 03:04:21 +01:00
fix: pass config file flag to add/edit commands
This commit is contained in:
@@ -270,9 +270,9 @@ func (m standaloneAddForm) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
// RunAddForm provides backward compatibility for standalone add form
|
||||
func RunAddForm(hostname string) error {
|
||||
func RunAddForm(hostname string, configFile string) error {
|
||||
styles := NewStyles(80)
|
||||
addForm := NewAddForm(hostname, styles, 80, 24, "")
|
||||
addForm := NewAddForm(hostname, styles, 80, 24, configFile)
|
||||
m := standaloneAddForm{addForm}
|
||||
|
||||
p := tea.NewProgram(m, tea.WithAltScreen())
|
||||
|
||||
@@ -258,9 +258,9 @@ func (m standaloneEditForm) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
// RunEditForm provides backward compatibility for standalone edit form
|
||||
func RunEditForm(hostName string) error {
|
||||
func RunEditForm(hostName string, configFile string) error {
|
||||
styles := NewStyles(80)
|
||||
editForm, err := NewEditForm(hostName, styles, 80, 24, "")
|
||||
editForm, err := NewEditForm(hostName, styles, 80, 24, configFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user