{"action":"created","issue":{"url":"https://api.github.com/repos/anishathalye/dotbot/issues/57","repository_url":"https://api.github.com/repos/anishathalye/dotbot","labels_url":"https://api.github.com/repos/anishathalye/dotbot/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/anishathalye/dotbot/issues/57/comments","events_url":"https://api.github.com/repos/anishathalye/dotbot/issues/57/events","html_url":"https://github.com/anishathalye/dotbot/issues/57","id":119372944,"number":57,"title":"Platform specific link paths","user":{"login":"ToJa92","id":1049967,"avatar_url":"https://avatars.githubusercontent.com/u/1049967?v=3","gravatar_id":"","url":"https://api.github.com/users/ToJa92","html_url":"https://github.com/ToJa92","followers_url":"https://api.github.com/users/ToJa92/followers","following_url":"https://api.github.com/users/ToJa92/following{/other_user}","gists_url":"https://api.github.com/users/ToJa92/gists{/gist_id}","starred_url":"https://api.github.com/users/ToJa92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToJa92/subscriptions","organizations_url":"https://api.github.com/users/ToJa92/orgs","repos_url":"https://api.github.com/users/ToJa92/repos","events_url":"https://api.github.com/users/ToJa92/events{/privacy}","received_events_url":"https://api.github.com/users/ToJa92/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/anishathalye/dotbot/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-11-29T17:45:01Z","updated_at":"2016-06-29T22:49:55Z","closed_at":null,"body":"Hello, I've been using dotbot to manage my dotfiles for some time now.\r\nIt has worked great thus far, since most applications read from a common configuration directory on all platforms. Sublime Text however, uses different directories depending on what platform you're on.\r\n\r\nWould it be feasible to add support for different destination paths depending on your OS?\r\nIn Python there's `sys.platform` which contains a string representing the platform Python is running on.\r\n\r\nAs for configuration syntax, I'm not sure.\r\nYAML has a construct where you can map keys to values, [see example 2.6](http://www.yaml.org/spec/1.2/spec.html#id2759963), but since dotbot maps links \"the other way\", the syntax wouldn't make sense (and is syntactically incorrect):\r\n\r\n    - link:\r\n        {\r\n         linux: ~/.config/sublime-text-3,\r\n         darwin: ~/Library/Application Support/Sublime Text 3,\r\n         win32: ~/Sublime Text 3\r\n        }: Sublime Text 3/\r\n\r\nIf you flip the target and destination, I think it looks decent and you would still be able to configure links independently of the OS/platform. It would obviously break all existing configuration files, however.\r\n\r\n    - link:\r\n        Sublime Text 3/:\r\n          linux: ~/.config/sublime-text-3,\r\n          darwin: ~/Library/Application Support/Sublime Text 3,\r\n          win32: ~/Sublime Text 3\r\n        vim/: ~/.vim\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/anishathalye/dotbot/issues/comments/229512649","html_url":"https://github.com/anishathalye/dotbot/issues/57#issuecomment-229512649","issue_url":"https://api.github.com/repos/anishathalye/dotbot/issues/57","id":229512649,"user":{"login":"sjthespian","id":1789285,"avatar_url":"https://avatars.githubusercontent.com/u/1789285?v=3","gravatar_id":"","url":"https://api.github.com/users/sjthespian","html_url":"https://github.com/sjthespian","followers_url":"https://api.github.com/users/sjthespian/followers","following_url":"https://api.github.com/users/sjthespian/following{/other_user}","gists_url":"https://api.github.com/users/sjthespian/gists{/gist_id}","starred_url":"https://api.github.com/users/sjthespian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjthespian/subscriptions","organizations_url":"https://api.github.com/users/sjthespian/orgs","repos_url":"https://api.github.com/users/sjthespian/repos","events_url":"https://api.github.com/users/sjthespian/events{/privacy}","received_events_url":"https://api.github.com/users/sjthespian/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T22:49:55Z","updated_at":"2016-06-29T22:49:55Z","body":"I'll throw in another vote for this feature with a slight twist. It would be nice to not only be able to have os-specific links, but also install config files for some applications only on the systems that support them, for example only installing my hammerspoon config if I'm on a Mac.\r\n\r\nI think the config example above is along the lines of what I am thinking. If a platform isn't listed, the link won't be created on that platform and you would need a way to specify a default in some cases. for example:\r\n```yaml\r\n- link:\r\n  ~/.bashrc:\r\n    platforms:\r\n      - name: default\r\n        path: bashrc     \r\n      - name: debian\r\n        path: bashrc-debian   \r\n  ~/.hammerspoon:\r\n    platforms:\r\n      - name: darwin\r\n        path: hammerspoon\r\n```\r\n"}}
{"actor":{"display_login":"sjthespian"}}