【问题标题】:open HTML file using cygstart and a file url使用 cygstart 和文件 url 打开 HTML 文件
【发布时间】:2017-06-06 06:43:07
【问题描述】:

我正在尝试使用 cygstart 在 chrome 中打开本地 HTML 文件。我知道我可以将 cygstart 与 URL 一起使用,但文件名和文件 URL 似乎不起作用:

cygstart index.html
cygstart file://index.html

【问题讨论】:

    标签: cygwin


    【解决方案1】:

    cygstart 根本无法做到这一点。类似于 cURL 如何支持文件协议, 但 wget 没有:

    Why does curl allow use of the file URL scheme, but not wget

    作为一种解决方法,您可以将其放入 ~/.profile 或类似文件中:

    export BROWSER=firefox
    

    那么你可以这样使用它:

    "$BROWSER" file:index.html
    

    Example

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-16
      • 2016-08-29
      • 2014-11-27
      • 2011-09-22
      • 1970-01-01
      • 2017-01-11
      相关资源
      最近更新 更多