Skip to content

Commit

Permalink
fix(ls): makes ls command search case insensitive
Browse files Browse the repository at this point in the history
When passing in a search term to the `ls` command, it now does a case insensitive search.

Fixes #93
  • Loading branch information
beauraines committed Oct 16, 2023
1 parent 93e546f commit a6c35d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmds/ls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export const handler = async function (argv) {
})
timeEntries.sort((a, b) => (a.start > b.start) ? 1 : -1)
if (argv.searchStrings) {
const searchString = argv.searchStrings.join(' ')
const searchString = argv.searchStrings.join(' ').toLowerCase()
debug(searchString)
timeEntries = timeEntries.filter(x => x.description.includes(searchString))
timeEntries = timeEntries.filter(x => x.description.toLowerCase().includes(searchString))
}

const workspaces = await client.workspaces.list()
Expand Down

0 comments on commit a6c35d9

Please sign in to comment.