Source ~/.elvish/rc.elv on interact startup.

This resolves issue #42.
This commit is contained in:
Cheer Xiao 2015-02-09 14:01:13 +01:00
parent f0c2bc11fb
commit c23a4e2ece

View File

@ -53,6 +53,14 @@ func printError(err error) {
// TODO(xiaq): Currently only the editor deals with signals.
func interact() {
ev := newEvaluator()
datadir, err := store.EnsureDataDir()
printError(err)
if err == nil {
err := ev.Source(datadir + "/rc.elv")
if err != nil && !os.IsNotExist(err) {
printError(err)
}
}
cmdNum := 0