{"action":"created","issue":{"url":"https://api.github.com/repos/rpav/ScriptL/issues/6","repository_url":"https://api.github.com/repos/rpav/ScriptL","labels_url":"https://api.github.com/repos/rpav/ScriptL/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/rpav/ScriptL/issues/6/comments","events_url":"https://api.github.com/repos/rpav/ScriptL/issues/6/events","html_url":"https://github.com/rpav/ScriptL/issues/6","id":235933947,"number":6,"title":"[Questions] Script and run directories","user":{"login":"therockmandolinist","id":9020453,"avatar_url":"https://avatars3.githubusercontent.com/u/9020453?v=3","gravatar_id":"","url":"https://api.github.com/users/therockmandolinist","html_url":"https://github.com/therockmandolinist","followers_url":"https://api.github.com/users/therockmandolinist/followers","following_url":"https://api.github.com/users/therockmandolinist/following{/other_user}","gists_url":"https://api.github.com/users/therockmandolinist/gists{/gist_id}","starred_url":"https://api.github.com/users/therockmandolinist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therockmandolinist/subscriptions","organizations_url":"https://api.github.com/users/therockmandolinist/orgs","repos_url":"https://api.github.com/users/therockmandolinist/repos","events_url":"https://api.github.com/users/therockmandolinist/events{/privacy}","received_events_url":"https://api.github.com/users/therockmandolinist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-14T16:15:22Z","updated_at":"2017-06-14T16:24:33Z","closed_at":null,"body":"I was wondering:\r\n- Is there a way to create scripts elsewhere/at a specified directory (from inside lisp) ? (Some option to make-script I missed or something like that?)\r\n\r\n- Is there a way for scripts to have a notion of where they're being run? For a kinda dumb example, if I wrote:\r\n  ```\r\n  (defun my-ls ()\r\n    (format t (with-output-to-string (out)\r\n                (run-program \"/bin/ls\" '() :output out))))\r\n  \r\n  (scriptl:make-script \"ls\" 'my-ls)\r\n  \r\n  ```\r\n  Any calls to the ls script would only list the files where the script itself resides, not for the directory where the script is being called from."},"comment":{"url":"https://api.github.com/repos/rpav/ScriptL/issues/comments/308484531","html_url":"https://github.com/rpav/ScriptL/issues/6#issuecomment-308484531","issue_url":"https://api.github.com/repos/rpav/ScriptL/issues/6","id":308484531,"user":{"login":"rpav","id":1011983,"avatar_url":"https://avatars3.githubusercontent.com/u/1011983?v=3","gravatar_id":"","url":"https://api.github.com/users/rpav","html_url":"https://github.com/rpav","followers_url":"https://api.github.com/users/rpav/followers","following_url":"https://api.github.com/users/rpav/following{/other_user}","gists_url":"https://api.github.com/users/rpav/gists{/gist_id}","starred_url":"https://api.github.com/users/rpav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpav/subscriptions","organizations_url":"https://api.github.com/users/rpav/orgs","repos_url":"https://api.github.com/users/rpav/repos","events_url":"https://api.github.com/users/rpav/events{/privacy}","received_events_url":"https://api.github.com/users/rpav/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T16:24:33Z","updated_at":"2017-06-14T16:24:33Z","body":"Actually they should not; when scripts get called in, `*default-pathname-defaults*` should be bound to the caller's cwd.  This should be enough for anything inside the lisp, using `merge-pathnames`, but you may want to pass it on to things like `run-program`, where it's unfortunate `*default-pathname-defaults*` isn't the default."}}
{"actor":{"display_login":"rpav"}}