Skip to content
Snippets Groups Projects
Commit 6409e577 authored by Jean-Loup 'clippix' Bogalho's avatar Jean-Loup 'clippix' Bogalho
Browse files

Read init file only when using interactive shell

parent f81ae9bd
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,7 @@ use std::thread;
fn inner_main(sigint_rx : mpsc::Receiver<i32>) {
let builtins = Builtin::map();
let mut shell = Shell::new(&builtins, sigint_rx);
shell.evaluate_init_file();
let shell = Shell::new(&builtins, sigint_rx);
shell.main();
}
......
......@@ -248,6 +248,8 @@ impl<'a> Binary for Shell<'a> {
context
});
self.evaluate_init_file();
self.variables.set_array (
"args",
iter::once(env::args().next().unwrap()).collect(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment