diff --git a/README.md b/README.md index a3d042c..f69f35b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ clipboard. ## Usage ``` -$ bitwarden-dmemu --help +$ bitwarden-dmenu --help Usage: bitwarden-dmenu [options] The DMENU_PATH environment variable can be used to point to an alternative dmenu implementation. Defaults to 'dmenu'. diff --git a/bin/cli.js b/bin/cli.js index 5cc6ee1..90e3978 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -62,6 +62,10 @@ console.debug = args['verbose'] ? (...msgs) => console.log(...msgs, '\n') : () => {} +console.info = args['stdout'] + ? () => {} + : console.info + const oldestAllowedVaultSync = syncVaultAfter const saveSession = Boolean(sessionTimeout) const sessionFile = path.resolve(os.tmpdir(), 'bitwarden-session.txt') diff --git a/src/index.js b/src/index.js index 7e9e0ef..7873bbc 100644 --- a/src/index.js +++ b/src/index.js @@ -60,7 +60,6 @@ const chooseAccount = async ({ list, dmenuArgs }) => { const loginList = list.filter(a => a.type === LOGIN_TYPE) const accountNames = loginList.map(a => `${a.name}: ${a.login.username}`) - // -i allows case insensitive matching const selected = await dmenuRun(dmenuArgs)(accountNames.join('\n')) const index = accountNames.indexOf(selected) // accountNames indexes match loginList indexes diff --git a/src/schedule-cleanup.js b/src/schedule-cleanup.js index f2ade9a..6d4c394 100644 --- a/src/schedule-cleanup.js +++ b/src/schedule-cleanup.js @@ -21,10 +21,7 @@ module.exports = ({ lockBitwardenAfter, clearClipboardAfter, sessionFile, stdout console.debug(`${sessionFile} already removed.`) } bwRun('lock') - // don't output to stdout if it is being used for reading information - if(!stdout) { - console.info('bitwarden is locked.') - } + console.info('bitwarden is locked.') }), timeout(clearClipboardAfter * 1000).then(() => { if(!stdout) {