Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Add a fact for an unquoted glob character in the authored word

Aberta
#235 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp
Domínio
backend

Direção de pesquisa

Start by locating AnalyzedArgument.MayPathnameExpand and the argument analysis code that sets it; the issue does not name files or tests. Trace how authored words and quoting are represented, then add a separate fact for unquoted authored glob characters while preserving MayPathnameExpand semantics. Verify the examples in the issue, including quoted and expansion-only cases; done means the new fact distinguishes them without changing the existing fact.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Problem

AnalyzedArgument.MayPathnameExpand (0.4.0-beta.19) is true for two different
cases:

  1. The authored word has an unquoted glob character (*, ?, [), for
    example ../netclaw/"${d}s"/*.
  2. The authored word has an unquoted expansion whose value can contain a glob
    character, for example $n after n=$(date).

A consumer cannot tell these cases apart. Netclaw needs the difference for an
output command (echo, printf):

  • In case 1, the authored glob can list protected file names, so the consumer
    applies its glob rule.
  • In case 2, the owner decision of netclaw-dev/netclaw#2349 keeps the operand
    as data.

Today Netclaw cannot apply that decision when an assignment supplies the
value. n=$(date); echo $n gets one exact prompt, and an unattended run
denies it. An attempt to treat every such operand as data also made
d=key; echo ../netclaw/"${d}s"/* data, which is not safe.

Request

Add a general per-argument fact that is true only when the authored word has
an unquoted glob character. A suggested name is HasUnquotedGlobCharacter.
MayPathnameExpand keeps its meaning.

Examples

Word MayPathnameExpand New fact
$n true false
/work/$f true false
"${d}s"/* true true
*.cs true true
"$n" false false
'*.cs' false false

A brace word stays opaque and needs no new value.

Consumer

netclaw-dev/netclaw#2349, review comment 4187346452.

Linguagem predominante
C#
Estrelas
15
Forks
0
Merge médio
9h 8min
PRs com merge (30d)
46

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Aaronontheweb/ShellSyntaxTree

Todas as issues de Aaronontheweb/ShellSyntaxTree

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.