Skip to content

GRC is still used inside functions and scripts (breaking other plugins or scripts) #27

@aarch-angel

Description

@aarch-angel

When functions or scripts use any command wrapped by this plugin, they use the wrapped version, not the original. Since this plugin wraps various common commands such as env, this can cause issues such as acomagu/fish-async-prompt#67.

Is it possible to check inside the wrapped function if it's being run directly in the terminal and not from another function? I tried something putting something like this in grc.fish but just couldn't get it to work:

for executable in $execs
    if type -q $executable
        function $executable --inherit-variable executable --wraps=$executable
             if test (status stack-trace | wc -l) -le 2
                grc.wrap $executable $argv
            else
                eval $executable $argv
            end
        end
    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions