Closed camspiers closed 4 years ago
@yardnsm friendly ping 😃
Tried here. It is working smoothly :)
First of all - thanks! While this solution solves #1, it adds some complexity to the user and thus considered more "advanced" IMO.
I would suggest adding a tmux option to use the non-filtering method (the same filter that you used in this PR), for example:
# Default is 'on' in order to not break users
set -g @1password-enabled-url-filter 'off'
I'm all in favor for also keeping the TMUX_1PASSWORD_OP_ITEMS_JQ_FILTER
, but use it as a tmux option as well:
set -g @1password-items-jq-filter '.[] | ......'
And the README should be updated as well:
JQ_FILTER
under the "Configuration" section, as it is a tmux option now.@1password-items-jq-filter
option, for example filtering only the items of a specific category.WDYT?
And sorry for the delay 😅
Sounds good to me, I will have a look into a solution meeting your suggestions some time in the coming week.
@camspiers any updates on this?
@yardnsm @odelucca New version ready for review.
@yardnsm I agree with you. sudolikeaboss
works just in a pretty narrow use case, in my opinion we should support it, but not like we do today :)
Sorry, too much thrash for me.
Resolves #1 by providing two new tmux options:
@1password-enabled-url-filter to disable to default filtering @1password-items-jq-filter to fully customize filtering
Enabled URL Filter
By default, the plugin maintains compatibility with sudolikeaboss by filtering urls using the string "sudolikeaboss://local", by setting the following, the list of items will no longer be filtered.
Default:
'on'
Customize URL Filtering
If complete customization of url filtering is required, a
jq
filter can be provided to filter and map items.Filtering by tags
Filtering by custom url
Default:
''
Items come in the following format from which the filter operates: