V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
githmb
V2EX  ›  程序员

世界是一个巨大的草台班子?还是这是 Linux 系统的什么古老传统?

  •  
  •   githmb · 1 天前 · 677 次点击

    先看看你们能不能发现 file 命令的输出有什么问题:

    $ file xxx
    xxx: cannot open `xxx' (No such file or directory)
    

    如果这是打字错误,为什么整个程序的 N 多个文件几乎都是一样的错误? 具体有多少处错误,请看 PR: https://github.com/file/file/pull/153/commits/1dccbb66b0a13ca269bac131050ea7cd9def044c

    莫非是什么老传统吗?

    momocraft
        1
    momocraft  
       1 天前   ❤️ 1
    如果你想说`'不配对:可以看看 https://en.wikipedia.org/wiki/Quotation_mark
    imjiaoyuan
        2
    imjiaoyuan  
       1 天前
    [jy@DESKTOP-K4AB7QI work]$ file commands.sh
    commands.sh: POSIX shell script, Unicode text, UTF-8 text executable, with very long lines (309)
    [jy@DESKTOP-K4AB7QI work]$
    cnachen
        3
    cnachen  
       1 天前
    是老传统
    githmb
        4
    githmb  
    OP
       1 天前
    @momocraft 没看懂,反引号可以和引号混用吗?
    xyfan
        5
    xyfan  
       1 天前   ❤️ 2
    让我想起了 LaTeX 为了区分左右引号,使用 ` 代表左单引号,' 代表右单引号, `` 左双引号,'' 右双引号
    1423
        6
    1423  
       1 天前
    这个 PR 有点想当然了
    ztmzzz
        7
    ztmzzz  
       1 天前   ❤️ 1
    @githmb
    wiki 上有一段说明这是 tex 的传统。
    The typesetting application TeX uses this convention for input files. The following is an example of TeX input which yields proper curly quotation marks.

    ``Good morning, Dave,'' said HAL.
    `Good morning, Dave,' said HAL.
    gnu 上使用`和'表示左右引号,见 https://github.com/coreutils/gnulib/blob/master/lib/quotearg.c 的 354 行。
    也可以看 gnu 网页的说明 https://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Quoting-Style.html
    mikewang
        8
    mikewang  
       22 小时 24 分钟前   ❤️ 1
    或许,某种意义上来说,` 和 ' 都是 “借用” 来的,两个原本都不是引号:

    Grave accent (`): 重音符,一种变音符号,用于法语等。例:là。转义字符是 ` 。
    Apostrophe ('):撇号,用于名词所有格或者省略等。例:let's 。转义字符是 ' 。

    我猜测一些老旧字体会把 apostrophe 显示成右引号的样子 (看起来像:Let’s),这没有什么问题;
    但是用作为单引号就比较奇怪(看起来像:’Hello’)。
    于是就用 grave accent 作为左引号(看起来像:‘Hello’)。
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1737 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 16:17 · PVG 00:17 · LAX 09:17 · JFK 12:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.