TR-42 / minishell

https://tr-42.github.io/minishell/
0 stars 0 forks source link

存在しない変数にargvを生成しないようにした #60

Closed TetsuOtter closed 1 year ago

TetsuOtter commented 1 year ago
$ ./minishell -c './obj/tool_print_argv a "$SPC" $SPC$USE c'
argv[0]: `./obj/tool_print_argv`
argv[1]: `a`
argv[2]: `" "`
argv[3]: `"`
argv[4]: `"`
argv[5]: `c`
bash-3.2$ ./obj/tool_print_argv a "$SPC" $SPC$USE c
argv[0]: `./obj/tool_print_argv`
argv[1]: `a`
argv[2]: `" "`
argv[3]: `"`
argv[4]: `"`
argv[5]: `c`
bash-3.2$ 
TetsuOtter commented 1 year ago

(参考) 修正前

minishell> ./obj/tool_print_argv a$DEF d $GHI j
argv[0]: `./obj/tool_print_argv`
argv[1]: `a`
argv[2]: `d`
argv[3]: ``
argv[4]: `j`
minishell>