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(` declare -f SSS_RELOAD > /dev/null && export SSS_LOADED=true || export SSS_LOADED=false function SSS_RELOAD () { source <(%v load --reload=true) } if [[ "$SSS_LOADED" == "false" ]]; then source <(%v load) fi `, fp, fp) fmt.Println(reload_func) }, }
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.