Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InitrcCmd = &cobra.Command{ Use: "initrc", Short: "init rc is command to invoke the activated bashrc", Run: func(cmd *cobra.Command, args []string) { fp := getCurrentExePath() reload_func := fmt.Sprintf(` function SSS_RELOAD () { source <(%v initrc --reload=true) } `, fp) fmt.Println(reload_func) if os.Getenv("SSS_LOADED") == "true" && !reload { return } fmt.Println("export SSS_LOADED=true;") cmd_impel.InitRC() }, }
View Source
var InstallCmd = &cobra.Command{ Use: "install", Short: "output how to use this cli in rc files", Run: func(cmd *cobra.Command, args []string) { fp := getCurrentExePath() log.Infoln("using following command to add into zshrc:") log.Infof(` echo 'source <(%v initrc)' >> ~/.zshrc `, fp) log.Infoln("using following command to add into bashrc:") log.Infof(` echo 'source <(%v initrc)' >> ~/.bashrc `, fp) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.