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

$lauf_exec_try doesn't work #15

Closed joshua-redfield closed 13 years ago

joshua-redfield commented 13 years ago

When you first submitted this bug fix, I assumed it worked. When I tested it seemed to work, However, It seems that the command I tested it with accepted both lowercase and uppercase arguments.man -V should technically work assuming your bug fix works. Unfortunately it doesn't. Running Lauf in debug mode shows that Lauf never even tries to execute your $lauf_exec_try mainly because of the elif type "$lauf_exec1" statement above.

somasis commented 13 years ago

perhaps a way to strip out everything after a space? it could be pretty effective to get rid of the arguements, perhaps.

joshua-redfield commented 13 years ago

Not sure what you mean by that, if you only want the command and none of the arguments just check against $lauf_exec1 instead of $lauf_exec. Not sure how that would solve anything though. The reasoning for Lauf converting all capital letters to lowercase ones in simple. Lauf and it's plugins are quite case sensitive, So instead of programming in each and every possible combination of arguments, I simply forced everything to be lowercase.

joshua-redfield commented 13 years ago

I still think the solution would be to check the exit status of the command. For example: if [ $? = "1" ]; then exec $lauf_exec_try fi I know this works, I've already tested it. I'm just not sure if this would be the best way of going about it. I've had some problems with my internet lately so I haven't had much time to research more.

joshua-redfield commented 13 years ago

Fixed and closed.