MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / cliSetPreferences

Function cliSetPreferences

src/redis-cli.c:1927–1941  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1925 * ":command" is called, or when reading ~/.redisclirc file, in order to
1926 * set user preferences. */
1927void 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. */
1944void cliLoadPreferences(void) {

Callers 2

cliLoadPreferencesFunction · 0.85
replFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected