{"action":"created","issue":{"url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/429","repository_url":"https://api.github.com/repos/lzybkr/PSReadLine","labels_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/429/comments","events_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/429/events","html_url":"https://github.com/lzybkr/PSReadLine/issues/429","id":172545241,"number":429,"title":"Search history forward: The cmd way","user":{"login":"monoblaine","id":540974,"avatar_url":"https://avatars.githubusercontent.com/u/540974?v=3","gravatar_id":"","url":"https://api.github.com/users/monoblaine","html_url":"https://github.com/monoblaine","followers_url":"https://api.github.com/users/monoblaine/followers","following_url":"https://api.github.com/users/monoblaine/following{/other_user}","gists_url":"https://api.github.com/users/monoblaine/gists{/gist_id}","starred_url":"https://api.github.com/users/monoblaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monoblaine/subscriptions","organizations_url":"https://api.github.com/users/monoblaine/orgs","repos_url":"https://api.github.com/users/monoblaine/repos","events_url":"https://api.github.com/users/monoblaine/events{/privacy}","received_events_url":"https://api.github.com/users/monoblaine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-22T20:21:37Z","updated_at":"2016-08-23T05:03:31Z","closed_at":null,"body":"When I install PSReadLine, a console feature regarding the \"command history traversal\" that I use the most gets broken. That is:\r\n\r\n1. Launch a PowerShell instance, type `ls` and press `Enter`.\r\n2. Now type `cls` and press `Enter`.\r\n3. Press `up arrow` 2 times. (You should get `ls`)\r\n4. Press `Enter`.\r\n5. Press `down arrow`. (You should get `cls` now. You get nothing if PSReadLine module is installed.)\r\n\r\nThis history search behavior is sort of stateful: If you've executed a command from your history, and do a \"History Forward\" action after that, you should get the next command in history that comes after that.\r\n\r\nThe functions `HistorySearchForward` and `HistorySearchBackward` is only a part of what I need. Pressing the down arrow **in a blank new line** should do a `HistorySearchForward` **starting from the last executed command (if any)**.\r\n\r\nActually it sounds to me like \"OMG HOW COME NOBODY EVER REALIZED THIS BEFORE?\" And I know that possibly cannot be true. So I hope I'm not pointlessly mentioning some \"THAT'S A FEATURE\" case.\r\n\r\n(By the way, I love the syntax coloring. That's why I seek a solution that doesn't include uninstalling the module.)"},"comment":{"url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/comments/241627617","html_url":"https://github.com/lzybkr/PSReadLine/issues/429#issuecomment-241627617","issue_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/429","id":241627617,"user":{"login":"lzybkr","id":2148248,"avatar_url":"https://avatars.githubusercontent.com/u/2148248?v=3","gravatar_id":"","url":"https://api.github.com/users/lzybkr","html_url":"https://github.com/lzybkr","followers_url":"https://api.github.com/users/lzybkr/followers","following_url":"https://api.github.com/users/lzybkr/following{/other_user}","gists_url":"https://api.github.com/users/lzybkr/gists{/gist_id}","starred_url":"https://api.github.com/users/lzybkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzybkr/subscriptions","organizations_url":"https://api.github.com/users/lzybkr/orgs","repos_url":"https://api.github.com/users/lzybkr/repos","events_url":"https://api.github.com/users/lzybkr/events{/privacy}","received_events_url":"https://api.github.com/users/lzybkr/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T05:03:31Z","updated_at":"2016-08-23T05:03:31Z","body":"I'm well aware of the behavior you describe, it was an intentional design decsion to mimic bash instead of cmd as the cmd behavior is typically quite confusing when you're not quite sure where you are in history.\r\n\r\nIn Emacs mode, `Ctrl+o` is bound to `AcceptAndGetNext`, which is very nearly what you want. I suggest trying it, e.g. `Set-PSReadlineKeyHandler -Key Ctrl+o -Function AcceptAndGetNext` and then, instead of `Enter` then `DownArrow`, you instead just use `Ctrl+o`. You may find you prefer this - it's one less key, and you can still use `DownArrow` if you want something other than the immediate next command line."}}
{"actor":{"display_login":"lzybkr"}}