Alias for fish-shell #378

Closed
opened 2026-01-19 18:30:06 +00:00 by michael · 4 comments
Owner

Originally created by @awendland on GitHub.

I would like to add this function for fish-shell somewhere in the documentation, but I'm unsure as to where.

function transfer --description 'Upload a file to transfer.sh'
    if [ $argv[1] ]
        # write to output to tmpfile because of progress bar
        set -l tmpfile ( mktemp -t transferXXX )
        curl --progress-bar --upload-file $argv[1] https://transfer.sh/(basename $argv[1]) >> $tmpfile
        cat $tmpfile
        command rm -f $tmpfile
    else
        echo 'usage: transfer FILE_TO_TRANSFER'
    end
end
Originally created by @awendland on GitHub. I would like to add this function for [fish-shell](https://fishshell.com/) somewhere in the documentation, but I'm unsure as to where. ``` fish function transfer --description 'Upload a file to transfer.sh' if [ $argv[1] ] # write to output to tmpfile because of progress bar set -l tmpfile ( mktemp -t transferXXX ) curl --progress-bar --upload-file $argv[1] https://transfer.sh/(basename $argv[1]) >> $tmpfile cat $tmpfile command rm -f $tmpfile else echo 'usage: transfer FILE_TO_TRANSFER' end end ```
Author
Owner

@chopfitzroy commented on GitHub:

👍

@chopfitzroy commented on GitHub: :+1:
Author
Owner

@dbazuin commented on GitHub:

Works fine, thanks awendland.

@dbazuin commented on GitHub: Works fine, thanks awendland.
Author
Owner

@SimplyY commented on GitHub:

@awendland Thanks a lot!

I used it, it is very useful . I think it should be added in README.

My PR https://github.com/dutchcoders/transfer.sh/pull/46

@SimplyY commented on GitHub: @awendland Thanks a lot! I used it, it is very useful . I think it should be added in README. My PR https://github.com/dutchcoders/transfer.sh/pull/46
Author
Owner

@k0nsl commented on GitHub:

@awendland: see if you can have them add your fish-shell function here:
https://transfer.sh/#samples

@k0nsl commented on GitHub: @awendland: see if you can have them add your fish-shell function here: https://transfer.sh/#samples
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#378