earthicko/ddsh

prompt에서 $var 입력 후 확장이 일어나지 않는 경우

Closed this issue · 1 comments

실제 bash에선 그냥 다음줄로 넘어감.
우리 쉘에선 cmd not found 출력.
만약 수정하려면 처리하기 꽤 까다로울 것 같음
응용으로 $var a | $var b 입력시 원래는
cmd not found a, b 떠야함.

expand node 실행할 때 해당 로직에서 체크해서 해야할듯.

Word Splitting 관련 내용이므로 구현할 필요 없음

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Word-Splitting

Explicit null arguments ("" or '') are retained and passed to commands as empty strings. Unquoted implicit null arguments, resulting from the expansion of parameters that have no values, are removed. If a parameter with no value is expanded within double quotes, a null argument results and is retained and passed to a command as an empty string. When a quoted null argument appears as part of a word whose expansion is non-null, the null argument is removed. That is, the word -d'' becomes -d after word splitting and null argument removal.