diff options
author | Pim Snel <pim@lingewoud.nl> | 2020-02-10 17:46:19 +0100 |
---|---|---|
committer | Pim Snel <pim@lingewoud.nl> | 2020-02-10 17:46:19 +0100 |
commit | b48a8c0e2390798b57772884a5b3ff10d964baa5 (patch) | |
tree | b9d4b1cd797b5cdbc97d297505d9f6d76b487293 /src/main.c | |
parent | 862c27396e1ce43624c5499d759b81557295ea76 (diff) |
read stdin after file loading
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -282,13 +282,13 @@ int main (int argc, char ** argv) { // 2. loadrc loadrc(); - // 3. check input from stdin (pipeline) + // 3. read sc file passed as argv + load_sc(); + + // 4. check input from stdin (pipeline) // and send it to interp read_stdin(); - // 4. read sc file passed as argv - load_sc(); - // change curmode to NORMAL_MODE chg_mode('.'); @@ -576,6 +576,7 @@ void read_argv(int argc, char ** argv) { void load_sc() { char name[PATHLEN]; + strcpy(name, ""); //force name to be empty #ifdef NO_WORDEXP size_t len; #else |