Browse Source

esh: collect PATH contents after source eshrc

K. Lange 4 years ago
parent
commit
1aea7033db
1 changed files with 2 additions and 3 deletions
  1. 2 3
      apps/sh.c

+ 2 - 3
apps/sh.c

@@ -1372,9 +1372,6 @@ int main(int argc, char ** argv) {
 	gethost();
 
 	install_commands();
-	/* Parse $PATH to add contents */
-	add_path();
-	sort_commands();
 
 	if (argc > 1) {
 		int c;
@@ -1422,6 +1419,8 @@ int main(int argc, char ** argv) {
 	shell_interactive = 1;
 
 	source_eshrc();
+	add_path();
+	sort_commands();
 
 	while (1) {
 		char buffer[LINE_LEN] = {0};