summaryrefslogtreecommitdiffstats
path: root/vendor/opener
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/opener
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/opener')
-rw-r--r--vendor/opener/.cargo-checksum.json2
-rw-r--r--vendor/opener/Cargo.toml26
-rw-r--r--[-rwxr-xr-x]vendor/opener/Drakefile.ts0
-rw-r--r--[-rwxr-xr-x]vendor/opener/LICENSE-APACHE200
-rw-r--r--[-rwxr-xr-x]vendor/opener/LICENSE-MIT20
-rw-r--r--[-rwxr-xr-x]vendor/opener/LICENSE-THIRD-PARTY20
-rw-r--r--vendor/opener/README.md28
-rw-r--r--vendor/opener/src/lib.rs10
-rw-r--r--[-rwxr-xr-x]vendor/opener/src/xdg-open19
9 files changed, 295 insertions, 30 deletions
diff --git a/vendor/opener/.cargo-checksum.json b/vendor/opener/.cargo-checksum.json
index 9f0ef06c4..bffe903f7 100644
--- a/vendor/opener/.cargo-checksum.json
+++ b/vendor/opener/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"ee161809cf1f818ecb2952d86acfc4867224e9f6f1cf83a6828eee6316ad5271","Drakefile.ts":"e357716de020b86a99b96b0b345651f3b2654e77dcb5c7fa98edea4a2a374589","LICENSE-APACHE":"154397a08d0cb342110281129971868cd562542d0780b0d10722788cd11a1399","LICENSE-MIT":"72af89a828df52a9dcc42512ed64663b3b8d7961dd7a5586d44478eede82bc7a","LICENSE-THIRD-PARTY":"0a22326fd75448038b10861d0abb270d607348458c875e9e774fbf8d7d5bd052","src/lib.rs":"8981b76e1c5eae38418ac334c51993d9faf27775e7df800c680eb802883c41e2","src/linux_and_more.rs":"96912d2099ac0cad116160b9147d46c8c374f191796c2095a1c56519feed4909","src/macos.rs":"38e762e83064c2150a125b6e6c477640652f9dceeeadbeeda64d0edd4936cf01","src/windows.rs":"d0ed2e6ae1deb8ded4eb8cc9204a868290f390aa9078b7cd953b1dfbd2261c25","src/xdg-open":"a99799b070c39e9788d097f1057bdee688248c5f3df82353beebe90c561aeb75","tests/version-numbers.rs":"8069cb08b31531f8eb5e164089b1acbe7dc77e4ba87dcc0a3717205446847795"},"package":"4ea3ebcd72a54701f56345f16785a6d3ac2df7e986d273eb4395c0b01db17952"} \ No newline at end of file
+{"files":{"Cargo.toml":"2cfbe75ecb3af9664c3db6ea65f3d70494beea3fd86efc213c306194ed9f037b","Drakefile.ts":"e357716de020b86a99b96b0b345651f3b2654e77dcb5c7fa98edea4a2a374589","LICENSE-APACHE":"8f3c95de851c0acc9d1cbaa95e500e4198408283b853ed3e355ce27112057b44","LICENSE-MIT":"1847e0e0698142ed4347c1441a9fa81c8fbddd44b1d8bbcd5e3647f991759d7f","LICENSE-THIRD-PARTY":"d1bd8c7783bffd68a6207d89d9243eece7e7df0bb6bcb605f76d9684621c2e35","README.md":"1f8d189094fa1b22436dbf98d8c5f6e87178b42224e6f94d21ceefec44b76070","src/lib.rs":"0992c8f29d4776fc8f36623ec810fc1faf602a55321ab321a2c379bdb2dec696","src/linux_and_more.rs":"96912d2099ac0cad116160b9147d46c8c374f191796c2095a1c56519feed4909","src/macos.rs":"38e762e83064c2150a125b6e6c477640652f9dceeeadbeeda64d0edd4936cf01","src/windows.rs":"d0ed2e6ae1deb8ded4eb8cc9204a868290f390aa9078b7cd953b1dfbd2261c25","src/xdg-open":"25c6bf62d29b61696881695a47994d503ee9bbd9402b8256b3a3e87e495be75e","tests/version-numbers.rs":"8069cb08b31531f8eb5e164089b1acbe7dc77e4ba87dcc0a3717205446847795"},"package":"293c15678e37254c15bd2f092314abb4e51d7fdde05c2021279c12631b54f005"} \ No newline at end of file
diff --git a/vendor/opener/Cargo.toml b/vendor/opener/Cargo.toml
index bbc220c45..8d91b5ef3 100644
--- a/vendor/opener/Cargo.toml
+++ b/vendor/opener/Cargo.toml
@@ -3,31 +3,39 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "opener"
-version = "0.5.0"
+version = "0.5.2"
authors = ["Brian Bowman <seeker14491@gmail.com>"]
description = "Open a file or link using the system default program."
-readme = "../README.md"
-keywords = ["open", "default", "launcher", "browser"]
+readme = "README.md"
+keywords = [
+ "open",
+ "default",
+ "launcher",
+ "browser",
+]
categories = ["os"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/Seeker14491/opener"
+
[dev-dependencies.version-sync]
version = "0.9"
+
[target."cfg(target_os = \"linux\")".dependencies.bstr]
-version = "0.2"
+version = "1"
+
[target."cfg(windows)".dependencies.winapi]
version = "0.3"
features = ["shellapi"]
+
[badges.appveyor]
branch = "master"
repository = "Seeker14491/opener"
diff --git a/vendor/opener/Drakefile.ts b/vendor/opener/Drakefile.ts
index 476cb23d9..476cb23d9 100755..100644
--- a/vendor/opener/Drakefile.ts
+++ b/vendor/opener/Drakefile.ts
diff --git a/vendor/opener/LICENSE-APACHE b/vendor/opener/LICENSE-APACHE
index 965b606f3..4c8c37f5d 100755..100644
--- a/vendor/opener/LICENSE-APACHE
+++ b/vendor/opener/LICENSE-APACHE
@@ -1 +1,199 @@
-../LICENSE-APACHE \ No newline at end of file
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/vendor/opener/LICENSE-MIT b/vendor/opener/LICENSE-MIT
index 76219eb72..6802bc4b8 100755..100644
--- a/vendor/opener/LICENSE-MIT
+++ b/vendor/opener/LICENSE-MIT
@@ -1 +1,19 @@
-../LICENSE-MIT \ No newline at end of file
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/vendor/opener/LICENSE-THIRD-PARTY b/vendor/opener/LICENSE-THIRD-PARTY
index 03ded5598..10307a7b6 100755..100644
--- a/vendor/opener/LICENSE-THIRD-PARTY
+++ b/vendor/opener/LICENSE-THIRD-PARTY
@@ -1 +1,19 @@
-../LICENSE-THIRD-PARTY \ No newline at end of file
+- xdg-utils: https://cgit.freedesktop.org/xdg/xdg-utils/plain/LICENSE
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ #
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ #
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/vendor/opener/README.md b/vendor/opener/README.md
new file mode 100644
index 000000000..d204ac804
--- /dev/null
+++ b/vendor/opener/README.md
@@ -0,0 +1,28 @@
+# Opener
+
+This crate provides the ability to open a file or link with the default program configured on the system.
+
+See the docs for more details:
+
+### [Docs](https://docs.rs/opener)
+
+## License
+
+Licensed under either of
+
+* Apache License, Version 2.0
+ (http://www.apache.org/licenses/LICENSE-2.0)
+* MIT license
+ (http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Third party software
+
+See LICENSE-THIRD-PARTY
+
+## Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
+dual licensed as above, without any additional terms or conditions.
diff --git a/vendor/opener/src/lib.rs b/vendor/opener/src/lib.rs
index a84f9491a..ee00d37a2 100644
--- a/vendor/opener/src/lib.rs
+++ b/vendor/opener/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc(html_root_url = "https://docs.rs/opener/0.5.0")]
+#![doc(html_root_url = "https://docs.rs/opener/0.5.2")]
//! This crate provides the [`open`] function, which opens a file or link with the default program
//! configured on the system:
@@ -140,15 +140,11 @@ impl Display for OpenError {
status,
stderr,
} => {
- write!(
- f,
- "command '{}' did not execute successfully; {}",
- cmd, status
- )?;
+ write!(f, "command '{cmd}' did not execute successfully; {status}")?;
let stderr = stderr.trim();
if !stderr.is_empty() {
- write!(f, "\ncommand stderr:\n{}", stderr)?;
+ write!(f, "\ncommand stderr:\n{stderr}")?;
}
}
}
diff --git a/vendor/opener/src/xdg-open b/vendor/opener/src/xdg-open
index db75e146a..cc682437e 100755..100644
--- a/vendor/opener/src/xdg-open
+++ b/vendor/opener/src/xdg-open
@@ -147,7 +147,7 @@ first_word()
binary_to_desktop_file()
{
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
+ binary="`command -v "$1"`"
binary="`readlink -f "$binary"`"
base="`basename "$binary"`"
IFS=:
@@ -162,7 +162,7 @@ binary_to_desktop_file()
# Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
+ command="`command -v "$command"`"
if [ x"`readlink -f "$command"`" = x"$binary" ]; then
# Fix any double slashes that got added path composition
echo "$file" | sed -e 's,//*,/,g'
@@ -204,7 +204,7 @@ desktop_file_to_binary()
if [ -r "$file_path" ]; then
# Remove any arguments (%F, %f, %U, %u, etc.).
command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
+ command="`command -v "$command"`"
readlink -f "$command"
return
fi
@@ -453,7 +453,7 @@ detectDE()
DE=gnome;
;;
LXDE|Lubuntu)
- DE=lxde;
+ DE=lxde;
;;
MATE)
DE=mate;
@@ -466,7 +466,7 @@ detectDE()
if [ x"$DE" = x"" ]; then
# fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
+ case "$(uname 2>/dev/null)" in
CYGWIN*)
DE=cygwin;
;;
@@ -479,7 +479,7 @@ detectDE()
if [ x"$DE" = x"gnome" ]; then
# gnome-default-applications-properties is only available in GNOME 2.x
# but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
+ command -v gnome-default-applications-properties > /dev/null || DE="gnome3"
fi
if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then
@@ -559,7 +559,7 @@ get_key()
is_file_url_or_path()
{
if echo "$1" | grep -q '^file://' \
- || ! echo "$1" | egrep -q '^[[:alpha:]][[:alpha:][:digit:]+\.\-]*:'; then
+ || ! echo "$1" | grep -Eq '^[[:alpha:]][[:alpha:][:digit:]+\.\-]*:'; then
return 0
else
return 1
@@ -768,7 +768,6 @@ search_desktop_file()
if [ -r "$file" ] ; then
command="$(get_key "${file}" "Exec" | first_word)"
- command_exec=`which $command 2>/dev/null`
icon="$(get_key "${file}" "Icon")"
# FIXME: Actually LC_MESSAGES should be used as described in
# http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html
@@ -808,7 +807,7 @@ search_desktop_file()
args=$(( $args - 1 ))
done
[ $replaced -eq 1 ] || set -- "$@" "$target"
- "$command_exec" "$@"
+ env "$command" "$@"
if [ $? -eq 0 ]; then
exit_success
@@ -899,7 +898,7 @@ open_generic()
open_generic_xdg_mime "$file" "$filetype"
fi
- if which run-mailcap 2>/dev/null 1>&2; then
+ if command -v run-mailcap >/dev/null; then
run-mailcap --action=view "$file"
if [ $? -eq 0 ]; then
exit_success