Skip to content

Commit ff67a82

Browse files
authored
Merge pull request #107 from msladek/x-sel-primary
add clipboardPrimary flag
2 parents 934bcd2 + 58777c6 commit ff67a82

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/enpasscli/main.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ func main() {
119119
logLevelStr := flag.String("log", defaultLogLevel.String(), "The log level from debug (5) to error (1).")
120120
sort := flag.Bool("sort", false, "Sort the output by title and username.")
121121
trashed := flag.Bool("trashed", false, "Show trashed items in output.")
122-
122+
clipboardPrimary := flag.Bool("clipboardPrimary", false, "Use primary X selection instead of clipboard.")
123+
123124
flag.Parse()
124125

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

142+
if *clipboardPrimary {
143+
clipboard.Primary = true
144+
logger.Debug("primary X selection enabled")
145+
}
146+
141147
if command == "version" {
142148
logger.Printf(
143149
"%s arch=%s os=%s version=%s",

0 commit comments

Comments
 (0)