mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Improve error reporting for bind builtin
darcs-hash:20070928213523-75c98-bd88022a63af1409ae28ae0829280df9652dcaff.gz
This commit is contained in:
parent
0e716763d8
commit
f28e83d3e9
1 changed files with 23 additions and 0 deletions
23
builtin.c
23
builtin.c
|
@ -485,6 +485,29 @@ static int builtin_bind_add( wchar_t *seq, wchar_t *cmd, int terminfo )
|
|||
}
|
||||
else
|
||||
{
|
||||
switch( errno )
|
||||
{
|
||||
|
||||
case ENOENT:
|
||||
{
|
||||
sb_printf( sb_err, _(L"%ls: No key with name '%ls' found\n"), L"bind", seq );
|
||||
break;
|
||||
}
|
||||
|
||||
case EILSEQ:
|
||||
{
|
||||
sb_printf( sb_err, _(L"%ls: Key with name '%ls' does not have any mapping\n"), L"bind", seq );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
sb_printf( sb_err, _(L"%ls: Unknown error trying to bind to key named '%ls'\n"), L"bind", seq );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue