{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2014","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2014/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2014/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2014/events","html_url":"https://github.com/fish-shell/fish-shell/issues/2014","id":66717746,"number":2014,"title":"Add forward-kill-arg and backward-kill-arg","user":{"login":"jonhoo","id":176295,"avatar_url":"https://avatars.githubusercontent.com/u/176295?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhoo","html_url":"https://github.com/jonhoo","followers_url":"https://api.github.com/users/jonhoo/followers","following_url":"https://api.github.com/users/jonhoo/following{/other_user}","gists_url":"https://api.github.com/users/jonhoo/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhoo/subscriptions","organizations_url":"https://api.github.com/users/jonhoo/orgs","repos_url":"https://api.github.com/users/jonhoo/repos","events_url":"https://api.github.com/users/jonhoo/events{/privacy}","received_events_url":"https://api.github.com/users/jonhoo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestones/fish-future","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are bugs that are not targeted for an upcoming release. After a release, we will reexamine these bugs and pull any in that we think are good targets.\r\n\r\nIf you can provide a fix for a bug in this milestone, we'll generally accept it for the next release even if the bug is not in the 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":409,"closed_issues":72,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-04-07T05:52:13Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-04-06T22:13:33Z","updated_at":"2015-04-07T15:43:23Z","closed_at":null,"body":"The `Alt+<backspace>` (kill last word) and `Ctrl+W` (kill last path component) family of keyboard shortcuts are very useful, particularly when editing previously issued commands, as they allow deleting chunks of command-line parameters faster than character-by-character. Beneath the hood, they are implementing using the forward/backward-kill-* functions, and in particular, `*-kill-path-component`. However, in many cases, it would be very convenient to have a keyboard shortcut for killing an entire argument. For example, given the following input with the cursor at the end:\r\n\r\n    $ ls I\\ am\\ a\\ file\r\n\r\npressing `Ctrl+W` will delete `\" file\"`, but *not* all of `\"I am a file\"`, which is what you might often want. In this particular example, one might argue that it's really the code for kill-path-component that is wrong in that it does not correctly kill the last path component either (`Alt+<backspace>` will, as its underlying command implies, correctly kill the last *word*). However, the same behaviour happens when there aren't spaces:\r\n\r\n    $ mplayer --no-video music/a.mp3\r\n\r\npressing `Ctrl+W` here will correctly delete `a.mp3`, but there is no shortcut for deleting the entire last argument. This can in many cases be useful when you have a complicated command invocation where there's a a single (but potentially long) argument that you want to change.\r\n\r\nI propose another variation of the *-kill-* commands should be added, namely `forward-kill-arg` and `backward-kill-arg`, that delete the next and previous *argument* respectively. In particular, in the above examples, `backward-kill-arg` would kill `I am file` and `music/a.mp3`. I'm not sure what a good shortcut would be for this (nor whether one should necessarily be provided by default), but it certainly seems like a useful feature!"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/90613898","html_url":"https://github.com/fish-shell/fish-shell/issues/2014#issuecomment-90613898","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2014","id":90613898,"user":{"login":"snnw","id":188580,"avatar_url":"https://avatars.githubusercontent.com/u/188580?v=3","gravatar_id":"","url":"https://api.github.com/users/snnw","html_url":"https://github.com/snnw","followers_url":"https://api.github.com/users/snnw/followers","following_url":"https://api.github.com/users/snnw/following{/other_user}","gists_url":"https://api.github.com/users/snnw/gists{/gist_id}","starred_url":"https://api.github.com/users/snnw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snnw/subscriptions","organizations_url":"https://api.github.com/users/snnw/orgs","repos_url":"https://api.github.com/users/snnw/repos","events_url":"https://api.github.com/users/snnw/events{/privacy}","received_events_url":"https://api.github.com/users/snnw/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T15:43:23Z","updated_at":"2015-04-07T15:43:23Z","body":"Thank you for filing the separate bug.  Let's focus on the \"kill entire\nargument/path\" use-case here.\n\nOn Tue, 7 Apr 2015 at 16:55 Jon Gjengset <notifications@github.com> wrote:\n\n> Reported in #2016 <https://github.com/fish-shell/fish-shell/issues/2016>.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/fish-shell/fish-shell/issues/2014#issuecomment-90594695>\n> .\n>\n"}}