diff --git a/cli/lesspass/clipboard.py b/cli/lesspass/clipboard.py index 02c38cf..f1f4c49 100644 --- a/cli/lesspass/clipboard.py +++ b/cli/lesspass/clipboard.py @@ -20,7 +20,7 @@ def get_system_copy_command(): if platform.system() == "Darwin" and _copy_available("pbcopy"): return "pbcopy" - for command in ["xsel", "xclip"]: + for command in ["xsel", "xclip", "wl-copy"]: if _copy_available(command): return command @@ -32,6 +32,7 @@ def _popen(args, **kwargs): commands = { "clip": ["clip"], "pbcopy": ["pbcopy"], + "wl-copy": ["wl-copy"], "xsel": ["xsel", "--clipboard", "--input"], "xclip": ["xclip", "-selection", "clipboard"], } diff --git a/cli/lesspass/core.py b/cli/lesspass/core.py index b26b982..4d5e87f 100644 --- a/cli/lesspass/core.py +++ b/cli/lesspass/core.py @@ -17,8 +17,8 @@ def main(args=sys.argv[1:]): args = parse_args(args) if args.clipboard and not get_system_copy_command(): print( - "ERROR To use the option -c (--copy) you need pbcopy " - + "on OSX, xsel or xclip on Linux, and clip on Windows" + "ERROR To use the option -c (--copy) you need pbcopy on OSX, " + + "xsel, xclip, or wl-clipboard on Linux, and clip on Windows" ) sys.exit(3)