{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1258","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1258/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1258/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1258/events","html_url":"https://github.com/fish-shell/fish-shell/issues/1258","id":26041425,"number":1258,"title":"Calling a fish function from a git alias fails","user":{"login":"dideler","id":497458,"avatar_url":"https://avatars.githubusercontent.com/u/497458?v=3","gravatar_id":"","url":"https://api.github.com/users/dideler","html_url":"https://github.com/dideler","followers_url":"https://api.github.com/users/dideler/followers","following_url":"https://api.github.com/users/dideler/following{/other_user}","gists_url":"https://api.github.com/users/dideler/gists{/gist_id}","starred_url":"https://api.github.com/users/dideler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dideler/subscriptions","organizations_url":"https://api.github.com/users/dideler/orgs","repos_url":"https://api.github.com/users/dideler/repos","events_url":"https://api.github.com/users/dideler/events{/privacy}","received_events_url":"https://api.github.com/users/dideler/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/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":428,"closed_issues":99,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-07-20T01:06:34Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2014-01-21T20:16:48Z","updated_at":"2015-07-21T09:40:05Z","closed_at":null,"body":"I have a fish function (`~/.config/fish/functions/git-clean.fish`) that I'm trying to call from a git alias set in my  `~/.gitconfig`.\r\n\r\nThe git alias is `rm-untracked = !fish -c 'git-clean'`.\r\n\r\nThe function works fine when called directly, calling it through the alias fails:\r\n\r\n```\r\n$ git rm-untracked  # Calling function through Git alias fails\r\nfish: Couldn't grab control of terminal\r\ntcsetpgrp: Interrupted system call\r\n\r\n$ git-clean  # Calling function directly works\r\nWould remove app/models/order.rb\r\nWould remove db/migrate/20140121194853_create_orders.rb\r\nWould remove test/factories/orders.rb\r\nWould remove test/models/order_test.rb\r\nContinue? [Yn]\r\n> y\r\nRemoving app/models/order.rb\r\nRemoving db/migrate/20140121194853_create_orders.rb\r\nRemoving test/factories/orders.rb\r\nRemoving test/models/order_test.rb\r\n```"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/123241875","html_url":"https://github.com/fish-shell/fish-shell/issues/1258#issuecomment-123241875","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1258","id":123241875,"user":{"login":"faho","id":5185367,"avatar_url":"https://avatars.githubusercontent.com/u/5185367?v=3","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T09:40:05Z","updated_at":"2015-07-21T09:40:05Z","body":"That's basically what zsh calls \"global aliases\", and it won't work with fish's current approach, which is to have `alias` as a shortcut to defining functions.\r\n\r\nI.e. that'd be a feature request, and not one that would be accepted, I think. Extending `abbr` might work, but that would then need a way to _not_ expand."}}