holzschu / holzschu/a-shell

UNIX Control Operators aren't properly supported

Open
#940 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

UNIX control operators are limited in their behaviour, or do unexpected things. Or both.

I ran into this while attempting to write a shortcut that executes a call to `yt-dlp`. This shortcut needs to block until `yt-dlp` finishes executing. A simple way to do this would have been to execute something like `yt-dlp [args] || open shortcuts://` with a `Wait to return` right after the `Execute`, so that the shortcut swaps to the terminal for execution, then returns to the shortcuts app and continues shortcut execution. However, none of the control operators behave as expected, meaning I can't get this to work.

Some examples (with expected output cross-referenced from a git bash terminal on a windows machine. i don't have a linux desktop, sue me :P)

`echo hello ; cat`
> Expected output
> `hello`
> Actual output
> `hello ; cat`

`echo hello || cat`
> Expected output
> `hello`
> Actual output
> ` `

`echo hello || echo world`
> Expected output
> `hello`
> Actual output
> `world`

` echo hello && echo world`
> Expected output
> `hello`
> `world`
> Actual output
> `hello && echo world`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.