Skip to content

Add infisical run -- automatically based on command prefixes #292

Description

@wellermiranda

Instead of

infisical run -- npm run dev

I could just run

npm run dev

How I made it work on ZSH

infisical-wrap-widget() {
    local prefixes=(npm pnpm bun node)
    local first_word="${BUFFER%% *}"
    for p in $prefixes; do
        if [[ "$first_word" == "$p" ]]; then
            BUFFER="infisical run -- $BUFFER"
            break
        fi
    done
    zle .accept-line
}

zle -N accept-line infisical-wrap-widget

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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