Skip to content

Run executables #12

Description

@onuronsekiz

I tried various ways but couldn't achieve it.
There are appimages or scripts I use which have chmod+x.
My goal is this, prompt_open() shell check if file is executable.
If it is, it will run. Else, xdg-open will open it. But no success so far.
Do you have any idea how to do it? Or is it even possible?

prompt_open() {
if [ -x "$target" ]; then
    cmd() { $target; };
else
    if [ -x "$(command -v sesame)" ]; then cmd() { xargs sesame; }
    else cmd() { xargs xdg-open; }; fi
fi
prompt_base "$@"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions