Files
pmg/internal/alias/shells.go
T
Sahil BansalandGitHub d363167981 feat: add setup & remove cmd for better UX (#43)
* feat: add setup & remove cmd for better UX

* refactor(alias): improve separation of concerns and fix shell sourcing

* chore: remove extra/unused folder

* refactor: introduce separate files for shells

* fix: use temp files for safe shell config modification
2025-06-24 12:46:21 +05:30

16 lines
394 B
Go

package alias
import "fmt"
type Shell interface {
Source(rcPath string) string
Name() string
Path() string
}
var commentForRemovingShellSource = "# remove aliases by running `pmg setup remove` or deleting the line"
func defaultShellSource(rcPath string) string {
return fmt.Sprintf("%s \n[ -f %s ] && source %s # PMG source aliases\n", commentForRemovingShellSource, rcPath, rcPath)
}