<#7497 Avoid use of shell-processed characters suc...
# meltano-repo-activity
g
#7497 Avoid use of shell-processed characters such as
*
in CLI
Issue created by WillDaSilva Context: • #7467 (comment) --- Currently
meltano state list
accepts a
--pattern
argument which can use
*
as a wildcard. Since most shells expand this character, it must be quoted. We have no way to enforce quotation of the argument, and no practical way to detect when an error occurs because it was not quoted. # List only those state IDs that start with "dev:" meltano state list 'dev:*' # List only those state IDs that contain "tap-gitlab" meltano state list --pattern '*tap-gitlab*' We should consider discouraging the use of the
--pattern
option (but not removing it!), and offer an alternative instead such as
--prefix
,
--suffix
, and `--infix`/`--contains` options. These don't provide the same flexibility as the pattern option, but they aren't susceptible to the issue described above. This approach is currently used by the Cloud CLI for the
history
command. As part of this issue, the Meltano CLI guidelines should be updated to explain why accepting
*
in CLI arguments should be avoided when practical. This also applies to other symbols which have special meanings to shells, such as
<
,
>
,
$
,
&
,
~
,
'
,
"
, and backticks. meltano/meltano