diff options
author | Humberto Alves <hjalves@live.com> | 2022-04-03 22:07:40 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-03 23:28:01 +0200 |
commit | 5506932788a27059572ae006648c3b3ff6866910 (patch) | |
tree | 9b73132560cc69a7e85cba94117ebea7ad72e2b4 | |
parent | e292a038b7576c5798b22a392f73a6440bef2648 (diff) | |
download | serenity-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.h | 2 | ||||
-rw-r--r-- | Userland/Shell/main.cpp | 1 |
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(); } { |