{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/967","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/967/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/967/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/967/events","html_url":"https://github.com/fish-shell/fish-shell/issues/967","id":18370576,"number":967,"title":"Wildcard problem with wget","user":{"login":"mrshu","id":461491,"avatar_url":"https://avatars.githubusercontent.com/u/461491?v=3","gravatar_id":"","url":"https://api.github.com/users/mrshu","html_url":"https://github.com/mrshu","followers_url":"https://api.github.com/users/mrshu/followers","following_url":"https://api.github.com/users/mrshu/following{/other_user}","gists_url":"https://api.github.com/users/mrshu/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshu/subscriptions","organizations_url":"https://api.github.com/users/mrshu/orgs","repos_url":"https://api.github.com/users/mrshu/repos","events_url":"https://api.github.com/users/mrshu/events{/privacy}","received_events_url":"https://api.github.com/users/mrshu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/7","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/7/labels","id":339734,"number":7,"title":"next-major","description":"Fixes for the next major release.\r\n\r\nFixes that break backward compatibility must be targeted to this release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":61,"closed_issues":2,"state":"open","created_at":"2013-05-22T20:34:40Z","updated_at":"2015-01-22T06:16:17Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2013-08-21T18:06:00Z","updated_at":"2015-01-28T13:25:00Z","closed_at":null,"body":"I've just ran into this:\r\n```\r\n$ wget https://addons.mozilla.org/firefox/downloads/latest/161972/addon-161972-latest.xml?src=search\r\nfish: No matches for wildcard 'https://addons.mozilla.org/firefox/downloads/latest/161972/addon-161972-latest.xml?src=search'.\r\nwget https://addons.mozilla.org/firefox/downloads/latest/161972/addon-161972-latest.xml?src=search\r\n     ^\r\n```\r\n\r\nIt's obvious that '?' causes this but why is the caret at the beginning of the argument? Maybe it would be worth it finding the wildcard and putting the caret below that?  "},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/71833854","html_url":"https://github.com/fish-shell/fish-shell/issues/967#issuecomment-71833854","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/967","id":71833854,"user":{"login":"maxnordlund","id":664779,"avatar_url":"https://avatars.githubusercontent.com/u/664779?v=3","gravatar_id":"","url":"https://api.github.com/users/maxnordlund","html_url":"https://github.com/maxnordlund","followers_url":"https://api.github.com/users/maxnordlund/followers","following_url":"https://api.github.com/users/maxnordlund/following{/other_user}","gists_url":"https://api.github.com/users/maxnordlund/gists{/gist_id}","starred_url":"https://api.github.com/users/maxnordlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxnordlund/subscriptions","organizations_url":"https://api.github.com/users/maxnordlund/orgs","repos_url":"https://api.github.com/users/maxnordlund/repos","events_url":"https://api.github.com/users/maxnordlund/events{/privacy}","received_events_url":"https://api.github.com/users/maxnordlund/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T13:25:00Z","updated_at":"2015-01-28T13:25:00Z","body":"I've recently encountered this problem as well. I've been trying to come up with a good solution that fits into the design philosophy of fish and after reading through some of the linked issues this seams indeed very hard.\r\n\r\nBut then I thought, why not allow a user defined function to modify pasted text before it is inserted? Basically something that is called when the user pastes something, and it's output would be what's inserted. This would make any escaping clearly visible, and allow the user to apply any escaping she might desire.\r\n\r\nTo make this easier fish should probably ship a couple of example implementations, but probably not actually enable any by default, since that might be too surprising for the user.\r\n\r\n---\r\nIf for example the clipboard contains the string `https://www.example.com/wiki/index.php?page=About` this could be one way of doing it:\r\n```fish\r\n~$ wget <C^p>\r\n~$ wget https://www.example.com/wiki/index.php\\?page=About\r\n```\r\n\r\nAnother way would be to always wrap any pasted text in quotes, and might be good default behaviour:\r\n```fish\r\n~$ wget <C^p>\r\n~$ wget \"https://www.example.com/wiki/index.php?page=About\"\r\n```\r\n "}}