Skip to content
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

usage bash: add support for reading script from a pipe #157

Open
powerman opened this issue Nov 5, 2024 · 0 comments
Open

usage bash: add support for reading script from a pipe #157

powerman opened this issue Nov 5, 2024 · 0 comments

Comments

@powerman
Copy link

powerman commented Nov 5, 2024

I've tried to quickly test usage with usage bash <(printf '#!/bin/bash\n#USAGE bin "pipe"\necho ok\n') and noticed it does not work (maybe because input file type is a pipe).

$ bash <(printf '#!/bin/bash\n#USAGE bin "pipe"\necho ok\n')
ok
$ usage bash <(printf '#!/bin/bash\n#USAGE bin "pipe"\necho ok\n')
$ echo $?
0
$ ls -l <(printf '#!/bin/bash\n#USAGE bin "pipe"\necho ok\n')
lr-x------ 1 powerman powerman 64 ноя  5 09:08 /proc/self/fd/12 -> 'pipe:[29095089]'
$ cat <(printf '#!/bin/bash\n#USAGE bin "pipe"\necho ok\n')
#!/bin/bash
#USAGE bin "pipe"
echo ok
$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant