3 ms·
The shell doesn't know what the underlying filesystem is. : is special on NTFS for alternative data streams, and I think HFS+ named forks? (The mac syntax is f
by dsl 5y ago
The shell doesn't know what the underlying filesystem is.
: is special on NTFS for alternative data streams, and I think HFS+ named forks? (The mac syntax is foo/..namedfork/rsrc, I don't know how that translates to linux)
"foo\:bar" is a file name with a colon in it. "foo:bar" is an ADS named bar on the file foo.
- Arnavion 5y agoMaybe. The motivation may have been lost to history. bash added `:` to the list of completion word break characters with bash 2.0 [1][2]. Bash 2.0 was released in 1996. NTFS-3G started in 2006 but it was "forked from the Linux-NTFS", and I can't find any history for this project. NTFS itself was released in 1993. HFS+ seems to have been released in 1998, so it can't be the reason. But even regular HFS had resource forks and it was released in 1985. No idea where to look in ksh's source. [1]: https://github.com/bminor/bash/commit/ccc6cda312fea9f0468ee65b8f368e9653e1380b#diff-b8fb328cf74196c51b622571b2c765c857d4c5e766b0ce4b550f77280892e64eL239 https://github.com/bminor/bash/commit/ccc6cda312fea9f0468ee6... [2]: https://github.com/bminor/bash/commit/ccc6cda312fea9f0468ee65b8f368e9653e1380b#diff-b8fb328cf74196c51b622571b2c765c857d4c5e766b0ce4b550f77280892e64eR129 https://github.com/bminor/bash/commit/ccc6cda312fea9f0468ee6...
- teddyh 5y ago> "foo\:bar" is a file name with a colon in it. "foo:bar" is an ADS named bar on the file foo. That does not make sense. The shell does not itself know anything about ADSs, and therefore, in both cases, sends the string "foo:bar" as arguments to commands.