-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement $(< file) #273
Comments
Hm it looks like this case triggers a bug:
For some reason completion also doesn't work after |
I can reproduce this without command substitution: |
OK I fixed the location error. I'm not sure about Is it commonly used in scripts, or does POSIX require it? |
No, it's not POSIX. It's used to read a file by people who know of it; e.g., Neofetch uses it. |
An interesting thing about this is that zsh supports an extended version of it. I think bash is just literally special casing
Also, zsh extends the meaning to process subs, like
|
And it also doesn't support pipelines and subshells:
|
This is a curious construct described in issue #273. It works in multiple shells. Also fix lint error, to fix the build.
Internally, $(< file) is rewritten to $(__cat < file) where __cat is a builtin like the external 'cat'. Addresses issue #273.
See Zsh's |
This is basically equivalent to
$(cat file)
in Bash but with builtins.The text was updated successfully, but these errors were encountered: