joshua-redfield / lauf

A lightweight application and task launcher programmed in the shell scripting language. Lauf is no longer being updated or improved.
http://github.com/joshua-redfield/lauf
GNU General Public License v3.0
3 stars 0 forks source link

shell function "command" causing Lauf to stay open #26

Closed joshua-redfield closed 13 years ago

joshua-redfield commented 13 years ago

This strictly due to the "command" function. Basically what the script is telling the shell to do is spawn a subprocess of the command entered into Lauf. Which then we use this to check it's exit status for $lauf_exec_try. Unfortunately this is also keeping Lauf from closing until the process has ended, Which ironically doesn't allow you to open Lauf again because of the one instance code.

How to solve? Only thing I can think of is to use exec instead. Which is originally how Lauf worked before the $lauf_exec_try code was added. However, exec replaces it's current process ending the script before it has a chance to check the exit status for $lauf_exec_try. So if I fix this $lauf_exec_try will be broke. Ideas?

P.S This also affects the plugins/google.sh. Fortunately I can just change it to use exec instead.

joshua-redfield commented 13 years ago

Perhaps removing the tr line that changes uppercase chars to lowercase ones... Means things would become case sensitive though. I can always throw in a few basic checks(IE: check both lowercase and uppercase chars for only $lauf_exec1(command/plugin_name), Leave everything else up to the plugins. That way we can get rid of the $lauf_exec_try all together, and give us the option of being able to use exec again.

joshua-redfield commented 13 years ago

Fixed and Closed.