Skip to content

Ultra Portable Scripts for fish #1204

Description

@davdroman

I really like this part of pkgx: https://docs.pkgx.sh/pkgx/scripting#ultra-portable-scripts

And while I do prefer writing bash for scripts, I use fish as my terminal shell.

So I'd like to be able to do the following when implementing my fish aliases/functions:

function xc
    eval "$(pkgx +aria2c@latest +xcodes@latest)" # whatever the equivalent of this is in fish

    if test (count $argv) -ge 2; and test $argv[1] = runtimes; and test $argv[2] = install
        sudo xcodes $argv
    else
        xcodes $argv
    end
end

Effectively, I want to be able to declare all my local function dependencies at the very top and not have to worry about how to invoke them throughout my implemention.

Is this feasable?

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions