Annotation of /trunk/bash/patches/bash-3.0-etc-inputrc.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1223 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1223 byte(s)
-import
1 | niro | 144 | --- bash-3.0/lib/readline/bind.c.agriffis 2004-03-03 22:39:32.000000000 -0500 |
2 | +++ bash-3.0/lib/readline/bind.c 2004-08-02 13:53:02.365731918 -0400 | ||
3 | @@ -781,6 +781,7 @@ | ||
4 | 1. the filename used for the previous call | ||
5 | 2. the value of the shell variable `INPUTRC' | ||
6 | 3. ~/.inputrc | ||
7 | + 4. /etc/inputrc | ||
8 | If the file existed and could be opened and read, 0 is returned, | ||
9 | otherwise errno is returned. */ | ||
10 | int | ||
11 | @@ -789,17 +790,20 @@ | ||
12 | { | ||
13 | /* Default the filename. */ | ||
14 | if (filename == 0) | ||
15 | + filename = last_readline_init_file; | ||
16 | + if (filename == 0) | ||
17 | + filename = sh_get_env_value ("INPUTRC"); | ||
18 | + if (filename == 0 || *filename == 0) | ||
19 | { | ||
20 | - filename = last_readline_init_file; | ||
21 | - if (filename == 0) | ||
22 | - filename = sh_get_env_value ("INPUTRC"); | ||
23 | - if (filename == 0) | ||
24 | - filename = DEFAULT_INPUTRC; | ||
25 | + /* If there's trouble reading DEFAULT_INPUTRC then fall back to | ||
26 | + * the system inputrc | ||
27 | + */ | ||
28 | + filename = DEFAULT_INPUTRC; | ||
29 | + if (_rl_read_init_file (filename, 0) == 0) | ||
30 | + return 0; | ||
31 | + filename = "/etc/inputrc"; | ||
32 | } | ||
33 | |||
34 | - if (*filename == 0) | ||
35 | - filename = DEFAULT_INPUTRC; | ||
36 | - | ||
37 | #if defined (__MSDOS__) | ||
38 | if (_rl_read_init_file (filename, 0) == 0) | ||
39 | return 0; |