Skip to content

Commit

Permalink
Adds xsel support
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarte committed Oct 1, 2021
1 parent 8d15450 commit 62b6902
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

* Prompt user to open snippet in editor when editing existing snippet. #104

* Support xsel as an alternative to xclip.

## [0.14.4] - 2021-09-05
### Fixed
* .deb package extended description
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Table of Contents
# Install

## Requirements
`xclip` on Linux and `pbcopy` on OSX
`xclip` or `xsel` on Linux and `pbcopy` on OSX

## Binaries
See the [releases](https://github.com/out-of-cheese-error/the-way/releases/latest)
Expand Down
6 changes: 6 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ mod copy {
pub const ARGS: [&str; 3] = ["-in", "-selection", "clipboard"];
}

#[cfg(target_os = "linux")]
mod copy {
pub const COMMAND: &str = "xsel";
pub const ARGS: [&str; 3] = ["-ib"];
}

#[cfg(target_os = "macos")]
mod copy {
pub const COMMAND: &str = "pbcopy";
Expand Down

0 comments on commit 62b6902

Please sign in to comment.