Tabs deduplication command with current path protection and bothsidesism

This script adds a TabDedupe command to close duplicate tabs, but with a default option to protect (not close) the current tab so you could just add it to your open new tab/close current tab shortcuts/buttons and not have to manually invoke any dedupe commands, but also not worry that the newly opened tab will be deduplicatedly closed¹
It can also operate on both lister panes

Supported arguments:

  • right close dupes from right to left (default)
  • left close dupes from left to right
  • noprotect close current tab if it's a dupe
  • dual close dupes in left/up and right/down panes

¹ you could also add a dedupe command before opening a new tab, but this had strange side effect of opening a tab at the end of the tabbar instead of near the active tab when you tried to open a 3rd dupe tab

Cmd.TabDedupe.opusscriptinstall (4.6 KB)

3 Likes

I think you forgot to post the script. :slight_smile:

1 Like

Thanks for the pointer!
(I did post it, but the link didn't survive editing :wink: )

1 Like