Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for -norc flag #707

Merged
merged 3 commits into from Jun 27, 2018
Merged

Add support for -norc flag #707

merged 3 commits into from Jun 27, 2018

Conversation

@iwoloschin
Copy link
Contributor

@iwoloschin iwoloschin commented Jun 27, 2018

Basically what it says in the title, adding support for a -norc flag to the Elvish shell. Intended to be used for debugging/troubleshooting, or really anything that requires testing against a "stock" instance of Elvish without any customization that would normally be in a user's rc.elv file.

@@ -34,7 +34,7 @@ type flagSet struct {

Help, Version, BuildInfo, JSON bool

CodeInArg, CompileOnly bool
CodeInArg, CompileOnly, norc bool

This comment has been minimized.

@xiaq

xiaq Jun 27, 2018
Member

Call it NoRc for consistency with other fields.

@@ -29,7 +29,7 @@ func interact(ev *eval.Evaler, dataDir string) {
defer ed.Close()

// Source rc.elv.
if dataDir != "" {
if norc == false && dataDir != "" {

This comment has been minimized.

@xiaq

xiaq Jun 27, 2018
Member

!norc

@@ -21,14 +21,15 @@ type Shell struct {
DbPath string
Cmd bool
CompileOnly bool
norc bool

This comment has been minimized.

@xiaq

xiaq Jun 27, 2018
Member

Call it NoRc.

}

func New(binpath, sockpath, dbpath string, cmd, compileonly bool) *Shell {
return &Shell{binpath, sockpath, dbpath, cmd, compileonly}
func New(binpath, sockpath, dbpath string, cmd, compileonly bool, norc bool) *Shell {

This comment has been minimized.

@xiaq

xiaq Jun 27, 2018
Member

One last nitpick: cmd, compileonly, norc bool :)

@xiaq xiaq merged commit 67568e2 into elves:master Jun 27, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.