()
| 22 | } |
| 23 | |
| 24 | func (z zsh) Register() error { |
| 25 | if err := z.installBinary(); err != nil { |
| 26 | return fmt.Errorf("failed to install zsh binary -> %w", err) |
| 27 | } |
| 28 | if err := z.installCompletion(); err != nil { |
| 29 | return fmt.Errorf("failed to install zsh completion -> %w", err) |
| 30 | } |
| 31 | if err := z.registerRunCommand(); err != nil { |
| 32 | return fmt.Errorf("failed to add run command to zshrc -> %w", err) |
| 33 | } |
| 34 | |
| 35 | return nil |
| 36 | } |
| 37 | |
| 38 | func (z zsh) Unregister() error { |
| 39 | if err := z.uninstallBinary(); err != nil { |
nothing calls this directly
no test coverage detected