{"id":23169508,"url":"https://github.com/khaledalam/redis-cli-key-values-hints","last_synced_at":"2025-04-04T23:11:06.619Z","repository":{"id":168554997,"uuid":"644211216","full_name":"khaledalam/redis-cli-key-values-hints","owner":"khaledalam","description":"Doc of my PR: https://github.com/redis/redis/pull/12215","archived":false,"fork":false,"pushed_at":"2023-05-24T04:03:23.000Z","size":2111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T07:27:45.367Z","etag":null,"topics":["c","cli","make","makefile","redis","redis-database"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khaledalam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-23T03:51:22.000Z","updated_at":"2023-06-16T17:44:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"fecd0355-1886-4c16-b1bf-226b32318c12","html_url":"https://github.com/khaledalam/redis-cli-key-values-hints","commit_stats":null,"previous_names":["khaledalam/redis-cli-key-values-hints"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fredis-cli-key-values-hints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fredis-cli-key-values-hints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fredis-cli-key-values-hints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fredis-cli-key-values-hints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khaledalam","download_url":"https://codeload.github.com/khaledalam/redis-cli-key-values-hints/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261612,"owners_count":20910108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cli","make","makefile","redis","redis-database"],"created_at":"2024-12-18T03:17:56.640Z","updated_at":"2025-04-04T23:11:06.604Z","avatar_url":"https://github.com/khaledalam.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## redis-cli key values hints\n\n```c\n/* Add the actual keys' values hint instead of only hint word \"key\" for GET command.\n *\n * This method depends on:\n * 1) The hint value to be \"key\"\n * 2) SCAN command(since: v2.8.0) with pattern[PREFIX*]\n * \n * By default hints_keys_values is OFF.\n * The default hints_keys_values_count is 5 keys.\n */\n ```\n\n\n-------------------------------------------------------------\n\n\u003ccenter\u003e\n\n### [The PR HERE](https://github.com/redis/redis/pull/12215)\n\nHere is a screencast demo:\n\n\nhttps://github.com/khaledalam/redis-cli-key-values-hints/assets/8682067/89aba5ae-0784-4a3e-ac80-ed3e36e46499\n\n\n\n\u003c/center\u003e\n\n\nIt's like chating with server while typing before hit Enter but it works like that only if:\n- User allow that by adding `:set hints-keys-values` in CLI preferences `~/.redisclirc` file  (i just changed the default value of this mechanism to be OFF)\n- GET command is used\n- Original hint value is the word `key`\n\n### Example:\nif we have stored pairs values like this:\u003cbr/\u003e\n\n\u003csmall\u003e_MSET a test1 aa test2 aab test3 aaz test4 abc test5 aah test6 baa test7 bab test8 bbb test9 bbz test10_\u003c/small\u003e\n\n```\n[\n    \"a\":    \"test1\",\n    \"aa\":   \"test2\",\n    \"aab\":  \"test3\",\n    \"aaz\":  \"test4\",\n    \"abc\":  \"test5\",\n    \"aah\":  \"test6\",\n    \"baa\":  \"test7\",\n    \"bab\":  \"test8\",\n    \"bbb\":  \"test9\",\n    \"bbz\":  \"test10\",\n]\n```\n\n\nWhile writing in redis-cli `GET aa` the hint will be like this:\n\n$ GET aa \u003cspan style=\"color:gray;\"\u003ekey: [ aa, aah, aaz, aab, ]\u003c/span\u003e\n\u003cimg width=\"368\" alt=\"redis-key-values-hints1\" src=\"https://github.com/redis/redis/assets/8682067/838b2fbb-1e27-429d-9524-e673591f01d8\"\u003e\n\nWhile writing in redis-cli `GET b` the hint will be like this:\n\n$ GET b \u003cspan style=\"color:gray;\"\u003ekey: [ bbb, bba, bab, bbz, ]\u003c/span\u003e\n\u003cimg width=\"365\" alt=\"redis-key-values-hints2\" src=\"https://github.com/redis/redis/assets/8682067/e5340ccd-2dc1-4920-a5a5-68918e13972f\"\u003e\n\nWhile writing in redis-cli `GET ba` the hint will be like this:\n\n$ GET ba \u003cspan style=\"color:gray;\"\u003ekey: [ baa, bab, ]\u003c/span\u003e\n\u003cimg width=\"309\" alt=\"redis-key-values-hints3\" src=\"https://github.com/redis/redis/assets/8682067/c38fecbb-be23-4b7c-9cce-b9cd6f28b91b\"\u003e\n## User preferences\n\n- Added the ability of setting the actual key' values hint ON and OFF using `:set hints_keys_values` in `~/.redisclirc` file. (by default it's OFF)\n- Added the ability of setting number of actual key' values items count (default: 5, max: 20) using `:set hints_keys_values_count X` in `~/.redisclirc` file.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledalam%2Fredis-cli-key-values-hints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhaledalam%2Fredis-cli-key-values-hints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledalam%2Fredis-cli-key-values-hints/lists"}