Set the CLI preferences. This function is invoked when an interactive * ":command" is called, or when reading ~/.redisclirc file, in order to * set user preferences. */
| 1925 | * ":command" is called, or when reading ~/.redisclirc file, in order to |
| 1926 | * set user preferences. */ |
| 1927 | void cliSetPreferences(char **argv, int argc, int interactive) { |
| 1928 | if (!strcasecmp(argv[0],":set") && argc >= 2) { |
| 1929 | if (!strcasecmp(argv[1],"hints")) pref.hints = 1; |
| 1930 | else if (!strcasecmp(argv[1],"nohints")) pref.hints = 0; |
| 1931 | else { |
| 1932 | printf("%sunknown keydb-cli preference '%s'\n", |
| 1933 | interactive ? "" : ".redisclirc: ", |
| 1934 | argv[1]); |
| 1935 | } |
| 1936 | } else { |
| 1937 | printf("%sunknown keydb-cli internal command '%s'\n", |
| 1938 | interactive ? "" : ".redisclirc: ", |
| 1939 | argv[0]); |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | /* Load the ~/.redisclirc file if any. */ |
| 1944 | void cliLoadPreferences(void) { |
no outgoing calls
no test coverage detected