Compare commits

..

No commits in common. "master" and "v0.2.62" have entirely different histories.

47 changed files with 1593 additions and 2195 deletions

View file

@ -39,7 +39,7 @@ before_script:
rustc --version
cargo --version
# Check on stable, beta and nightly
# Check on stable, beta and nightly
.check-base: &check-base
stage: check
script:
@ -64,15 +64,16 @@ check-nightly:
<<: *check-base
variables:
RUST_VERSION: nightly
check-msrv:
check-old:
<<: *check-base
variables:
RUST_VERSION: "1.63.0"
RUST_VERSION: "1.39.0"
# Build using Rust stable
build-x86_64-linux-gnu:
stage: build
needs: []
needs:
- check-stable
script:
- cargo build --target=$RUST_TARGET --release --verbose
- mv target/$RUST_TARGET/release/ffsend ./ffsend-$RUST_TARGET
@ -86,7 +87,8 @@ build-x86_64-linux-gnu:
# Build a static version
build-x86_64-linux-musl:
stage: build
needs: []
needs:
- check-stable
variables:
RUST_TARGET: x86_64-unknown-linux-musl
script:
@ -95,10 +97,10 @@ build-x86_64-linux-musl:
# Build OpenSSL statically
- apt-get install -y build-essential wget musl-tools
- wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1k.tar.gz
- tar xzvf openssl-1.1.1k.tar.gz
- cd openssl-1.1.1k
- ./config no-async -fPIC --openssldir=/usr/local/ssl --prefix=/usr/local
- wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2o.tar.gz
- tar xzvf openssl-1.0.2o.tar.gz
- cd openssl-1.0.2o
- ./config -fPIC --openssldir=/usr/local/ssl --prefix=/usr/local
- make
- make install
- cd ..
@ -122,7 +124,8 @@ build-x86_64-linux-musl:
# Run the unit tests through Cargo
test-cargo:
stage: test
needs: []
needs:
- check-stable
dependencies: []
script:
- cargo test --verbose
@ -188,7 +191,7 @@ release-snap:
# Publish snap package
- echo "Publishing snap package..."
- echo "$SNAPCRAFT_LOGIN" | base64 -d > snapcraft.login
- snapcraft whoami
- snapcraft login --with snapcraft.login
- snapcraft push --release=stable ffsend_*_amd64.snap
artifacts:
name: ffsend-snap-x86_64
@ -256,7 +259,7 @@ release-docker:
# AUR packages release
package-aur:
image: archlinux
image: archlinux/base
stage: package
needs:
- release-github
@ -301,7 +304,7 @@ package-aur:
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend/PKGBUILD
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD
- sed "s/^pkgver=.*\$/pkgver=$VERSION.$CI_COMMIT_SHORT_SHA/" -i ffsend-git/PKGBUILD
- sed "s/^source=(\".*\").*\$/source=(\"$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i ffsend/PKGBUILD
- sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i ffsend/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver::\).*\"/\1$(echo $URL_BIN | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.bash::\).*\"/\1$(echo $URL_BASH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"ffsend-v\$pkgver.zsh::\).*\"/\1$(echo $URL_ZSH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD

View file

@ -18,7 +18,7 @@ Contributions to the `ffsend` project are welcome!
When contributing new features, alternative implementations or bigger
improvements, please first discuss the change you wish to make via an issue
or email.
Small changes such as fixed commands, fixed spelling or dependency updates
Small changes such as fixed commands, fixed spelling or dependency updates
are always welcome without discussion.
The `ffsend` repository is primarily hosted on [GitLab][gitlab].
@ -115,11 +115,11 @@ members of the project's leadership.
### Attribution
This Code of Conduct is adapted from the [Contributor Covenant][coc-homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][coc-version]
available at [http://contributor-covenant.org/version/1/4][coc-version]
## License
This project is released under the GNU GPL-3.0 license.
Check out the [LICENSE](LICENSE) file for more information.
Check out the [LICENSE](LICENSE) file for more information.
[branch-master]: https://gitlab.com/timvisee/ffsend/tree/master
[gitlab]: https://gitlab.com/timvisee/ffsend
@ -128,5 +128,5 @@ Check out the [LICENSE](LICENSE) file for more information.
[github]: https://github.com/timvisee/ffsend
[github-issues]: https://github.com/timvisee/ffsend/issues
[github-pr]: https://github.com/timvisee/ffsend/pulls
[coc-homepage]: https://contributor-covenant.org
[coc-version]: https://contributor-covenant.org/version/1/4/
[coc-homepage]: http://contributor-covenant.org
[coc-version]: http://contributor-covenant.org/version/1/4/

2979
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,6 @@
[package]
name = "ffsend"
version = "0.2.76"
rust-version = "1.63.0"
version = "0.2.62"
authors = ["Tim Visee <3a4fb3964f@sinenomine.email>"]
license = "GPL-3.0"
readme = "README.md"
@ -9,7 +8,7 @@ homepage = "https://timvisee.com/projects/ffsend"
repository = "https://gitlab.com/timvisee/ffsend"
description = """\
Easily and securely share files from the command line.\n\
A fully featured Send client.\
A fully featured Firefox Send client.\
"""
keywords = ["send", "firefox", "cli"]
categories = [
@ -50,12 +49,24 @@ license-file = ["LICENSE", "3"]
depends = "$auto, libssl1.1, ca-certificates, xclip"
maintainer-scripts = "pkg/deb"
[badges]
gitlab = { repository = "timvisee/ffsend", branch = "master" }
[[bin]]
name = "ffsend"
path = "src/main.rs"
[features]
default = ["archive", "clipboard", "crypto-ring", "history", "infer-command", "qrcode", "send3", "urlshorten"]
default = [
"archive",
"clipboard",
"crypto-ring",
"history",
"infer-command",
"qrcode",
"send3",
"urlshorten",
]
# Compile with file archiving support
archive = ["tar"]
@ -66,10 +77,10 @@ clipboard = ["clip", "which"]
# Compile with file history support
history = []
# Support for Send v2
# Support for Firefox Send v2
send2 = ["ffsend-api/send2"]
# Support for Send v3
# Support for Firefox Send v3
send3 = ["ffsend-api/send3"]
# Use OpenSSL as cryptography backend
@ -97,35 +108,35 @@ clipboard-bin = ["clipboard"]
clipboard-crate = ["clipboard"]
[dependencies]
chbs = "0.1.0"
chbs = "0.0.10"
chrono = "0.4"
clap = "2.33"
colored = "2.0"
derive_builder = "0.10"
directories = "4.0"
colored = "1.9"
derive_builder = "0.9"
directories = "2.0"
failure = "0.1"
ffsend-api = { version = "0.7.3", default-features = false }
ffsend-api = { version = "0.6", default-features = false }
fs2 = "0.4"
lazy_static = "1.4"
open = "2"
open = "1"
openssl-probe = "0.1"
pathdiff = "0.2"
pbr = "1"
prettytable-rs = { version = "0.10.0", default-features = false }
prettytable-rs = "0.8"
qr2term = { version = "0.2", optional = true }
rand = "0.8"
regex = "1.5"
rpassword = "5"
rand = "0.7"
regex = "1.3"
rpassword = "4"
serde = "1"
serde_derive = "1"
tar = { version = "0.4", optional = true }
tempfile = "3"
toml = "0.5"
urlshortener = { version = "3", optional = true }
version-compare = "0.1"
version-compare = "0.0.10"
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))'.dependencies]
which = { version = "4.0", optional = true }
which = { version = "3.1", optional = true }
[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd")))'.dependencies]
# Aliased to clip to prevent name collision with clipboard feature

View file

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

109
README.md
View file

@ -8,19 +8,15 @@
[gitlab-ci-link]: https://gitlab.com/timvisee/ffsend/pipelines
[gitlab-ci-master-badge]: https://gitlab.com/timvisee/ffsend/badges/master/pipeline.svg
*Notice: the default Send host is provided by [@timvisee][timvisee]
([info](https://gitlab.com/timvisee/ffsend/-/issues/111)).
Please consider to [donate] and help keep it running.*
# ffsend
> Easily and securely share files from the command line.
> A [Send][send] client.
> A fully featured [Firefox Send][send] client.
Easily and securely share files and directories from the command line through a
safe, private and encrypted link using a single simple command.
Files are shared using the [Send][send] service and may be up
to 1GB. Others are able to download these files with this tool, or through
to 1GB (2.5GB authenticated). Others are able to download these files with this tool, or through
their web browser.
[![ffsend usage demo][usage-demo-svg]][usage-demo-asciinema]
@ -45,9 +41,9 @@ Find out more about security [here](#security).
- [License](#license)
The public [Send][send] service that is used as default host is provided by
[@timvisee][timvisee] ([info](https://gitlab.com/timvisee/ffsend/-/issues/111)).
This application is not affiliated with [Firefox][firefox] or
[Mozilla][mozilla] in any way.
[Mozilla][mozilla].
This application is not affiliated with [Mozilla][mozilla], [Firefox][firefox]
or [Firefox Send][send] in any way.
_Note: this tool is currently in beta, as some extra desired features are yet to be implemented_
@ -57,7 +53,7 @@ _Note: this tool is currently in beta, as some extra desired features are yet to
- Additional password protection, generation and configurable download limits
- File and directory archiving and extraction
- Built-in share URL shortener and QR code generator
- Supports Send v3 (current) and v2
- Supports Firefox Send v3 (current) and v2
- History tracking your files for easy management
- Ability to use your own Send hosts
- Inspect or delete shared files
@ -74,7 +70,7 @@ Easily upload and download:
```bash
# Simple upload
$ ffsend upload my-file.txt
https://send.vis.ee/#sample-share-url
https://send.firefox.com/#sample-share-url
# Advanced upload
# - Specify a download limit of 1
@ -85,25 +81,25 @@ https://send.vis.ee/#sample-share-url
# - Open the shareable link in your browser
$ ffsend upload --downloads 1 --expiry-time 5m --password --archive --copy --open my-file.txt
Password: ******
https://send.vis.ee/#sample-share-url
https://send.firefox.com/#sample-share-url
# Upload to your own host
$ ffsend u -h https://example.com/ my-file.txt
https://example.com/#sample-share-url
# Simple download
$ ffsend download https://send.vis.ee/#sample-share-url
$ ffsend download https://send.firefox.com/#sample-share-url
```
Inspect remote files:
```bash
# Check if a file exists
$ ffsend exists https://send.vis.ee/#sample-share-url
$ ffsend exists https://send.firefox.com/#sample-share-url
Exists: yes
# Fetch remote file info
$ ffsend info https://send.vis.ee/#sample-share-url
$ ffsend info https://send.firefox.com/#sample-share-url
ID: b087066715
Name: my-file.txt
Size: 12 KiB
@ -118,16 +114,16 @@ Other commands include:
# View your file history
$ ffsend history
# LINK EXPIRE
1 https://send.vis.ee/#sample-share-url 23h57m
2 https://send.vis.ee/#other-sample-url 17h38m
1 https://send.firefox.com/#sample-share-url 23h57m
2 https://send.firefox.com/#other-sample-url 17h38m
3 https://example.com/#sample-share-url 37m30s
# Change the password after uploading
$ ffsend password https://send.vis.ee/#sample-share-url
$ ffsend password https://send.firefox.com/#sample-share-url
Password: ******
# Delete a file
$ ffsend delete https://send.vis.ee/#sample-share-url
$ ffsend delete https://send.firefox.com/#sample-share-url
```
Use the `--help` flag, `help` subcommand, or see the [help](#help) section for
@ -138,20 +134,22 @@ all available subcommands.
- A terminal :sunglasses:
- Internet connection
- Linux:
- OpenSSL & CA certificates:
- Ubuntu, Debian and derivatives: `apt install openssl ca-certificates`
- CA certificates:
- Ubuntu, Debian and derivatives: `apt install ca-certificates`
- Optional: `xclip` or `xsel` for clipboard support
- Ubuntu, Debian and derivatives: `apt install xclip`
- CentOS/Red Hat/openSUSE/Fedora: `yum install xclip`
- Arch: `pacman -S xclip`
- Optional: OpenSSL with `crypto-openssl` feature
- Ubuntu, Debian and derivatives: `apt install openssl`
- Windows specific:
- Optional OpenSSL with `crypto-openssl` feature: [» Installer][openssl-windows-installer] (`v1.1.0j` or above)
- macOS specific:
- Optional OpenSSL with `crypto-openssl` feature: `brew install openssl@1.1`
- FreeBSD specific:
- OpenSSL: `pkg install openssl`
- CA certificates: `pkg install ca_root_nss`
- Optional `xclip` & `xsel` for clipboard support: `pkg install xclip xsel-conrad`
- Optional OpenSSL with `crypto-openssl` feature: `pkg install openssl`
- Android specific:
- Termux: [» Termux][termux]
@ -225,13 +223,13 @@ ffsend --help
```
#### Linux: Fedora package
_Note: The Fedora package is maintained by contributors, and might be
slightly outdated._
_Note: The Fedora package is maintained by contributors, it might be outdated.
Choose a different installation method if an important update is missing._
[» ffsend][fedora-ffsend]
```bash
sudo dnf install ffsend
yum install ffsend
ffsend --help
```
@ -275,7 +273,7 @@ ffsend --help
### macOS
Using the [`homebrew` package](#macos-homebrew-package) is recommended.
Alternatively you may install it via [MacPorts](#macos-macports), or manually using the
Alternatively you may install it manually using the
[prebuilt binaries](#macos-prebuilt-binaries).
#### macOS: homebrew package
@ -286,17 +284,6 @@ brew install ffsend
ffsend --help
```
#### macOS: MacPorts
_Note: ffsend in MacPorts is currently not automatically updated, and might be
slightly outdated._
Once you have [MacPorts](https://www.macports.org) installed, you can run:
```bash
sudo port selfupdate
sudo port install ffsend
```
#### macOS: Nix package
_Note: The Nix package is currently not automatically updated, and might be
slightly outdated._
@ -362,7 +349,7 @@ You can use `ffsend` from the command line in the same directory:
.\ffsend.exe --help
```
To make it globally invocable as `ffsend`, you must make the binary available in
To make it globally invokable as `ffsend`, you must make the binary available in
your systems `PATH`. The easiest solution is to move it into `System32`:
```cmd
move .\ffsend.exe C:\Windows\System32\ffsend.exe
@ -418,7 +405,7 @@ docker run --rm -it -v $(pwd):/data timvisee/ffsend
docker run --rm -it -v $(pwd):/data timvisee/ffsend upload my-file.txt
# Download from specified link
docker run --rm -it -v $(pwd):/data timvisee/ffsend download https://send.vis.ee/#sample-share-url
docker run --rm -it -v $(pwd):/data timvisee/ffsend download https://send.firefox.com/#sample-share-url
# Show help
docker run --rm -it -v $(pwd):/data timvisee/ffsend help
@ -428,7 +415,7 @@ docker pull timvisee/ffsend
```
On Linux or macOS you might define a alias in your shell configuration, to make
it invocable as `ffsend`:
it invokable as `ffsend`:
```bash
alias ffsend='docker run --rm -it -v "$(pwd):/data" timvisee/ffsend'
@ -444,8 +431,8 @@ before proceeding:
### Build requirements
- Runtime [requirements](#requirements)
- [`git`][git]
- [`rust`][rust] `v1.63` (MSRV) or higher (install using [`rustup`][rustup])
- [OpenSSL][openssl] or [LibreSSL][libressl] libraries/headers:
- [`rust`][rust] `v1.39` or higher (install using [`rustup`][rustup])
- Optional for `crypto-openssl` feature: [OpenSSL][openssl] or [LibreSSL][libressl] libraries and headers must be available
- Linux:
- Ubuntu, Debian and derivatives: `apt install build-essential cmake pkg-config libssl-dev`
- CentOS/Red Hat/openSUSE: `yum install gcc gcc-c++ make cmake openssl-devel`
@ -454,9 +441,10 @@ before proceeding:
- Fedora: `dnf install gcc gcc-c++ make cmake openssl-devel`
- Or see instructions [here](https://github.com/sfackler/rust-openssl#linux)
- Windows:
- Optional with `crypto-openssl` feature: See instructions here [here](https://github.com/sfackler/rust-openssl#windows-msvc)
- See instructions here [here](https://github.com/sfackler/rust-openssl#windows-msvc)
- macOS:
- Optional with `crypto-openssl` feature: `brew install cmake pkg-config openssl` or see instructions [here](https://github.com/sfackler/rust-openssl#osx)
- Using `brew`: `brew install cmake pkg-config openssl`
- Or see instructions [here](https://github.com/sfackler/rust-openssl#osx)
- FreeBSD:
- `pkg install rust gmake pkgconf python36 libxcb xclip ca_root_nss xsel-conrad`
- It is a better idea to use & modify the existing `ffsend` port, which manages dependencies for you.
@ -512,8 +500,8 @@ The following features are available, some of which are enabled by default:
| Feature | Enabled | Description |
| :-------------: | :-----: | :--------------------------------------------------------- |
| `send2` | Default | Support for Send v2 servers |
| `send3` | Default | Support for Send v3 servers |
| `send2` | Default | Support for Firefox Send v2 servers |
| `send3` | Default | Support for Firefox Send v3 servers |
| `crypto-ring` | Default | Use ring as cryptography backend |
| `crypto-openssl`| | Use OpenSSL as cryptography backend |
| `clipboard` | Default | Support for copying links to the clipboard |
@ -556,8 +544,6 @@ to command line arguments:
| `FFSEND_HOST` | `--host <URL>` | Upload host |
| `FFSEND_TIMEOUT` | `--timeout <SECONDS>` | Request timeout (0 to disable) |
| `FFSEND_TRANSFER_TIMEOUT` | `--transfer-timeout <SECONDS>` | Transfer timeout (0 to disable) |
| `FFSEND_EXPIRY_TIME` | `--expiry-time <SECONDS>` | Default upload expiry time |
| `FFSEND_DOWNLOAD_LIMIT` | `--download-limit <DOWNLOADS>` | Default download limit |
| `FFSEND_API` | `--api <VERSION>` | Server API version, `-` to lookup |
| `FFSEND_BASIC_AUTH` | `--basic-auth <USER:PASSWORD>` | Basic HTTP authentication credentials to use. |
@ -595,7 +581,7 @@ having `ffput` and `ffget` just for to upload and download using `ffsend`.
This allows simple and direct commands like:
```bash
ffput my-file.txt
ffget https://send.vis.ee/#sample-share-url
ffget https://send.firefox.com/#sample-share-url
```
This works for a predefined list of binary names:
@ -744,13 +730,10 @@ documentation [here][send-encryption].
```
$ ffsend help
ffsend 0.2.72
ffsend 0.2.62
Tim Visee <3a4fb3964f@sinenomine.email>
Easily and securely share files from the command line.
A fully featured Send client.
The default public Send host is provided by Tim Visee, @timvisee.
Please consider to donate and help keep it running: https://vis.ee/donate
A fully featured Firefox Send client.
USAGE:
ffsend [FLAGS] [OPTIONS] [SUBCOMMAND]
@ -767,7 +750,7 @@ FLAGS:
OPTIONS:
-A, --api <VERSION> Server API version to use, '-' to lookup [env: FFSEND_API]
--basic-auth <USER:PASSWORD> Protected proxy HTTP basic authentication credentials (not FxA) [env: FFSEND_BASIC_AUTH]
--basic-auth <USER:PASSWORD> HTTP basic authentication credentials [env: FFSEND_BASIC_AUTH]
-H, --history <FILE> Use the specified history file [env: FFSEND_HISTORY]
-t, --timeout <SECONDS> Request timeout (0 to disable) [env: FFSEND_TIMEOUT]
-T, --transfer-timeout <SECONDS> Transfer timeout (0 to disable) [env: FFSEND_TRANSFER_TIMEOUT]
@ -786,12 +769,14 @@ SUBCOMMANDS:
password Change the password of a shared file [aliases: pass, p]
version Determine the Send server version [aliases: v]
This application is not affiliated with Firefox or Mozilla.
The public Send service that is used as default host is provided by Mozilla.
This application is not affiliated with Mozilla, Firefox or Firefox Send.
```
## Special thanks
- to all `ffsend` source/package contributors
- to [Mozilla][mozilla] for building the amazing [Firefox Send][mozilla-send] service ([fork][timvisee-send])
- to [Mozilla][mozilla] for building and hosting the amazing
[Firefox Send][send] service
- to everyone involved with [asciinema][asciinema] and [svg-term][svg-term] for
providing tools to make great visual demos
- to everyone involved in all crate dependencies used
@ -811,16 +796,14 @@ Check out the [LICENSE](LICENSE) file for more information.
[termux]: https://termux.com/
[rust]: https://rust-lang.org/
[rustup]: https://rustup.rs/
[send]: https://github.com/timvisee/send
[mozilla-send]: https://github.com/mozilla/send
[timvisee-send]: https://github.com/timvisee/send
[send-encryption]: https://github.com/timvisee/send/blob/master/docs/encryption.md
[send]: https://send.firefox.com/
[send-encryption]: https://github.com/mozilla/send/blob/master/docs/encryption.md
[asciinema]: https://asciinema.org/
[svg-term]: https://github.com/marionebl/svg-term-cli
[github-releases]: https://github.com/timvisee/ffsend/releases
[github-latest-release]: https://github.com/timvisee/ffsend/releases/latest
[nix-ffsend]: https://nixos.org/nixos/packages.html?attr=ffsend&channel=nixos-unstable&query=ffsend
[fedora-ffsend]: https://src.fedoraproject.org/rpms/rust-ffsend
[fedora-ffsend]: https://fedora.pkgs.org/rawhide/fedora-x86_64/ffsend-0.2.49-2.fc31.x86_64.rpm.html
[aur-ffsend]: https://aur.archlinux.org/packages/ffsend/
[aur-ffsend-bin]: https://aur.archlinux.org/packages/ffsend-bin/
[aur-ffsend-git]: https://aur.archlinux.org/packages/ffsend-git/
@ -831,5 +814,3 @@ Check out the [LICENSE](LICENSE) file for more information.
[docker-hub-ffsend]: https://hub.docker.com/r/timvisee/ffsend
[scoop-install]: https://scoop.sh/#installs-in-seconds
[freshports-ffsend]: https://www.freshports.org/www/ffsend
[timvisee]: https://timvisee.com/
[donate]: https://timvisee.com/donate

View file

@ -21,7 +21,7 @@ _ffsend() {
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-f[Force the action, ignore warnings]' \
@ -59,7 +59,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'--help[Prints help information]' \
@ -89,7 +89,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'--help[Prints help information]' \
@ -119,7 +119,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -151,7 +151,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -183,7 +183,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -217,7 +217,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-e[Extract an archived file]' \
@ -253,7 +253,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-e[Extract an archived file]' \
@ -289,7 +289,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-e[Extract an archived file]' \
@ -321,7 +321,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -351,7 +351,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -381,7 +381,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -411,7 +411,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -449,7 +449,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -481,7 +481,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -513,7 +513,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -543,7 +543,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -576,7 +576,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -614,7 +614,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -646,7 +646,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -678,7 +678,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -708,7 +708,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -745,7 +745,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -779,7 +779,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -813,7 +813,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -847,7 +847,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -881,7 +881,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -915,7 +915,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -949,7 +949,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \
@ -983,7 +983,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1019,7 +1019,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1055,7 +1055,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1097,7 +1097,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1152,7 +1152,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1207,7 +1207,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'(-p --password)-P[Protect the file with a generated passphrase]' \
@ -1254,7 +1254,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'--help[Prints help information]' \
@ -1284,7 +1284,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'--help[Prints help information]' \
@ -1314,7 +1314,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'--help[Prints help information]' \
@ -1344,7 +1344,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-C[Clear all history]' \
@ -1377,7 +1377,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-C[Clear all history]' \
@ -1410,7 +1410,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-C[Clear all history]' \
@ -1441,7 +1441,7 @@ _arguments "${_arguments_options[@]}" \
'--transfer-timeout=[Transfer timeout (0 to disable)]' \
'-A+[Server API version to use, '\''-'\'' to lookup]' \
'--api=[Server API version to use, '\''-'\'' to lookup]' \
'--basic-auth=[Protected proxy HTTP basic authentication credentials (not FxA)]' \
'--basic-auth=[HTTP basic authentication credentials]' \
'-H+[Use the specified history file]' \
'--history=[Use the specified history file]' \
'-h[Prints help information]' \

View file

@ -26,7 +26,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Force the action, ignore warnings')
@ -68,7 +68,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
@ -97,7 +97,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -129,7 +129,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'Extract an archived file')
@ -159,7 +159,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -187,7 +187,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -219,7 +219,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -247,7 +247,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -279,7 +279,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -311,7 +311,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
@ -343,7 +343,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Protect the file with a generated passphrase')
@ -383,7 +383,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Protect the file with a generated passphrase')
@ -428,7 +428,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
@ -457,7 +457,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-C', 'C', [CompletionResultType]::ParameterName, 'Clear all history')
@ -487,7 +487,7 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--transfer-timeout', 'transfer-timeout', [CompletionResultType]::ParameterName, 'Transfer timeout (0 to disable)')
[CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--api', 'api', [CompletionResultType]::ParameterName, 'Server API version to use, ''-'' to lookup')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'Protected proxy HTTP basic authentication credentials (not FxA)')
[CompletionResult]::new('--basic-auth', 'basic-auth', [CompletionResultType]::ParameterName, 'HTTP basic authentication credentials')
[CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('--history', 'history', [CompletionResultType]::ParameterName, 'Use the specified history file')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')

View file

@ -21,7 +21,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -f 'Force the action, ignore warnings'
@ -62,7 +62,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand --help 'Prints help information'
@ -90,7 +90,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -121,7 +121,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -e 'Extract an archived file'
@ -150,7 +150,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -177,7 +177,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -208,7 +208,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -235,7 +235,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -266,7 +266,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -297,7 +297,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'
@ -328,7 +328,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -P 'Protect the file with a generated passphrase'
@ -367,7 +367,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -P 'Protect the file with a generated passphrase'
@ -411,7 +411,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand --help 'Prints help information'
@ -439,7 +439,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -C 'Clear all history'
@ -468,7 +468,7 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --transfer-timeout 'Transfer timeout (0 to disable)'
cand -A 'Server API version to use, ''-'' to lookup'
cand --api 'Server API version to use, ''-'' to lookup'
cand --basic-auth 'Protected proxy HTTP basic authentication credentials (not FxA)'
cand --basic-auth 'HTTP basic authentication credentials'
cand -H 'Use the specified history file'
cand --history 'Use the specified history file'
cand -h 'Prints help information'

View file

@ -1,7 +1,7 @@
complete -c ffsend -n "__fish_use_subcommand" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_use_subcommand" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_use_subcommand" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_use_subcommand" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_use_subcommand" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_use_subcommand" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_use_subcommand" -s f -l force -d 'Force the action, ignore warnings'
complete -c ffsend -n "__fish_use_subcommand" -s I -l no-interact -d 'Not interactive, do not prompt'
@ -27,7 +27,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from debug" -s h -l host -d 'The r
complete -c ffsend -n "__fish_seen_subcommand_from debug" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from debug" -s V -l version -d 'Prints version information'
@ -41,7 +41,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from delete" -s o -l owner -d 'Spe
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from delete" -s V -l version -d 'Prints version information'
@ -56,7 +56,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from download" -s o -l output -d '
complete -c ffsend -n "__fish_seen_subcommand_from download" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from download" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from download" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from download" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from download" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from download" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from download" -s e -l extract -d 'Extract an archived file'
complete -c ffsend -n "__fish_seen_subcommand_from download" -s h -l help -d 'Prints help information'
@ -70,7 +70,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from download" -s i -l incognito -
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from exists" -s V -l version -d 'Prints version information'
@ -83,7 +83,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from exists" -s i -l incognito -d
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from generate" -s V -l version -d 'Prints version information'
@ -99,7 +99,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from completions" -s o -l output -
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Prints version information'
@ -112,7 +112,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from completions" -s i -l incognit
complete -c ffsend -n "__fish_seen_subcommand_from help" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from help" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
@ -127,7 +127,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from info" -s p -l password -d 'Un
complete -c ffsend -n "__fish_seen_subcommand_from info" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from info" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from info" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from info" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from info" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from info" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from info" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from info" -s V -l version -d 'Prints version information'
@ -142,7 +142,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s d -l download-
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from parameters" -s V -l version -d 'Prints version information'
@ -157,7 +157,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from password" -s o -l owner -d 'S
complete -c ffsend -n "__fish_seen_subcommand_from password" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from password" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from password" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from password" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from password" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from password" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from password" -s P -l gen-passphrase -d 'Protect the file with a generated passphrase'
complete -c ffsend -n "__fish_seen_subcommand_from password" -s h -l help -d 'Prints help information'
@ -176,7 +176,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from upload" -s n -l name -d 'Rena
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s P -l gen-passphrase -d 'Protect the file with a generated passphrase'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s o -l open -d 'Open the share link in your browser'
@ -198,7 +198,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from version" -s h -l host -d 'The
complete -c ffsend -n "__fish_seen_subcommand_from version" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from version" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from version" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from version" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from version" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from version" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from version" -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from version" -s V -l version -d 'Prints version information'
@ -212,7 +212,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from history" -s R -l rm -d 'Remov
complete -c ffsend -n "__fish_seen_subcommand_from history" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from history" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from history" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from history" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from history" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from history" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from history" -s C -l clear -d 'Clear all history'
complete -c ffsend -n "__fish_seen_subcommand_from history" -s h -l help -d 'Prints help information'
@ -226,7 +226,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from history" -s i -l incognito -d
complete -c ffsend -n "__fish_seen_subcommand_from help" -s t -l timeout -d 'Request timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s T -l transfer-timeout -d 'Transfer timeout (0 to disable)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s A -l api -d 'Server API version to use, \'-\' to lookup'
complete -c ffsend -n "__fish_seen_subcommand_from help" -l basic-auth -d 'Protected proxy HTTP basic authentication credentials (not FxA)'
complete -c ffsend -n "__fish_seen_subcommand_from help" -l basic-auth -d 'HTTP basic authentication credentials'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s H -l history -d 'Use the specified history file'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c ffsend -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'

View file

@ -4,5 +4,5 @@
set -e
echo "Generating all completions using cargo debug binary..."
cargo run -q -- generate completions all --output "$PWD"
cargo run -q -- generate completions all --output $PWD
echo "Done."

View file

@ -1,6 +0,0 @@
`firefox-send` is a script for Nautilus/Nemo/Caja (maybe it needs some adaptation for Caja) to send files directly from the file browser, using the contextual menu.
* Copy the `firefox-send` file to ~/.local/share/nautilus/scripts/firefox-send
* Modify the default options to your use case: host server, download number, retention time.
* Make the file executable (`chmod +x firefox-send`).
* Restart Nautilus/Nemo/Caja.

View file

@ -1,46 +0,0 @@
#!/bin/bash
#CONSTANTS
#FILEPATH=`echo $NAUTILUS_SCRIPT_SELECTED_URIS | sed 's@file://@@g'`
# Quote the paths
IFS=$'\n' read -d '' -r -a FILEPATH <<< "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
FFSEND_BIN='/usr/bin/ffsend'
FFSEND_BIN_OPTS="upload --open --copy"
ZENITY='/usr/bin/zenity '
ZENITY_PROGRESS_OPTIONS='--auto-close --auto-kill' #you can remove this if you like
#sanity checks
for sanity_check in $FFSEND_BIN "${FILEPATH[@]}"
do
ZENITY_ERROR_SANITY="There is an error, it involved $sanity_check.\n Probably binary or file missing"
if [ ! -e $sanity_check ]
then
#zenity --error --text="$(eval "echo \"$ZENITY_ERROR_SANITY\"")"
zenity --error --text="$ZENITY_ERROR_SANITY"
exit
fi
done
# Use the following flags automatically from now on
# -I: no interaction
# -f: force
# -y: yes
# -q: quiet
export FFSEND_NO_INTERACT=1 FFSEND_FORCE=1 FFSEND_YES=1 FFSEND_QUIET=1
export FFSEND_HOST=https://send.boblorange.net
export FFSEND_EXPIRY_TIME=604800
export FFSEND_DOWNLOAD_LIMIT=5
#check whether copying file or directory
if [ ! -f "${FILEPATH[@]}" ]; then
FFSEND_BIN_OPTS="$FFSEND_BIN_OPTS --archive"
fi
# Upload a file
#zenity --info --text="Ready to send: $FFSEND_BIN $FFSEND_BIN_OPTS ${FILEPATH[@]}"
$FFSEND_BIN $FFSEND_BIN_OPTS "${FILEPATH[@]}" | $($ZENITY --progress --text="sending $(basename $FILEPATH)" --pulsate $ZENITY_PROGRESS_OPTIONS)
#echo -e "$FILEPATH" | xargs -i $FFSEND_BIN $FFSEND_BIN_OPTS {} | $($ZENITY --progress --text="sending $(basename $FILEPATH)" --pulsate $ZENITY_PROGRESS_OPTIONS)
# Upload a file
#echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | xargs -i ffsend upload --open --copy {}

View file

@ -3,11 +3,11 @@
pkgname=ffsend
pkgver=0.2.62
pkgrel=0
pkgdesc=" A fully featured Send client"
pkgdesc=" A fully featured Firefox Send client"
url="https://gitlab.com/timvisee/ffsend"
arch="x86_64 x86 armhf armv7 aarch64 ppc64le" # limited by cargo
license="GPL-3.0-only"
makedepends="cargo openssl-dev"
makedepends="cargo"
subpackages="
$pkgname-zsh-completion:zshcomp:noarch
$pkgname-fish-completion:fishcomp:noarch

View file

@ -8,7 +8,7 @@
pkgname=ffsend-bin
pkgver=0.0.0 # automatically set in CI, see: /.gitlab-ci.yml
pkgrel=1
pkgdesc="Easily and securely share files from the command line. A Send client."
pkgdesc="Easily and securely share files from the command line. A Firefox Send client."
url="https://gitlab.com/timvisee/ffsend"
license=('GPL3')
source=("ffsend-v$pkgver::https://github.com/timvisee/ffsend/releases/download/v$pkgver/ffsend-v$pkgver-linux-x64-static"
@ -27,9 +27,10 @@ optdepends=('xclip: clipboard support'
package() {
cd "$srcdir"
# Install Binary
install -Dm755 "ffsend-v$pkgver" "$pkgdir/usr/bin/ffsend"
# Shell completions and LICENSE file
# Install shell completions and LICENSE file
install -Dm644 "ffsend-v$pkgver.bash" "$pkgdir/usr/share/bash-completion/completions/ffsend"
install -Dm644 "ffsend-v$pkgver.zsh" "$pkgdir/usr/share/zsh/site-functions/_ffsend"
install -Dm644 "ffsend-v$pkgver.fish" "$pkgdir/usr/share/fish/vendor_completions.d/ffsend.fish"

View file

@ -7,45 +7,31 @@
pkgname=ffsend-git
pkgver=0.0.0 # automatically set in CI, see: /.gitlab-ci.yml
pkgrel=1
pkgdesc="Easily and securely share files from the command line. A Send client."
pkgdesc="Easily and securely share files from the command line. A Firefox Send client."
url="https://gitlab.com/timvisee/ffsend"
license=('GPL3')
source=("git+${url}")
source=("ffsend::git+$url.git")
sha256sums=('SKIP')
arch=('x86_64' 'i686')
provides=('ffsend')
conflicts=('ffsend')
depends=('ca-certificates')
makedepends=('cargo' 'cmake' 'openssl>=1.0')
optdepends=('xclip: clipboard support')
prepare() {
cd "${pkgname%-git}"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
makedepends=('rust>=1.39' 'cargo' 'cmake')
optdepends=('xclip: clipboard support'
'bash-completion: support auto completion for bash')
build() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
}
check() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
cd ffsend
env CARGO_INCREMENTAL=0 cargo build --release
}
package() {
cd "${pkgname%-git}"
cd "$srcdir/ffsend"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/ffsend"
# Install Binary
install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend"
# Shell completions and LICENSE file
# Install shell completions and LICENSE file
install -Dm644 "contrib/completions/ffsend.bash" \
"$pkgdir/etc/bash_completion.d/ffsend"
install -Dm644 "contrib/completions/_ffsend" \

View file

@ -7,43 +7,30 @@
pkgname=ffsend
pkgver=0.0.0 # automatically set in CI, see: /.gitlab-ci.yml
pkgrel=1
pkgdesc="Easily and securely share files from the command line. A Send client."
pkgdesc="Easily and securely share files from the command line. A Firefox Send client."
url="https://gitlab.com/timvisee/ffsend"
license=('GPL3')
source=("$url/-/archive/v$pkgver/ffsend-v$pkgver.tar.gz") # automatically set in CI, see: /.gitlab-ci.yml
source=("ffsend-v$pkgver.tar.gz::$url/-/archive/v$pkgver/ffsend-v$pkgver.tar.gz") # automatically set in CI, see: /.gitlab-ci.yml
sha256sums=('SKIP') # automatically set in CI, see: /.gitlab-ci.yml
arch=('x86_64' 'i686')
provides=('ffsend')
depends=('ca-certificates')
makedepends=('cargo' 'cmake' 'openssl>=1.0')
optdepends=('xclip: clipboard support')
prepare() {
cd "$pkgname-v$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
makedepends=('rust>=1.39' 'cargo' 'cmake')
optdepends=('xclip: clipboard support'
'bash-completion: support auto completion for bash')
build() {
cd "$pkgname-v$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
}
check() {
cd "$pkgname-v$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
cd "ffsend-v$pkgver"
env CARGO_INCREMENTAL=0 cargo build --release
}
package() {
cd "$pkgname-v$pkgver"
cd "$srcdir/ffsend-v$pkgver"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
# Install Binary
install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend"
# Shell completions and LICENSE file
# Install shell completions and LICENSE file
install -Dm644 "contrib/completions/ffsend.bash" \
"$pkgdir/etc/bash_completion.d/ffsend"
install -Dm644 "contrib/completions/_ffsend" \

View file

@ -45,8 +45,8 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<docsUrl>https://github.com/timvisee/ffsend</docsUrl>
<bugTrackerUrl>https://gitlab.com/timvisee/ffsend/issues</bugTrackerUrl>
<tags>ffsend firefox-send cli file-sharing file-upload encryption rust</tags>
<summary>Easily and securely share files from the command line. A fully featured Send client.</summary>
<description>Easily and securely share files from the command line. A fully featured Send client.</description>
<summary>Easily and securely share files from the command line. A fully featured Firefox Send client.</summary>
<description>Easily and securely share files from the command line. A fully featured Firefox Send client.</description>
<!-- =============================== -->
<!-- Specifying dependencies and version ranges? https://docs.nuget.org/create/versioning#specifying-version-ranges-in-.nuspec-files -->

View file

@ -9,13 +9,13 @@ if [[ ! $TRAVIS_TAG =~ ^v([0-9]+\.)*[0-9]+$ ]]; then
fi
# Ensure the debian architecture is set
if [[ -z $DEB_ARCH ]]; then
if [[ -z "$DEB_ARCH" ]]; then
echo "Error: debian architecture not configured in \$DEB_ARCH"
exit 1
fi
# Define some useful variables
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
VERSION=${TRAVIS_TAG:1}
# Ensure the binary file exists
@ -25,23 +25,23 @@ if [[ ! -f "$DIR/../ffsend" ]]; then
fi
# Create an application directory, copy the binary into it
mkdir -p "$DIR/ffsend-$VERSION"
cp -- "$DIR/../ffsend" "$DIR/ffsend-$VERSION/ffsend"
mkdir -p $DIR/ffsend-$VERSION
cp $DIR/../ffsend $DIR/ffsend-$VERSION/ffsend
# Create an application tarball
cd -- "$DIR/.."
git archive --format tar.gz -o "$DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz" "$TRAVIS_TAG"
# Create an application tarbal
cd $DIR/..
git archive --format tar.gz -o $DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz $TRAVIS_TAG
# Change into the app directory
cd -- "$DIR/ffsend-$VERSION"
cd $DIR/ffsend-$VERSION
# Build the debian package
# TODO: define GPG?
dh_make -e "timvisee@gmail.com" -c gpl3 -f "ffsend-$VERSION.tar.gz" -s -y
rm -- *.ex README.Debian README.source
dh_make -e "timvisee@gmail.com" -c gpl3 -f ffsend-$VERSION.tar.gz -s -y
rm *.ex README.Debian README.source
# Remove the project tar ball, we're not using it anymore
rm -- "$DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz"
rm $DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz
# TODO: configure the debian/control file
# TODO: configure copyright file

View file

@ -2,7 +2,7 @@
# Unlink the ffs alias if it links to ffsend
if [[ -L /usr/bin/ffs ]] \
&& [[ $(realpath /usr/bin/ffs) == "/usr/bin/ffsend" ]]; \
&& [[ $(ls -l /usr/bin/ffs | sed -e 's/.* -> //') == "/usr/bin/ffsend" ]]; \
then
echo "Removing ffs alias for ffsend..."
unlink /usr/bin/ffs

View file

@ -1,5 +1,5 @@
FROM alpine:latest
LABEL maintainer="Tim Visée <3a4fb3964f@sinenomine.email>"
LABEL maintainer="Tim Visée <tim@visee.me>"
COPY ./ffsend /

View file

@ -1,6 +1,6 @@
{
"homepage": "https://github.com/timvisee/ffsend",
"description": "Easily and securely share files from the command line. A fully featured Send client.",
"description": "Easily and securely share files from the command line. A fully featured Firefox Send client.",
"license": "GPL-3.0-only",
"version": "0.0.0",
"architecture": {

View file

@ -32,4 +32,4 @@ parts:
plugin: rust
build-attributes: [no-system-libraries]
build-packages: [make, cmake, pkg-config, libssl-dev]
stage-packages: [libssl1.0.0, xclip]
stage-packages: [xclip]

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Ensure svg-term is installed
if ! [ -x "$(command -v svg-term)" ]; then

View file

@ -1 +0,0 @@
eyJyIjogIk1EQXlPV3h2WTJGMGFXOXVJRzE1WVhCd2N5NWtaWFpsYkc5d1pYSXVkV0oxYm5SMUxtTnZiUW93TURFMmFXUmxiblJwWm1sbGNpQk5lVUZ3Y0hNS01EQTBZbU5wWkNCdGVXRndjSE11WkdWMlpXeHZjR1Z5TG5WaWRXNTBkUzVqYjIxOGRtRnNhV1JmYzJsdVkyVjhNakF5TWkwd05pMHlNRlF3T0Rvd016b3hNaTQwTlRreU9EUUtNREUzWkdOcFpDQjdJblpsY25OcGIyNGlPaUF4TENBaWMyVmpjbVYwSWpvZ0ltOWFVRzlpVG1vdlJYTmhkazlYUVZoRmNIQlRNM1JNY0RGak1tdFZaVU5NYzFaWlNUQmFaa1JFZERkcVozaHhTVlI2VEhselFtOVZjV3N5VURad1JXdFFRblpNUkhOMFkwTTNSRlU1VUVFMGFXVlpPV0U0WWxGU2VtNHJNbTQxVEVsRWMwY3ZTVEphVEM4eU1uSTBjakZDYmlzM1VqRnhUVWt2WjNoR1kzVnVVV05pUlZkeVVWQXdZV3BrUTBrd1pWRmxOVEZsVmpWSVJrbzNjMlZGU0c5WVpFRlZTVVZ1Vm1GNU5sRnFVMDQzTW1SSFpWSlVabVZvYVVacmFWbFFaVVJJZVN0d1VqbHVjMXBNZW5aMFNYbHNPRnBYYVhkSVdIcFpRVTl2T0Rob1VXdFhZakZ6UzNGSGFYWjZWRFZEWlZoV1IyaElaalJSUVdRNVIwOWxLMjUxUmpWM2JHMWtaRlIwY1U1YWNWQnNjVkZHYjBoelprUk9jRFpvVFd4dWFHbDVMMGxvY2tOclZscENUVzFMYld0cFIwVk1VWFZMTUVSUVFtdFFNSE5RVWpaVVdsWnFjVGQzZVRaaFdIa3dVM1ZyZDBaclp6MDlJbjBLTURBMU1YWnBaQ0ExYU5mbjFKU3NBa1VoMFM1NXB4bnp2VUxESlRtcldMLTZSa3B0c3kzbFdVSG02T0hVQnJHeGtfYmlnbnEtbkxIMm9hYVdwaENKRkM1YzNod1BqWjBXUl83bUZ5QWN2QlFLTURBeE9HTnNJR3h2WjJsdUxuVmlkVzUwZFM1amIyMEtNREJoT1dOcFpDQnRlV0Z3Y0hNdVpHVjJaV3h2Y0dWeUxuVmlkVzUwZFM1amIyMThZV05zZkZzaWNHRmphMkZuWlY5aFkyTmxjM01pTENBaWNHRmphMkZuWlY5dFlXNWhaMlVpTENBaWNHRmphMkZuWlY5dFpYUnlhV056SWl3Z0luQmhZMnRoWjJWZmNIVnphQ0lzSUNKd1lXTnJZV2RsWDNKbFoybHpkR1Z5SWl3Z0luQmhZMnRoWjJWZmNtVnNaV0Z6WlNJc0lDSndZV05yWVdkbFgzVndaR0YwWlNKZENqQXdORGRqYVdRZ2JYbGhjSEJ6TG1SbGRtVnNiM0JsY2k1MVluVnVkSFV1WTI5dGZHVjRjR2x5WlhOOE1qQXlNeTB3TmkweU1GUXdPRG93TXpveE1pNHdNREF3TVRjS01EQXlabk5wWjI1aGRIVnlaU0JOYm05MFAyTkpYV3RON0I1aktWbkVBQUZqM0c3dzItLWNhOGloR2lJWUhRbyIsICJkIjogIk1EQXhaV3h2WTJGMGFXOXVJR3h2WjJsdUxuVmlkVzUwZFM1amIyMEtNREU0Tkdsa1pXNTBhV1pwWlhJZ2V5SjJaWEp6YVc5dUlqb2dNU3dnSW5ObFkzSmxkQ0k2SUNKdldsQnZZazVxTDBWellYWlBWMEZZUlhCd1V6TjBUSEF4WXpKclZXVkRUSE5XV1Vrd1dtWkVSSFEzYW1kNGNVbFVla3g1YzBKdlZYRnJNbEEyY0VWclVFSjJURVJ6ZEdORE4wUlZPVkJCTkdsbFdUbGhPR0pSVW5wdUt6SnVOVXhKUkhOSEwwa3lXa3d2TWpKeU5ISXhRbTRyTjFJeGNVMUpMMmQ0Um1OMWJsRmpZa1ZYY2xGUU1HRnFaRU5KTUdWUlpUVXhaVlkxU0VaS04zTmxSVWh2V0dSQlZVbEZibFpoZVRaUmFsTk9OekprUjJWU1ZHWmxhR2xHYTJsWlVHVkVTSGtyY0ZJNWJuTmFUSHAyZEVsNWJEaGFWMmwzU0ZoNldVRlBiemc0YUZGclYySXhjMHR4UjJsMmVsUTFRMlZZVmtkb1NHWTBVVUZrT1VkUFpTdHVkVVkxZDJ4dFpHUlVkSEZPV25GUWJIRlJSbTlJYzJaRVRuQTJhRTFzYm1ocGVTOUphSEpEYTFaYVFrMXRTMjFyYVVkRlRGRjFTekJFVUVKclVEQnpVRkkyVkZwV2FuRTNkM2syWVZoNU1GTjFhM2RHYTJjOVBTSjlDakF3WkRaamFXUWdiRzluYVc0dWRXSjFiblIxTG1OdmJYeGhZMk52ZFc1MGZHVjVTakZqTWxaNVltMUdkRnBUU1RaSlEwb3dZVmN4TW1GWVRteGFVMGx6U1VOS2RtTkhWblZoVjFGcFQybEJhVlZ1WkV4UlZXaDBVME5KYzBsRFNtdGhXRTUzWWtkR05XSnRSblJhVTBrMlNVTktWV0ZYTUdkV2JXeDZXRWhWZDAxSFZUVmFVMGx6U1VOS2JHSlhSbkJpUTBrMlNVTktNR0ZYTUhKa1Ywb3hZbTVTTVdJeU5XeFJTRnB3WXpKV2JFeHRNV3hKYVhkblNXMXNlbGd6V214amJXeHRZVmRXYTBscWIyZGtTRW94V2xnd1BRb3dNRFF3WTJsa0lHeHZaMmx1TG5WaWRXNTBkUzVqYjIxOGRtRnNhV1JmYzJsdVkyVjhNakF5TWkwd05pMHlNRlF3T0Rvd016b3hNeTR5T0RJd09UTUtNREF6WldOcFpDQnNiMmRwYmk1MVluVnVkSFV1WTI5dGZHeGhjM1JmWVhWMGFId3lNREl5TFRBMkxUSXdWREE0T2pBek9qRXpMakk0TWpBNU13b3dNREptYzJsbmJtRjBkWEpsSVBtdzV2aGZjWXhjRVFzX1RHV2VHWUFrQWhxdkJONVJjOFpHTEpnVFZ2eGxDZyJ9

View file

@ -139,7 +139,7 @@ impl<'a> Download<'a> {
{
// Allocate an archive file, and update the download and target paths
if extract {
// TODO: select the extension dynamically
// TODO: select the extention dynamically
let archive_extention = ".tar";
// Allocate a temporary file to download the archive to
@ -210,7 +210,7 @@ impl<'a> Download<'a> {
///
/// The full path including the name is returned.
///
/// This method will check whether a file is overwritten, and whether
/// This method will check whether a file is overwitten, and whether
/// parent directories must be created.
///
/// The program will quit with an error message if a problem occurs.
@ -313,7 +313,7 @@ impl<'a> Download<'a> {
// Get the path string
let path = target.to_str();
// If the path is empty, use the working directory with the name hint
// If the path is emtpy, use the working directory with the name hint
let use_workdir = path.map(|path| path.trim().is_empty()).unwrap_or(true);
if use_workdir {
match current_dir() {

View file

@ -24,7 +24,7 @@ impl<'a> Completions<'a> {
let matcher_main = MainMatcher::with(self.cmd_matches).unwrap();
let matcher_completions = CompletionsMatcher::with(self.cmd_matches).unwrap();
// Obtain shells to generate completions for, build application definition
// Obtian shells to generate completions for, build application definition
let shells = matcher_completions.shells();
let dir = matcher_completions.output();
let quiet = matcher_main.quiet();
@ -38,14 +38,14 @@ impl<'a> Completions<'a> {
// Generate completions
for shell in shells {
if !quiet {
eprint!(
print!(
"Generating completions for {}...",
format!("{}", shell).to_lowercase()
);
}
app.gen_completions(crate_name!(), shell, &dir);
if !quiet {
eprintln!(" done.");
println!(" done.");
}
}

View file

@ -63,7 +63,7 @@ impl<'a> History<'a> {
// Remove history item
if let Some(url) = matcher_history.rm() {
// Remove item, print error if no item with URL was found
// Remove item, print error if no item with URL was foudn
match history.remove_url(url) {
Ok(removed) if !removed => quit_error_msg(
"could not remove item from history, no item matches given URL",
@ -120,8 +120,11 @@ impl<'a> History<'a> {
};
// Define the cell values
let mut cells: Vec<String> =
vec![format!("{}", i + 1), file.download_url(true).into(), expiry];
let mut cells: Vec<String> = vec![
format!("{}", i + 1),
file.download_url(true).into_string(),
expiry,
];
if matcher_main.verbose() {
cells.push(owner_token);
}

View file

@ -50,7 +50,7 @@ fn select_api_version(
));
}
// Propagate other errors
// Propegate other errors
Err(e) => return Err(e),
}

View file

@ -1,6 +1,6 @@
use std::env::current_dir;
use std::fs;
use std::io::{Error as IoError, Write};
use std::io::Error as IoError;
use std::path::Path;
#[cfg(feature = "archive")]
use std::path::PathBuf;
@ -19,6 +19,7 @@ use pathdiff::diff_paths;
use prettytable::{format::FormatBuilder, Cell, Row, Table};
#[cfg(feature = "qrcode")]
use qr2term::print_qr;
#[cfg(feature = "archive")]
use tempfile::{Builder as TempBuilder, NamedTempFile};
use super::select_api_version;
@ -35,7 +36,7 @@ use crate::urlshorten;
use crate::util::set_clipboard;
use crate::util::{
format_bytes, open_url, print_error, print_error_msg, prompt_yes, quit, quit_error_msg,
rand_alphanum_string, stdin_read_file, ErrorHintsBuilder, StdinErr,
rand_alphanum_string, ErrorHintsBuilder,
};
/// A file upload action.
@ -56,49 +57,20 @@ impl<'a> Upload<'a> {
let matcher_main = MainMatcher::with(self.cmd_matches).unwrap();
let matcher_upload = UploadMatcher::with(self.cmd_matches).unwrap();
// The file name to use
#[allow(unused_mut)]
let mut file_name = matcher_upload.name().map(|s| s.to_owned());
// The selected files
let mut files = matcher_upload.files();
// If file is `-`, upload from stdin
// TODO: write stdin directly to file, or directly to upload buffer
let mut tmp_stdin: Option<NamedTempFile> = None;
if files.len() == 1 && files[0] == "-" {
// Obtain data from stdin
let data = stdin_read_file(!matcher_main.quiet()).map_err(Error::Stdin)?;
// Create temporary stdin buffer file
tmp_stdin = Some(
TempBuilder::new()
.prefix(&format!(".{}-stdin-", crate_name!()))
.tempfile()
.map_err(Error::StdinTempFile)?,
);
let file = tmp_stdin.as_ref().unwrap();
// Fill temporary file with data, update list of files we upload, suggest name
file.as_file()
.write_all(&data)
.map_err(Error::StdinTempFile)?;
files = vec![file
.path()
.to_str()
.expect("failed to obtain file name for stdin buffer file")];
file_name = file_name.or_else(|| Some("stdin.txt".into()));
}
// Get API parameters
#[allow(unused_mut)]
let mut paths: Vec<_> = files
let mut paths: Vec<_> = matcher_upload
.files()
.into_iter()
.map(|p| Path::new(p).to_path_buf())
.collect();
let mut path = Path::new(paths.first().unwrap()).to_path_buf();
let host = matcher_upload.host();
// The file name to use
#[allow(unused_mut)]
let mut file_name = matcher_upload.name().map(|s| s.to_owned());
// All paths must exist
// TODO: ensure the file exists and is accessible
for path in &paths {
@ -224,7 +196,7 @@ impl<'a> Upload<'a> {
// Finish the archival process, writes the archive file
archiver.finish().map_err(ArchiveError::Write)?;
// Append archive extension to name, set to upload archived file
// Append archive extention to name, set to upload archived file
if let Some(ref mut file_name) = file_name {
file_name.push_str(archive_extention);
}
@ -275,7 +247,7 @@ impl<'a> Upload<'a> {
// TODO: set false parameter to authentication state
let max_size = upload_size_max(api_version, auth);
// Get the file size, fail on empty files, warn about large files
// Get the file size, fail on emtpy files, warn about large files
if let Ok(size) = path.metadata().map(|m| m.len()) {
// Enforce files not being 0 bytes
if size == 0 && !matcher_main.force() {
@ -317,7 +289,7 @@ impl<'a> Upload<'a> {
// Prompt the user to continue, quit if the user answered no
if !prompt_yes("Continue uploading?", Some(true), &matcher_main) {
eprintln!("Upload cancelled");
println!("Upload cancelled");
quit();
}
}
@ -482,16 +454,6 @@ impl<'a> Upload<'a> {
}
}
// Close the temporary stdin buffer file, to ensure it's removed
if let Some(tmp_stdin) = tmp_stdin.take() {
if let Err(err) = tmp_stdin.close() {
print_error(
err.context("failed to clean up temporary stdin buffer file, ignoring")
.compat(),
);
}
}
#[cfg(feature = "archive")]
{
// Close the temporary zip file, to ensure it's removed
@ -619,14 +581,6 @@ pub enum Error {
/// An error occurred while deleting a local file after upload.
#[fail(display = "failed to delete local file")]
Delete(#[cause] IoError),
/// An error occurred while reading data from stdin.
#[fail(display = "failed to read data from stdin")]
Stdin(#[cause] StdinErr),
/// An error occurred while creating the temporary stdin file.
#[fail(display = "failed to create temporary stdin buffer file")]
StdinTempFile(#[cause] IoError),
}
impl From<VersionError> for Error {

View file

@ -1,7 +1,7 @@
use std::io::{Error as IoError, Read};
use std::path::Path;
use tar::Archive as TarArchive;
use super::tar::Archive as TarArchive;
pub type Result<T> = ::std::result::Result<T, IoError>;

View file

@ -2,7 +2,7 @@ use std::fs::File;
use std::io::{Error as IoError, Write};
use std::path::Path;
use tar::Builder as TarBuilder;
use super::tar::Builder as TarBuilder;
pub type Result<T> = ::std::result::Result<T, IoError>;

View file

@ -1,2 +1,4 @@
extern crate tar;
pub mod archive;
pub mod archiver;

View file

@ -24,7 +24,7 @@ impl CmdArg for ArgApi {
.help("Server API version to use, '-' to lookup")
.long_help(
"Server API version to use, one of:\n\
2, 3: Send API versions\n\
2, 3: Firefox Send API versions\n\
auto, -: probe server to determine\
",
)

View file

@ -20,7 +20,7 @@ impl CmdArg for ArgBasicAuth {
.env("FFSEND_BASIC_AUTH")
.hide_env_values(true)
.global(true)
.help("Protected proxy HTTP basic authentication credentials (not FxA)")
.help("HTTP basic authentication credentials")
}
}

View file

@ -68,7 +68,6 @@ impl CmdArg for ArgDownloadLimit {
.alias("downloads")
.alias("download")
.value_name("COUNT")
.env("FFSEND_DOWNLOAD_LIMIT")
.help("The file download limit")
}
}

View file

@ -75,7 +75,6 @@ impl CmdArg for ArgExpiryTime {
.alias("expire")
.alias("expiry")
.value_name("TIME")
.env("FFSEND_EXPIRY_TIME")
.help("The file expiry time")
}
}

View file

@ -1,16 +1,22 @@
use chbs;
use chbs::{config::BasicConfig, prelude::*, word::WordList};
use clap::Arg;
use super::{CmdArg, CmdArgFlag};
/// How many words the passphrase should consist of.
const PASSPHRASE_WORDS: usize = 5;
/// The passphrase generation argument.
pub struct ArgGenPassphrase {}
impl ArgGenPassphrase {
/// Generate a cryptographically secure passphrase that is easily
/// remembered using diceware.
/// rememberable using diceware.
pub fn gen_passphrase() -> String {
chbs::passphrase()
let mut config = BasicConfig::default();
config.words = PASSPHRASE_WORDS;
config.word_provider = WordList::builtin_eff_general_short().sampler();
config.to_scheme().generate()
}
}

View file

@ -1,5 +1,6 @@
use clap::{Arg, ArgMatches};
use failure::Fail;
use ffsend_api::config::SEND_DEFAULT_HOST;
use ffsend_api::url::Url;
use super::{CmdArg, CmdArgOption};
@ -19,7 +20,7 @@ impl CmdArg for ArgHost {
.long("host")
.short("h")
.value_name("URL")
.default_value("https://send.vis.ee/")
.default_value(SEND_DEFAULT_HOST)
.env("FFSEND_HOST")
.hide_env_values(true)
.help("The remote host to upload to")

View file

@ -8,7 +8,7 @@ pub mod owner;
pub mod password;
pub mod url;
// Re-export to arg module
// Re-eexport to arg module
pub use self::api::ArgApi;
pub use self::basic_auth::ArgBasicAuth;
pub use self::download_limit::ArgDownloadLimit;

View file

@ -1,3 +1,5 @@
extern crate directories;
#[cfg(feature = "infer-command")]
use std::ffi::OsString;
@ -37,15 +39,6 @@ lazy_static! {
/// The default client transfer timeout in seconds as a string
static ref DEFAULT_TRANSFER_TIMEOUT: String = format!("{}", CLIENT_TRANSFER_TIMEOUT);
/// The about notice in command output.
static ref APP_ABOUT: String = format!(
"{}\n\n\
The default public Send host is provided by Tim Visee, @timvisee.\n\
Please consider to donate and help keep it running: https://vis.ee/donate\
",
crate_description!(),
);
}
/// CLI argument handler.
@ -61,8 +54,13 @@ impl<'a: 'b, 'b> Handler<'a> {
let app = App::new(crate_name!())
.version(crate_version!())
.author(crate_authors!())
.about(APP_ABOUT.as_ref())
.after_help("This application is not affiliated with Firefox or Mozilla.")
.about(crate_description!())
.after_help(
"\
The public Send service that is used as default host is provided by Mozilla.\n\
This application is not affiliated with Mozilla, Firefox or Firefox Send.\
",
)
.global_setting(AppSettings::GlobalVersion)
.global_setting(AppSettings::VersionlessSubcommands)
// TODO: enable below command when it doesn't break `p` anymore.

View file

@ -35,7 +35,7 @@ impl<'a: 'b, 'b> UploadMatcher<'a> {
let name = self.matches.value_of("name")?;
// The file name must not be empty
// TODO: allow to force an empty name here, and process empty names on downloading
// TODO: allow to force an empty name here, and process emtpy names on downloading
if name.trim().is_empty() {
quit_error_msg(
"the file name must not be empty",
@ -171,7 +171,7 @@ pub enum CopyMode {
}
impl CopyMode {
/// Build the string to copy, based on the given `url` and current mode.
/// Build the string to copy, based on the given `url` and currend mode.
pub fn build(&self, url: &str) -> String {
match self {
CopyMode::Url => url.into(),

View file

@ -1,14 +1,16 @@
extern crate toml;
extern crate version_compare;
use std::fs;
use std::io::Error as IoError;
use std::path::PathBuf;
use self::toml::de::Error as DeError;
use self::toml::ser::Error as SerError;
use self::version_compare::{CompOp, VersionCompare};
use failure::Fail;
use ffsend_api::{
file::remote_file::{FileParseError, RemoteFile},
url::Url,
};
use toml::{de::Error as DeError, ser::Error as SerError};
use version_compare::Cmp;
use ffsend_api::file::remote_file::{FileParseError, RemoteFile};
use ffsend_api::url::Url;
use crate::util::{print_error, print_warning};
@ -21,7 +23,7 @@ const VERSION_MAX: &str = crate_version!();
#[derive(Serialize, Deserialize)]
pub struct History {
/// The application version the history file was built with.
/// Used for compatibility checking.
/// Used for compatability checking.
version: Option<String>,
/// The file history.
@ -62,9 +64,9 @@ impl History {
// Get the version number from the file
let version = history.version.as_ref().unwrap();
if let Ok(true) = version_compare::compare_to(version, VERSION_MIN, Cmp::Lt) {
if let Ok(true) = VersionCompare::compare_to(version, VERSION_MIN, &CompOp::Lt) {
print_warning("history file version is too old, ignoring");
} else if let Ok(true) = version_compare::compare_to(version, VERSION_MAX, Cmp::Gt) {
} else if let Ok(true) = VersionCompare::compare_to(version, VERSION_MAX, &CompOp::Gt) {
print_warning("history file has an unknown version, ignoring");
}
}
@ -224,7 +226,7 @@ impl History {
///
/// If the expiry property is None (thus unknown), the file will be kept.
///
/// The number of expired files is returned.
/// The number of exired files is returned.
pub fn gc(&mut self) -> usize {
// Get a list of expired files
let expired: Vec<RemoteFile> = self

View file

@ -174,9 +174,6 @@ pub fn print_main_info() -> ! {
println!();
println!("To show all subcommands, features and other help:");
println!(" {}", highlight(&format!("{} help [SUBCOMMAND]", bin)));
println!();
println!("The default public Send host is provided by Tim Visee.");
println!("Please consider to donate and help keep it running: https://vis.ee/donate");
process::exit(1)
}

View file

@ -1,8 +1,10 @@
extern crate pbr;
use std::io::{stderr, Stderr};
use std::time::Duration;
use self::pbr::{ProgressBar as Pbr, Units};
use ffsend_api::pipe::ProgressReporter;
use pbr::{ProgressBar as Pbr, Units};
/// The refresh rate of the progress bar, in milliseconds.
const PROGRESS_BAR_FPS_MILLIS: u64 = 200;
@ -57,17 +59,9 @@ impl<'a> ProgressReporter for ProgressBar<'a> {
/// Finish the progress.
fn finish(&mut self) {
let progress_bar = self
.progress_bar
self.progress_bar
.as_mut()
.expect("progress bar not yet instantiated");
#[cfg(not(target_os = "windows"))]
progress_bar.finish_print(self.msg_finish);
#[cfg(target_os = "windows")]
{
progress_bar.finish_println(self.msg_finish);
eprintln!();
}
.expect("progress bar not yet instantiated")
.finish_print(self.msg_finish);
}
}

View file

@ -76,7 +76,7 @@ pub enum Error {
#[fail(display = "failed to shorten URL, got bad response")]
Response(#[cause] ResponseError),
/// The server responded with a malformed response.
/// The server resonded with a malformed repsonse.
#[fail(display = "failed to shorten URL, got malformed response")]
Malformed(#[cause] reqwest::Error),

View file

@ -1,5 +1,10 @@
#[cfg(feature = "clipboard-crate")]
extern crate clip;
extern crate colored;
extern crate directories;
extern crate fs2;
extern crate open;
extern crate regex;
#[cfg(feature = "clipboard-bin")]
extern crate which;
@ -11,21 +16,21 @@ use std::fmt;
use std::fmt::{Debug, Display};
#[cfg(feature = "clipboard-bin")]
use std::io::ErrorKind as IoErrorKind;
use std::io::{self, Read};
use std::io::{stderr, stdin, Error as IoError, Write};
use std::iter;
use std::path::Path;
use std::path::PathBuf;
use std::process::exit;
use std::process::{exit, ExitStatus};
#[cfg(feature = "clipboard-bin")]
use std::process::{Command, Stdio};
#[cfg(feature = "clipboard-crate")]
use self::clip::{ClipboardContext, ClipboardProvider};
use chrono::Duration;
use colored::*;
use self::colored::*;
#[cfg(feature = "history")]
use directories::ProjectDirs;
use self::directories::ProjectDirs;
use self::fs2::available_space;
use chrono::Duration;
use failure::{err_msg, Fail};
#[cfg(feature = "clipboard-crate")]
use failure::{Compat, Error};
@ -35,7 +40,6 @@ use ffsend_api::{
reqwest,
url::Url,
};
use fs2::available_space;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use regex::Regex;
@ -291,14 +295,14 @@ pub fn highlight_info(msg: &str) -> ColoredString {
}
/// Open the given URL in the users default browser.
/// The browsers exit status is returned.
pub fn open_url(url: impl Borrow<Url>) -> Result<(), IoError> {
/// The browsers exit statis is returned.
pub fn open_url(url: impl Borrow<Url>) -> Result<ExitStatus, IoError> {
open_path(url.borrow().as_str())
}
/// Open the given path or URL using the program configured on the system.
/// The program exit status is returned.
pub fn open_path(path: &str) -> Result<(), IoError> {
/// The program exit statis is returned.
pub fn open_path(path: &str) -> Result<ExitStatus, IoError> {
open::that(path)
}
@ -318,7 +322,7 @@ pub fn set_clipboard(content: String) -> Result<(), ClipboardError> {
/// native clipboard interface only has a lifetime of the application. This means that the
/// clipboard is instantly cleared as soon as this application quits, which is always immediately.
/// This limitation is due to security reasons as defined by X11. The alternative binaries we set
/// the clipboard with spawn a daemon in the background to keep the clipboard alive until it's
/// the clipboard with spawn a daemon in the background to keep the clipboad alive until it's
/// flushed.
#[cfg(feature = "clipboard")]
#[derive(Clone, Eq, PartialEq)]
@ -491,7 +495,7 @@ pub enum ClipboardError {
#[fail(display = "failed to access clipboard using {}", _0)]
BinaryIo(&'static str, #[cause] IoError),
/// `xclip` or `xsel` unexpectedly exited with a non-successful status code.
/// `xclip` or `xsel` unexpectetly exited with a non-successful status code.
#[cfg(feature = "clipboard-bin")]
#[fail(
display = "failed to use clipboard, {} exited with status code {}",
@ -500,8 +504,8 @@ pub enum ClipboardError {
BinaryStatus(&'static str, i32),
}
/// Check for an empty password in the given `password`.
/// If the password is empty the program will quit with an error unless
/// Check for an emtpy password in the given `password`.
/// If the password is emtpy the program will quit with an error unless
/// forced.
// TODO: move this to a better module
pub fn check_empty_password(password: &str, matcher_main: &MainMatcher) {
@ -519,7 +523,7 @@ pub fn check_empty_password(password: &str, matcher_main: &MainMatcher) {
/// Prompt the user to enter a password.
///
/// If `empty` is `false`, empty passwords aren't allowed unless forced.
/// If `empty` is `false`, emtpy passwords aren't allowed unless forced.
pub fn prompt_password(main_matcher: &MainMatcher, optional: bool) -> Option<String> {
// Quit with an error if we may not interact
if !optional && main_matcher.no_interact() {
@ -549,7 +553,7 @@ pub fn prompt_password(main_matcher: &MainMatcher, optional: bool) -> Option<Str
}
}
// On input error, propagate the error or don't use a password if optional
// On input error, propegate the error or don't use a password if optional
Err(err) => {
if !optional {
quit_error(
@ -592,7 +596,7 @@ pub fn ensure_password(
return false;
}
// Check whether we allow interaction
// Check whehter we allow interaction
let interact = !main_matcher.no_interact();
loop {
@ -761,7 +765,7 @@ pub fn ensure_owner_token(
main_matcher: &MainMatcher,
optional: bool,
) -> bool {
// Check whether we allow interaction
// Check whehter we allow interaction
let interact = !main_matcher.no_interact();
// Notify that an owner token is required
@ -984,7 +988,7 @@ pub fn ensure_enough_space<P: AsRef<Path>>(path: P, size: u64) {
}
};
// Return if enough disk space is available
// Return if enough disk space is avaiable
if space >= size {
return;
}
@ -1128,31 +1132,7 @@ impl From<ResponseError> for FollowError {
pub fn rand_alphanum_string(len: usize) -> String {
let mut rng = thread_rng();
iter::repeat(())
.map(|()| rng.sample(Alphanumeric) as char)
.map(|()| rng.sample(Alphanumeric))
.take(len)
.collect()
}
/// Read file from stdin.
pub fn stdin_read_file(prompt: bool) -> Result<Vec<u8>, StdinErr> {
if prompt {
#[cfg(not(windows))]
eprintln!("Enter input. Use [CTRL+D] to stop:");
#[cfg(windows)]
eprintln!("Enter input. Use [CTRL+Z] to stop:");
}
let mut data = vec![];
io::stdin()
.lock()
.read_to_end(&mut data)
.map_err(StdinErr::Stdin)?;
Ok(data)
}
/// URL following error.
#[derive(Debug, Fail)]
pub enum StdinErr {
#[fail(display = "failed to read from stdin")]
Stdin(#[cause] io::Error),
}