{"action":"created","issue":{"url":"https://api.github.com/repos/DaveDavenport/rofi/issues/97","labels_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/97/comments","events_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/97/events","html_url":"https://github.com/DaveDavenport/rofi/issues/97","id":51801114,"number":97,"title":"Support for custom aliases and functions","user":{"login":"orschiro","id":170947,"avatar_url":"https://avatars.githubusercontent.com/u/170947?v=3","gravatar_id":"","url":"https://api.github.com/users/orschiro","html_url":"https://github.com/orschiro","followers_url":"https://api.github.com/users/orschiro/followers","following_url":"https://api.github.com/users/orschiro/following{/other_user}","gists_url":"https://api.github.com/users/orschiro/gists{/gist_id}","starred_url":"https://api.github.com/users/orschiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orschiro/subscriptions","organizations_url":"https://api.github.com/users/orschiro/orgs","repos_url":"https://api.github.com/users/orschiro/repos","events_url":"https://api.github.com/users/orschiro/events{/privacy}","received_events_url":"https://api.github.com/users/orschiro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-12-12T12:29:34Z","updated_at":"2015-01-07T09:07:17Z","closed_at":null,"body":"Hi there,\r\n\r\nI was almost able to replace dmenu with rofi except for one missing functionality.\r\n\r\nIn dmenu I can source and run custom aliases and functions. Basically, I created a file `~/.zsh_aliases` which contains all my custom aliases and functions. I am using it together with a small [script](https://github.com/orschiro/dmenu-scripts-collection/tree/master/dmenu-recent-aliases) that sources these aliases and functions and allows me to call them from dmenu. The advantage here is that I can also source the exactly same file in my shell rc file. \r\n\r\nWhat do you think about including support for custom aliases and functions into rofi and what would be the best approach to do that?\r\n\r\nThanks for your advice!\r\n\r\nRobert\r\n"},"comment":{"url":"https://api.github.com/repos/DaveDavenport/rofi/issues/comments/68995239","html_url":"https://github.com/DaveDavenport/rofi/issues/97#issuecomment-68995239","issue_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/97","id":68995239,"user":{"login":"orschiro","id":170947,"avatar_url":"https://avatars.githubusercontent.com/u/170947?v=3","gravatar_id":"","url":"https://api.github.com/users/orschiro","html_url":"https://github.com/orschiro","followers_url":"https://api.github.com/users/orschiro/followers","following_url":"https://api.github.com/users/orschiro/following{/other_user}","gists_url":"https://api.github.com/users/orschiro/gists{/gist_id}","starred_url":"https://api.github.com/users/orschiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orschiro/subscriptions","organizations_url":"https://api.github.com/users/orschiro/orgs","repos_url":"https://api.github.com/users/orschiro/repos","events_url":"https://api.github.com/users/orschiro/events{/privacy}","received_events_url":"https://api.github.com/users/orschiro/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T09:07:17Z","updated_at":"2015-01-07T09:07:17Z","body":"Many thanks for your dedicated help! Finally found a zsh-compatible solution.\r\n\r\n`zsh_aliases_functions.sh`:\r\n\r\n```\r\n# fetch all zsh aliases \r\nalias | awk -F'[ =]' '{print $1}'\r\n\r\n# fetch all zsh functions\r\n# http://superuser.com/questions/681575/any-way-to-get-list-of-functions-defined-in-zsh-like-alias-command-for-aliases\r\nprint -l ${(ok)functions}\r\n```\r\n\r\nFunction to call the menu in Openbox' `rc.xml`:\r\n\r\n```\r\n    <keybind key=\"A-F2\">\r\n      <action name=\"execute\">\r\n        <execute>rofi -run-list-command \". ~/Bin/zsh_aliases_functions.sh\" -run-command \"/bin/zsh -i -c '{cmd}'\" -rnow</execute>\r\n      </action>\r\n    </keybind>\r\n```\r\n\r\nWith this extra feature, rofi is close to perfect. :+1: "}}