{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1827","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1827/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1827/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1827/events","html_url":"https://github.com/fish-shell/fish-shell/issues/1827","id":49987668,"number":1827,"title":"Feature Request: Print natively syntax-highlighted code to stdout.","user":{"login":"geoff-codes","id":3162811,"avatar_url":"https://avatars.githubusercontent.com/u/3162811?v=3","gravatar_id":"","url":"https://api.github.com/users/geoff-codes","html_url":"https://github.com/geoff-codes","followers_url":"https://api.github.com/users/geoff-codes/followers","following_url":"https://api.github.com/users/geoff-codes/following{/other_user}","gists_url":"https://api.github.com/users/geoff-codes/gists{/gist_id}","starred_url":"https://api.github.com/users/geoff-codes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoff-codes/subscriptions","organizations_url":"https://api.github.com/users/geoff-codes/orgs","repos_url":"https://api.github.com/users/geoff-codes/repos","events_url":"https://api.github.com/users/geoff-codes/events{/privacy}","received_events_url":"https://api.github.com/users/geoff-codes/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":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/9","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/9/labels","id":462599,"number":9,"title":"next-minor","description":"the next minor release of fish (2.2)","creator":{"login":"zanchey","id":520741,"avatar_url":"https://avatars.githubusercontent.com/u/520741?v=3","gravatar_id":"","url":"https://api.github.com/users/zanchey","html_url":"https://github.com/zanchey","followers_url":"https://api.github.com/users/zanchey/followers","following_url":"https://api.github.com/users/zanchey/following{/other_user}","gists_url":"https://api.github.com/users/zanchey/gists{/gist_id}","starred_url":"https://api.github.com/users/zanchey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanchey/subscriptions","organizations_url":"https://api.github.com/users/zanchey/orgs","repos_url":"https://api.github.com/users/zanchey/repos","events_url":"https://api.github.com/users/zanchey/events{/privacy}","received_events_url":"https://api.github.com/users/zanchey/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":240,"state":"open","created_at":"2013-10-23T13:44:11Z","updated_at":"2014-12-28T15:15:10Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2014-11-25T08:13:30Z","updated_at":"2015-01-14T12:18:03Z","closed_at":"2014-12-28T08:43:57Z","body":"I feel like there _must_ already be a way to do this, but I just can't figure it out.\r\n\r\nWhat I'd like to do is have a function, lets call it, um, `catfish`, which will print an arbitrary snippet of syntax-highlighted fish code (from file, or from stdin) _to stdout_, escape-sequences and all, so that if I redirect it to `file` and later `cat file`, it will be syntax-highlighted. (If you have pygments installed, this is basically the exact same functionality as `pygmentize -g [-f 256]`, but for fish syntax, of course.)\r\n\r\nI know there's functionality close to this already — `commandline (cat script.fish)`, `funced` — but for my life I can't figure out how to trick it into redirecting to a fd or file. \r\n\r\nIs this possible?"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/69908349","html_url":"https://github.com/fish-shell/fish-shell/issues/1827#issuecomment-69908349","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1827","id":69908349,"user":{"login":"geoff-codes","id":3162811,"avatar_url":"https://avatars.githubusercontent.com/u/3162811?v=3","gravatar_id":"","url":"https://api.github.com/users/geoff-codes","html_url":"https://github.com/geoff-codes","followers_url":"https://api.github.com/users/geoff-codes/followers","following_url":"https://api.github.com/users/geoff-codes/following{/other_user}","gists_url":"https://api.github.com/users/geoff-codes/gists{/gist_id}","starred_url":"https://api.github.com/users/geoff-codes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoff-codes/subscriptions","organizations_url":"https://api.github.com/users/geoff-codes/orgs","repos_url":"https://api.github.com/users/geoff-codes/repos","events_url":"https://api.github.com/users/geoff-codes/events{/privacy}","received_events_url":"https://api.github.com/users/geoff-codes/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T12:18:03Z","updated_at":"2015-01-14T12:18:03Z","body":"Forgot to say thanks for this!"}}