{"action":"created","issue":{"url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/1","repository_url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras","labels_url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/1/comments","events_url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/1/events","html_url":"https://github.com/aaaaahaaaaa/fzf-extras/pull/1","id":366015340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Nzk0ODcz","number":1,"title":"Fix failing fbr and fstash commands on zsh","user":{"login":"benoittgt","id":8417720,"node_id":"MDQ6VXNlcjg0MTc3MjA=","avatar_url":"https://avatars3.githubusercontent.com/u/8417720?v=4","gravatar_id":"","url":"https://api.github.com/users/benoittgt","html_url":"https://github.com/benoittgt","followers_url":"https://api.github.com/users/benoittgt/followers","following_url":"https://api.github.com/users/benoittgt/following{/other_user}","gists_url":"https://api.github.com/users/benoittgt/gists{/gist_id}","starred_url":"https://api.github.com/users/benoittgt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoittgt/subscriptions","organizations_url":"https://api.github.com/users/benoittgt/orgs","repos_url":"https://api.github.com/users/benoittgt/repos","events_url":"https://api.github.com/users/benoittgt/events{/privacy}","received_events_url":"https://api.github.com/users/benoittgt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T18:06:15Z","updated_at":"2018-10-02T18:46:28Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/pulls/1","html_url":"https://github.com/aaaaahaaaaa/fzf-extras/pull/1","diff_url":"https://github.com/aaaaahaaaaa/fzf-extras/pull/1.diff","patch_url":"https://github.com/aaaaahaaaaa/fzf-extras/pull/1.patch"},"body":"See: https://github.com/atweiden/fzf-extras/pull/13\r\n\r\nThanks a lot for working on this. I love zsh and even if I'm not very good in shell I would love to have more script on zsh.\r\n\r\nI tried few functions in the PR and have comments\r\n\r\n### `fbr`\r\nI have issue using your `fbr`. Especially on this part\r\n```sh\r\n  branch=\"$(\r\n    echo \"$branches\" \\\r\n      | fzf-tmux -d \"$((2 + \"$num_branches\"))\" +m\r\n  )\"\r\nzsh: bad math expression: operand expected at `\"\"'\r\n```\r\n\r\nI have a working version I use all the time that is similar but uglier https://github.com/benoittgt/dotfiles_osx/blob/master/.zshrc#L43-L49\r\n\r\nMy proposal instead of https://github.com/atweiden/fzf-extras/issues/12#issue-354748802 is to remove the branch number.\r\n\r\n```diff\r\n--- a/fzf-extras.zsh\r\n+++ b/fzf-extras.zsh\r\n@@ -242,11 +242,9 @@ fbr() {\r\n       --format='%(refname:short)'\r\n   )\" || return\r\n\r\n-  num_branches=\"$(echo $(wc -l <<< \"$branches\") | xargs echo -n)\"\r\n-\r\n   branch=\"$(\r\n     echo \"$branches\" \\\r\n-      | fzf-tmux -d \"$((2 + $num_branches))\" +m\r\n+      | fzf-tmux +m\r\n   )\" || return\r\n```\r\n\r\n### `fstash`\r\n\r\nOn `fstash` when I type Enter I get:\r\n```\r\nfstash:15: command not found: mapfile\r\nh is not a valid reference\r\n```\r\nSo instead I use this version https://github.com/benoittgt/fzf-extras/commit/0b86b15f6f8783ce77e933dd4ee5065696074c33"},"comment":{"url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/comments/426387674","html_url":"https://github.com/aaaaahaaaaa/fzf-extras/pull/1#issuecomment-426387674","issue_url":"https://api.github.com/repos/aaaaahaaaaa/fzf-extras/issues/1","id":426387674,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjM4NzY3NA==","user":{"login":"aaaaahaaaaa","id":2808155,"node_id":"MDQ6VXNlcjI4MDgxNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2808155?v=4","gravatar_id":"","url":"https://api.github.com/users/aaaaahaaaaa","html_url":"https://github.com/aaaaahaaaaa","followers_url":"https://api.github.com/users/aaaaahaaaaa/followers","following_url":"https://api.github.com/users/aaaaahaaaaa/following{/other_user}","gists_url":"https://api.github.com/users/aaaaahaaaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/aaaaahaaaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaaaahaaaaa/subscriptions","organizations_url":"https://api.github.com/users/aaaaahaaaaa/orgs","repos_url":"https://api.github.com/users/aaaaahaaaaa/repos","events_url":"https://api.github.com/users/aaaaahaaaaa/events{/privacy}","received_events_url":"https://api.github.com/users/aaaaahaaaaa/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T18:46:28Z","updated_at":"2018-10-02T18:46:28Z","author_association":"OWNER","body":"`fbr` is still functioning with your changes, however `fstash` is not. I actually just realised it was already broken before.\r\n\r\n>fstash:15: command not found: mapfile\r\n>h is not a valid reference\r\n\r\nI'll merge your changes but I think it would be more relevant for you to open a new PR on @atweiden 's repo. I am by no mean a shell expert either and the purpose of the PR was only to update with the scripts I could test on my side."}}
{"actor":{"display_login":"aaaaahaaaaa"}}