Launch a shell script

Asked by rcspam

Hi,

Pehaps i miss something but if i want to launch a shell script from synapse, it open only it in editor.
Thanks for help.
Regards

Question information

Language:
English Edit question
Status:
Solved
For:
Synapse Edit question
Assignee:
No assignee Edit question
Solved by:
rcspam
Solved:
Last query:
Last reply:
Revision history for this message
Jeremy Munsch (jeremy-munsch) said :
#1

Well the file plugin is actually handling the request, pressing tab will show you options for it.
However the command plugin is responsible for providing exec.

Im not sure yet how to hack this or provide a better way of doing this. Maybe the file plugin could provide and option to execute the file.

This needs some thinking, if you have some ideas it would be welcome though.

Revision history for this message
rcspam (rcspam) said :
#2

Hi,
When we pass to application tab, it should be proposed to launch it. Perhaps in setting a path to explore personal scripts in preferences... I dont know really. I only was surprised synapse didn't launch my bash scripts which are set to be executable.

Regards

Revision history for this message
rcspam (rcspam) said :
#3

When we pass to application tab | sed 's/pass/switch'
.... sorry

Revision history for this message
Jeremy Munsch (jeremy-munsch) said :
#4

I have two more tricks, synapse is ignoring non hidden file (it handles it with file plugin), so hidden file should be handled to be executed.

Edit: just tested hidden file in home folder, it is not working

Also putting your scripts in /usr/bin is working the way you want. ex :

~/.supertest
  #!/bin/sh
  yad

sudo ln -s ~/.yad /usr/bin

Revision history for this message
Jeremy Munsch (jeremy-munsch) said :
#5

Sorry typo :

~/.supertest
  #!/bin/sh
  yad

sudo ln -s ~/.supertest /usr/bin

Then search supertest, it should allow you to run as command

Revision history for this message
rcspam (rcspam) said :
#6

I have lot of scripts, so create a link to /usr/bin for each is not a good solution...

Revision history for this message
Jeremy Munsch (jeremy-munsch) said :
#7

It is a matter of how synapse is handling results.
The current behaviours is the the file Plugin have priority over the application plugin.

So your i agree :

Desktop file plugin should have execute option when file is executable.
My guess is also that it should be executed by default by the fileplugin when it is executable.
But i'm still not sure if this would be wanted.

Maybe you could submit a blueprint so we could start from there to make this happen properly.

Revision history for this message
rcspam (rcspam) said :
#8

My guess is also that it should be executed by default by the fileplugin when it is executable. +1

Revision history for this message
Jeremy Munsch (jeremy-munsch) said :
#9

A fix is now commited
You can have it by using ppa:synapse-core/testing

Revision history for this message
rcspam (rcspam) said :
#10

Thanx, it works ! :)

It would be cool to have choice in the list: "execute or open".