{"action":"closed","issue":{"url":"https://api.github.com/repos/neomutt/neomutt/issues/1287","repository_url":"https://api.github.com/repos/neomutt/neomutt","labels_url":"https://api.github.com/repos/neomutt/neomutt/issues/1287/labels{/name}","comments_url":"https://api.github.com/repos/neomutt/neomutt/issues/1287/comments","events_url":"https://api.github.com/repos/neomutt/neomutt/issues/1287/events","html_url":"https://github.com/neomutt/neomutt/issues/1287","id":339341697,"node_id":"MDU6SXNzdWUzMzkzNDE2OTc=","number":1287,"title":"Mailcap bash script not working as expected...","user":{"login":"kflak","id":13571232,"node_id":"MDQ6VXNlcjEzNTcxMjMy","avatar_url":"https://avatars2.githubusercontent.com/u/13571232?v=4","gravatar_id":"","url":"https://api.github.com/users/kflak","html_url":"https://github.com/kflak","followers_url":"https://api.github.com/users/kflak/followers","following_url":"https://api.github.com/users/kflak/following{/other_user}","gists_url":"https://api.github.com/users/kflak/gists{/gist_id}","starred_url":"https://api.github.com/users/kflak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kflak/subscriptions","organizations_url":"https://api.github.com/users/kflak/orgs","repos_url":"https://api.github.com/users/kflak/repos","events_url":"https://api.github.com/users/kflak/events{/privacy}","received_events_url":"https://api.github.com/users/kflak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-09T07:53:59Z","updated_at":"2018-07-09T09:40:25Z","closed_at":"2018-07-09T09:40:24Z","author_association":"NONE","body":"<!--\r\nSometimes NeoMutt can be quite confusing.\r\nWe're working on making it easier to understand.\r\n-->\r\n\r\nBefore asking a question, please check:\r\n\r\n- NeoMutt Guide: https://neomutt.org/guide/\r\n- Google:        https://www.google.com/\r\n\r\nHi,\r\n\r\nFirst time question here, so please bear with me if I am making a stupid or two... I am having trouble with getting a bash script working in mailcap.\r\n\r\nThis works in mailcap:\r\n`application/pdf; mkdir -p /tmp/neomutt-arch \\; rm /tmp/neomutt-arch/* \\; cp %s /tmp/neomutt-arch \\; zathura /tmp/neomutt-arch/$(basename %s) &`\r\n\r\nHowever, encapsulating the functionality in a bash script doesn't. The problem seems to be that the file is not copied to the tmp-directory...\r\n\r\n```\r\n#!/bin/bash\r\n\r\napplication=$1\r\nfile=$2\r\ntempdir=/tmp/neomutt-arch\r\nnewfile=$tempdir/$(basename $file)\r\nmkdir -p $tempdir\r\nrm -f $tempdir/*\r\ncp $file $newfile\r\n$application $newfile\r\n```\r\n\r\nand running it from mailcap:\r\n\r\n`application/pdf; attachmentlauncher.sh zathura %s &`\r\n\r\nI'm doing this on Arch Linux, latest versions of everything.\r\nAny thoughts on why this wouldn't work?\r\n\r\nBest,\r\nKenneth"}}
{"actor":{"display_login":"kflak"}}