diff --git a/README.md b/README.md index 7ac8704..fc55627 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ Expiry: 18h2m (64928s) ``` Other commands include: + ```bash # View your file history $ ffsend history @@ -147,9 +148,6 @@ all available subcommands. - OpenSSL: `brew install openssl@1.1` ## Install - - Because `ffsend` is still in alpha, only limited installation options are available right now. @@ -199,8 +197,8 @@ ffsend --help #### Linux: Nix package _Note: The Nix package is currently not automatically updated, therefore it -might be slightly outdated. Open an issue if you believe an important new -feature is missing._ +might be slightly outdated. Open an issue if you believe an important update +is missing._ ```bash nix-channel --update @@ -341,10 +339,14 @@ docker run --rm -it -v $(pwd):/data timvisee/ffsend download https://send.firefo # Show help docker run --rm -it -v $(pwd):/data timvisee/ffsend help + +# To update the used image +docker pull timvisee/ffsend ``` On Linux or macOS you might define a alias in your shell configuration, to make it invokable as `ffsend`: + ```bash alias ffsend='docker run --rm -it -v "$(pwd):/data" timvisee/ffsend' ``` diff --git a/src/util.rs b/src/util.rs index df3dce2..4932a59 100644 --- a/src/util.rs +++ b/src/util.rs @@ -755,7 +755,8 @@ pub fn format_bool(b: bool) -> &'static str { pub fn bin_name() -> String { env::args_os() .next() - .map(|path| PathBuf::from(path)) + .filter(|path| !path.is_empty()) + .map(PathBuf::from) .or_else(|| current_exe().ok()) .and_then(|p| p.file_name().map(|n| n.to_owned())) .and_then(|n| n.into_string().ok())