Jump to content
cullenskink

[SOLVED] Run a terminal command in background

Recommended Posts

Fundamentally I am looking to do what I can do with Action:Terminal command  (eg run scripts with my normal login environment) in the way that Action:Run script executes in the background without grabbing focus or dumping commands into my existing terminal.    

 

Can anyone help with this?

 

P

 

Edited by cullenskink
solved

Share this post


Link to post

You need to source your shell's configuration files from your script then. You may also need to start a shell yourself in interactive mode or edit your config files so the necessary bits are also loaded in non-interactive mode.

Share this post


Link to post

That is the bomb.  

 

If anyone else is looking for details, I have included the contents of my "Actions|Run script"  here. I use Zsh.  

 

source ~/.zshrc

#echo $HOME

pbpaste | marked | pbcopy
echo "converted"

 

#end of script  

 

The pbpaste...  converts plain text to markup, which is something I do a lot of.   So anyone else just needs to put their bit where that line is.  

 

Thanks deanishe

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...