From 8a7104a0a477f367614583afefd2fcd0dd06e506 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Sat, 10 Mar 2018 21:33:16 -0600 Subject: [PATCH] Rename $_/$fish_title to $current_cmd --- src/builtin_fg.cpp | 2 +- src/env.cpp | 2 +- src/reader.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/builtin_fg.cpp b/src/builtin_fg.cpp index e7cdbe05c..df9ce328e 100644 --- a/src/builtin_fg.cpp +++ b/src/builtin_fg.cpp @@ -102,7 +102,7 @@ int builtin_fg(parser_t &parser, io_streams_t &streams, wchar_t **argv) { } const wcstring ft = tok_first(j->command()); - if (!ft.empty()) env_set_one(L"fish_title", ENV_EXPORT, ft); + if (!ft.empty()) env_set_one(L"current_cmd", ENV_EXPORT, ft); reader_write_title(j->command()); job_promote(j); diff --git a/src/env.cpp b/src/env.cpp index a1e4f15ef..2e3defd55 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -322,7 +322,7 @@ bool string_set_contains(const T &set, const wchar_t *val) { /// Check if a variable may not be set using the set command. static bool is_read_only(const wchar_t *val) { - const string_set_t env_read_only = {L"PWD", L"SHLVL", L"history", L"status", L"version", L"pid", L"hostname", L"fish_title"}; + const string_set_t env_read_only = {L"PWD", L"SHLVL", L"history", L"status", L"version", L"pid", L"hostname", L"current_cmd"}; return string_set_contains(env_read_only, val); } diff --git a/src/reader.cpp b/src/reader.cpp index 904ee004a..843530d1b 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -1620,7 +1620,7 @@ static void reader_interactive_init() { invalidate_termsize(); - env_set_one(L"fish_title", ENV_GLOBAL, L"fish"); + env_set_one(L"current_cmd", ENV_GLOBAL, L"fish"); } /// Destroy data for interactive use. @@ -1897,7 +1897,7 @@ void reader_run_command(parser_t &parser, const wcstring &cmd) { wcstring ft = tok_first(cmd); - if (!ft.empty()) env_set_one(L"fish_title", ENV_GLOBAL, ft); + if (!ft.empty()) env_set_one(L"current_cmd", ENV_GLOBAL, ft); reader_write_title(cmd); @@ -1913,7 +1913,7 @@ void reader_run_command(parser_t &parser, const wcstring &cmd) { term_steal(); - env_set_one(L"fish_title", ENV_GLOBAL, program_name); + env_set_one(L"current_cmd", ENV_GLOBAL, program_name); #ifdef HAVE__PROC_SELF_STAT proc_update_jiffies();