summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHumberto Alves <hjalves@live.com>2022-04-03 22:07:40 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-03 23:28:01 +0200
commit5506932788a27059572ae006648c3b3ff6866910 (patch)
tree9b73132560cc69a7e85cba94117ebea7ad72e2b4
parente292a038b7576c5798b22a392f73a6440bef2648 (diff)
downloadserenity-5506932788a27059572ae006648c3b3ff6866910.zip
Shell: Refresh PATH cache after running shellrc files
This fixes the highlight of runnable commands, whenever PATH variable is changed in one of the shellrc files.
-rw-r--r--Userland/Shell/Shell.h2
-rw-r--r--Userland/Shell/main.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Shell/Shell.h b/Userland/Shell/Shell.h
index 31d3066c10..322043c400 100644
--- a/Userland/Shell/Shell.h
+++ b/Userland/Shell/Shell.h
@@ -241,6 +241,7 @@ public:
String get_history_path();
void print_path(StringView path);
+ void cache_path();
bool read_single_line();
@@ -343,7 +344,6 @@ private:
void bring_cursor_to_beginning_of_a_line() const;
Optional<int> resolve_job_spec(StringView);
- void cache_path();
void add_entry_to_cache(String const&);
void remove_entry_from_cache(StringView);
void stop_all_jobs();
diff --git a/Userland/Shell/main.cpp b/Userland/Shell/main.cpp
index ae02376d81..ffff343fed 100644
--- a/Userland/Shell/main.cpp
+++ b/Userland/Shell/main.cpp
@@ -225,6 +225,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
};
run_rc_file(Shell::Shell::global_init_file_path);
run_rc_file(Shell::Shell::local_init_file_path);
+ shell->cache_path();
}
{