{"action":"opened","issue":{"url":"https://api.github.com/repos/koalaman/shellcheck/issues/286","labels_url":"https://api.github.com/repos/koalaman/shellcheck/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/koalaman/shellcheck/issues/286/comments","events_url":"https://api.github.com/repos/koalaman/shellcheck/issues/286/events","html_url":"https://github.com/koalaman/shellcheck/issues/286","id":54679560,"number":286,"title":"escape string in function call with trap","user":{"login":"wangjoshuah","id":5353594,"avatar_url":"https://avatars.githubusercontent.com/u/5353594?v=3","gravatar_id":"","url":"https://api.github.com/users/wangjoshuah","html_url":"https://github.com/wangjoshuah","followers_url":"https://api.github.com/users/wangjoshuah/followers","following_url":"https://api.github.com/users/wangjoshuah/following{/other_user}","gists_url":"https://api.github.com/users/wangjoshuah/gists{/gist_id}","starred_url":"https://api.github.com/users/wangjoshuah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangjoshuah/subscriptions","organizations_url":"https://api.github.com/users/wangjoshuah/orgs","repos_url":"https://api.github.com/users/wangjoshuah/repos","events_url":"https://api.github.com/users/wangjoshuah/events{/privacy}","received_events_url":"https://api.github.com/users/wangjoshuah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-17T23:23:18Z","updated_at":"2015-01-17T23:23:18Z","closed_at":null,"body":"when we use trap, you need to add escape strings to call the function or some internal commands won't work (for loops for example)\r\n\r\nso instead of \r\n\r\ntrap function_name SIGUSR1\r\n\r\nyou need to put\r\n\r\ntrap 'function_name' SIGUSR1\r\n\r\nI was using #!/bin/bash"}}