GithubHelp home page GithubHelp logo

palortoff / pass-extension-wclip Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 4.0 3 KB

A pass extension to clip on windows

License: MIT License

Shell 100.00%
pass password-store wclip clipboard extension

pass-extension-wclip's Introduction

pass wclip

An extension for the password store that copies a stored password into the windows clipboard using wclip to hide it from password history managers.

Usage

pass wclip pass-name

Example

pass wclip email/gmail

Parameters

As pass wclip uses the show command internally the --clip or -c parameter can be used to specify the line number.

pass wclip -c2 email/gmail
pass wclip --clip=6 email/gmail

Installation

(This extensions is for windows only)

  • First you have to enable extensions in pass by setting PASSWORD_STORE_ENABLE_EXTENSIONS=true
  • Add the wclip.bash file to .password-store/.extensions
    • Either copy the file or
    • Clone this repo as a submodule into .password-store/.extensions/wclip and
    • Create a symlink (in an elevated cmd, not in bash)
cd %userprofile%\.password-store\.extensions
mklink wclip.bash wclip\src\wclip.bash

Contribution

Contributions are always welcome.

pass-extension-wclip's People

Contributors

omnitroid avatar palortoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pass-extension-wclip's Issues

Putty support

Does this extension supports cut&paste from putty/kitty?

Two possible errors in wclip.bash

I installed wclip into ~/.password-store/.extensions/wclip.bash. When I tried pass wclip secret I got the errors below:

/home/me/.password-store/.extensions/wclip.bash: line 6: /dev/clipboard: No such file or directory
/home/me/.password-store/.extensions/wclip.bash: line 7: wclip: command not found
Error: Could not copy data to the clipboard

This is windows 10, if that helps.

Proposal for better compatibility with WSL2

This is connected to the issue reported as Two possible errors in wclip.bash, caused by non-existing /dev/clipboard under WSL2

I run into it too and have addressed it by usage of another tool win32yank
So in my case your wclip.bash has this small change

local before="$(base64 < /dev/clipboard)"

become

local before="$(win32yank -o | base64)"

So, my proposal would be to add another option to your wclip.exe e.g. --print which would print content of clipboard to the stdout. Advantage would be removal of dependency to /dev/clipboard with usage of already used application instead of adding second one. And as your wclip.exe application is already meant to work with windows clipboard this looks to me as a natural enhacement.
The ultimate version would then be

local before="$(wclip --print | base64)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.