Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ultra Portable Scripts for fish #1204

Open
@davdroman

Description

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?

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

        AltStyle によって変換されたページ (->オリジナル) /