mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Improve error reporting for bind builtin
darcs-hash:20070928213523-75c98-bd88022a63af1409ae28ae0829280df9652dcaff.gz
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user