mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Recommend eval when using variable as command.
This commit is contained in:
parent
74e27a0a82
commit
6709d1067d
1 changed files with 4 additions and 2 deletions
|
@ -2055,15 +2055,17 @@ int parser_t::parse_job(process_t *p,
|
|||
if (val)
|
||||
{
|
||||
debug(0,
|
||||
_(L"Variables may not be used as commands. Instead, define a function like 'function %ls; %ls $argv; end'. See the help section for the function command by typing 'help function'."),
|
||||
_(L"Variables may not be used as commands. Instead, define a function like 'function %ls; %ls $argv; end' or use the eval builtin instead, like 'eval %ls'. See the help section for the function command by typing 'help function'."),
|
||||
cmd+1,
|
||||
val,
|
||||
cmd,
|
||||
cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug(0,
|
||||
_(L"Variables may not be used as commands. Instead, define a function. See the help section for the function command by typing 'help function'."),
|
||||
_(L"Variables may not be used as commands. Instead, define a function or use the eval builtin instead, like 'eval %ls'. See the help section for the function command by typing 'help function'."),
|
||||
cmd,
|
||||
cmd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue