Browse Source

Merge pull request #3 from Epse/master

Match account names case insensitively
master
Andrew Kaiser 6 years ago
committed by GitHub
parent
commit
114507e2d2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/index.js

+ 2
- 1
src/index.js View File

@ -59,7 +59,8 @@ const chooseAccount = async ({ list }) => {
const accountNames = list
.filter(a => a.type === LOGIN_TYPE)
.map(a => `${a.name}: ${a.login.username}`)
const selected = await dmenuRun(accountNames.join('\n'))
// -i allows case insensitive matching
const selected = await dmenuRun(accountNames.join('\n'), '-i')
const index = accountNames.indexOf(selected)
const selectedAccount = list[index]
console.debug('selected account:\n', obfuscate(selectedAccount))


Loading…
Cancel
Save