mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 22:21:14 -03:00
Show how fish was executed, using argv[0] for program_name
... rather than hard code it to "fish". This affects what is found in $_ and improves the errors: For example, if fish was ran with ./fish, instead of something like: fish: Expected 3 surprises, only got 2 surprises we'll see: ./fish: Expected 3 surprises, only got 2 surprises like most other shell utilities. It's just a tiny bit of detail that can avoid confusion.
This commit is contained in:
@@ -383,7 +383,7 @@ static bool parse_flags(int argc, char **argv, bool *continuous_mode) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
program_name = L"fish_key_reader";
|
||||
program_name = argv[0];
|
||||
bool continuous_mode = false;
|
||||
|
||||
if (!parse_flags(argc, argv, &continuous_mode)) return 1;
|
||||
|
||||
Reference in New Issue
Block a user