{"action":"created","issue":{"url":"https://api.github.com/repos/Russell91/sshrc/issues/72","repository_url":"https://api.github.com/repos/Russell91/sshrc","labels_url":"https://api.github.com/repos/Russell91/sshrc/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/Russell91/sshrc/issues/72/comments","events_url":"https://api.github.com/repos/Russell91/sshrc/issues/72/events","html_url":"https://github.com/Russell91/sshrc/issues/72","id":168698846,"number":72,"title":"Execute command (or, generalizing: support profiles)","user":{"login":"memeplex","id":2845433,"avatar_url":"https://avatars.githubusercontent.com/u/2845433?v=3","gravatar_id":"","url":"https://api.github.com/users/memeplex","html_url":"https://github.com/memeplex","followers_url":"https://api.github.com/users/memeplex/followers","following_url":"https://api.github.com/users/memeplex/following{/other_user}","gists_url":"https://api.github.com/users/memeplex/gists{/gist_id}","starred_url":"https://api.github.com/users/memeplex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memeplex/subscriptions","organizations_url":"https://api.github.com/users/memeplex/orgs","repos_url":"https://api.github.com/users/memeplex/repos","events_url":"https://api.github.com/users/memeplex/events{/privacy}","received_events_url":"https://api.github.com/users/memeplex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-01T17:29:31Z","updated_at":"2016-08-03T21:05:12Z","closed_at":null,"body":"I use ssh to execute remote psql shells: `ssh -t myserver psql ...`. I would like to configure readline using sshrc to upload my .inputrc. But sshrc expands `$@` *before* doing its stuff, which is usually fine because `$@` will consist of host information and ssh options, not remote commands. Do you think adding the possibility of executing a command *after* setting the remote environment will be worth the extra complexity in the cli?\r\n\r\nA more general approach, akin to the way sshrc currently copes with per-server profiles, is to execute sshrc like `SSHRCPROFILE=psql sshrc myserver` where `SSHRCPROFILE` will be propagated to the remote environment thus allowing .sshrc to act according not only to a hostname or another bit of information characterizing the remote host but also to some state (the profile) established while launching it.\r\n\r\nI think this second approach is simple to implement and very flexible."},"comment":{"url":"https://api.github.com/repos/Russell91/sshrc/issues/comments/237373352","html_url":"https://github.com/Russell91/sshrc/issues/72#issuecomment-237373352","issue_url":"https://api.github.com/repos/Russell91/sshrc/issues/72","id":237373352,"user":{"login":"memeplex","id":2845433,"avatar_url":"https://avatars.githubusercontent.com/u/2845433?v=3","gravatar_id":"","url":"https://api.github.com/users/memeplex","html_url":"https://github.com/memeplex","followers_url":"https://api.github.com/users/memeplex/followers","following_url":"https://api.github.com/users/memeplex/following{/other_user}","gists_url":"https://api.github.com/users/memeplex/gists{/gist_id}","starred_url":"https://api.github.com/users/memeplex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memeplex/subscriptions","organizations_url":"https://api.github.com/users/memeplex/orgs","repos_url":"https://api.github.com/users/memeplex/repos","events_url":"https://api.github.com/users/memeplex/events{/privacy}","received_events_url":"https://api.github.com/users/memeplex/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T21:05:11Z","updated_at":"2016-08-03T21:05:11Z","body":"I'm not sure I'm following you but the command argument doesn't sit next to `-t`. Finding the command implies a more complex parsing of the command line. I like the profile approach most, first because of its generality, second because of its consistency with what sshrc currently does in order to target different servers, third because the environment variable approach avoids having to parse the complex command line of ssh."}}
{"actor":{"display_login":"memeplex"}}