操作系统:Ubuntu 20.4.03LTS | Firefox版本:Mozilla Firefox 93.0
我只打开了一个Firefox窗口,在那个窗口中有很多选项卡,我需要一种方法来关闭一个特定的选项卡的标题或Url从命令行,像:close_tab_command https://www.olx.com.pk/item/king-side-beds-for-sale-iid-1039955840
brotab -从命令行控制浏览器的选项卡
准备使用
添加一个扩展到您的浏览器(mozilla/chrome)
https://addons.mozilla.org/en-US/firefox/addon/brotab/
https://chrome.google.com/webstore/detail/brotab/mhpeahbikehnfkfnmopaigggliclhmnc/
安装
https://github.com/balta2ar/brotab/安装别忘了写
$ brotab install
使用>$ brotab --help
...
list list available tabs. The command will request all available clients
(browser plugins, mediators), and will display browser tabs in the
following format: "<prefix>.<window_id>.<tab_id><Tab>Page title<Tab>URL"
close close specified tab IDs. Tab IDs should be in the following format:
"<prefix>.<window_id>.<tab_id>". You can use "list" command to obtain tab
IDs (first column)
$ brotab list
a.1.2 Title URL
a.1.3 ...
a.1.4 ...
$ brotab close a.1.3
$ brotab list
a.1.2 ...
a.1.4 ...