{"action":"closed","issue":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/2346","repository_url":"https://api.github.com/repos/qutebrowser/qutebrowser","labels_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/2346/labels{/name}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/2346/comments","events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/2346/events","html_url":"https://github.com/qutebrowser/qutebrowser/issues/2346","id":209855707,"number":2346,"title":"Keybinding (or command) to alter current URL (or previous command) in a specified way","user":{"login":"brianbuccola","id":1738710,"avatar_url":"https://avatars.githubusercontent.com/u/1738710?v=3","gravatar_id":"","url":"https://api.github.com/users/brianbuccola","html_url":"https://github.com/brianbuccola","followers_url":"https://api.github.com/users/brianbuccola/followers","following_url":"https://api.github.com/users/brianbuccola/following{/other_user}","gists_url":"https://api.github.com/users/brianbuccola/gists{/gist_id}","starred_url":"https://api.github.com/users/brianbuccola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianbuccola/subscriptions","organizations_url":"https://api.github.com/users/brianbuccola/orgs","repos_url":"https://api.github.com/users/brianbuccola/repos","events_url":"https://api.github.com/users/brianbuccola/events{/privacy}","received_events_url":"https://api.github.com/users/brianbuccola/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-23T19:13:28Z","updated_at":"2017-02-23T19:18:11Z","closed_at":"2017-02-23T19:18:11Z","body":"I've been trying to use Duck Duck Go as my primary search engine, but sometimes Google's results are better. So, what happens is that I'll first search for *foo* on DDG...\r\n\r\n    :open foo ->\r\n    https://duckduckgo.com/?q=foo\r\n\r\n...and then I'll redo the same search on Google, usually by pressing `:<C-p>` to go back to my previous command, then moving leftward until my cursor is before `foo`, and then adding the [DDG bang](https://duckduckgo.com/bang) `!g`...\r\n\r\n    :open !g foo ->\r\n    https://encrypted.google.com/search?hl=en&q=foo\r\n\r\n...which is rather tedious.\r\n\r\n**Question:** Is there an easy way to automate this process --- either with a keybinding/command that adds `!g` to the previous command, or with a keybinding /command that adds `!g` to the DDG URL (in the right spot, of course)?\r\n\r\nI know that I can `edit-url` manually with my editor, but is there some way of automatically transforming\r\n\r\n    https://duckduckgo.com/?q=foo\r\n\r\ninto\r\n\r\n    https://duckduckgo.com/?q=!g+foo\r\n\r\n? (Note that appending `!g` to the very end of the URL is not a general solution because DDG often adds extra stuff like `&xy=bar`)."}}
{"actor":{"display_login":"The-Compiler"}}