You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shellac clients are typically shells. They should handle dequoting / "static" evaluation of the command string into a partial argv array, so that the completion plugin doesn't need to parse shell. The completion plugin is only responsible for understanding the argv array.
Here are some important cases for POSIX shells. Obviously, alternative shells like fish will have their own dequoting / evaluation rules.
ls | wc -
echo hi && wc -l
echo $(dirname f
echo `dirname f
Those should get expanded into:
["wc", "-"] # lines 1 and 2
["dirname", "f"] # lines 3 and 4
The rest of the command line is considered irrelevant for completion. All shell operators should be removed.
Quoting:
echo 'filename with spac
echo filename\ with\ spac
Should be expanded to:
["echo", "filename with spac"] # dequoted partial argv