Skip to content

Filter tabs before copyWindowInfo #883

Answered by gdh1995
tamwile asked this question in Q&A
Discussion options

You must be logged in to vote

Um like some other tab-related commands, copyWindowInfo support a parameter named filter, and:

  • filter should be a string including a list of filter expressions joined with + or & character
  • in your case, map xxx copyWindowInfo filter="host" should be enough
  • there're so many expressions that I can't list them here, so if you're interested in it, please visit:

for (let item of (filter + "").split(/[&+]/)) {
const rawKey = item.split("=", 1)[0], directHost = rawKey.includes("."), neg = !directHost && rawKey.endsWith("!")
const key = directHost ? "" : (neg ? rawKey.slice(0, -1) : rawKey) || item
const r…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tamwile
Comment options

You must be logged in to vote
1 reply
@gdh1995
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants