Improve error reporting for bind builtin

darcs-hash:20070928213523-75c98-bd88022a63af1409ae28ae0829280df9652dcaff.gz
This commit is contained in:
liljencrantz 2007-09-29 07:35:23 +10:00
parent 0e716763d8
commit f28e83d3e9

View file

@ -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;
}