mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-19 04:41:15 -03:00
simplify, and fix, setting the current locale
Fix test setup bogosities. Specifically, they weren't hermetic with respect to locale env vars. Rewrite the handling of locale vars to simplify the code and make it more like the pattern most programs employ. Fixes #3110
This commit is contained in:
@@ -148,8 +148,7 @@ void setup_and_process_keys(bool continuous_mode) {
|
||||
is_interactive_session = 1; // by definition this is interactive
|
||||
set_main_thread();
|
||||
setup_fork_guards();
|
||||
wsetlocale(LC_ALL, L"POSIX");
|
||||
program_name = L"fish_key_reader";
|
||||
setlocale(LC_ALL, "POSIX");
|
||||
env_init();
|
||||
reader_init();
|
||||
input_init();
|
||||
@@ -178,6 +177,7 @@ void setup_and_process_keys(bool continuous_mode) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
program_name = L"fish_key_reader";
|
||||
bool continuous_mode = false;
|
||||
const char *short_opts = "+c";
|
||||
const struct option long_opts[] = {{"continuous", no_argument, NULL, 'd'}, {NULL, 0, NULL, 0}};
|
||||
|
||||
Reference in New Issue
Block a user