mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Improve error message for attempts to use Posix variable assignments
darcs-hash:20060719232020-ac50b-1564ffffc2e119e90d711605247637e7aac9da96.gz
This commit is contained in:
parent
40ed01f6f2
commit
f36811b7be
1 changed files with 10 additions and 3 deletions
13
parser.c
13
parser.c
|
@ -140,7 +140,7 @@ The fish parser. Contains functions for parsing code.
|
|||
/**
|
||||
Error message for Posix-style assignment
|
||||
*/
|
||||
#define COMMAND_ASSIGN_ERR_MSG _( L"Unknown command '%ls'. Did you mean 'set VARIABLE VALUE'? For information on setting variable values, see the help section on the set command by typing 'help set'.")
|
||||
#define COMMAND_ASSIGN_ERR_MSG _( L"Unknown command '%ls'. Did you mean 'set %ls %ls'? For information on assigning values to variables, see the help section on the set command by typing 'help set'.")
|
||||
|
||||
/**
|
||||
Error for invalid redirection token
|
||||
|
@ -2161,7 +2161,7 @@ static int parse_job( process_t *p,
|
|||
wchar_t *cmd = (wchar_t *)al_get( args, 0 );
|
||||
|
||||
/*
|
||||
We couln't find the specified command.
|
||||
We couldn't find the specified command.
|
||||
|
||||
What we want to happen now is that the
|
||||
specified job won't get executed, and an
|
||||
|
@ -2176,9 +2176,16 @@ static int parse_job( process_t *p,
|
|||
*/
|
||||
if( wcschr( cmd, L'=' ) )
|
||||
{
|
||||
wchar_t *cpy = halloc_wcsdup( j, cmd );
|
||||
wchar_t *valpart = wcschr( cpy, L'=' );
|
||||
*valpart++=0;
|
||||
|
||||
debug( 0,
|
||||
COMMAND_ASSIGN_ERR_MSG,
|
||||
(wchar_t *)al_get( args, 0 ) );
|
||||
cmd,
|
||||
cpy,
|
||||
valpart);
|
||||
|
||||
}
|
||||
else if(cmd[0]==L'$')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue