Skip to content

Commit

Permalink
Merge pull request #107 from msladek/x-sel-primary
Browse files Browse the repository at this point in the history
add clipboardPrimary flag
  • Loading branch information
hazcod authored Jan 4, 2022
2 parents 934bcd2 + 58777c6 commit ff67a82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/enpasscli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ func main() {
logLevelStr := flag.String("log", defaultLogLevel.String(), "The log level from debug (5) to error (1).")
sort := flag.Bool("sort", false, "Sort the output by title and username.")
trashed := flag.Bool("trashed", false, "Show trashed items in output.")

clipboardPrimary := flag.Bool("clipboardPrimary", false, "Use primary X selection instead of clipboard.")

flag.Parse()

if flag.NArg() == 0 {
Expand All @@ -138,6 +139,11 @@ func main() {
command := strings.ToLower(flag.Arg(0))
filters := flag.Args()[1:]

if *clipboardPrimary {
clipboard.Primary = true
logger.Debug("primary X selection enabled")
}

if command == "version" {
logger.Printf(
"%s arch=%s os=%s version=%s",
Expand Down

0 comments on commit ff67a82

Please sign in to comment.