Current State
Currently, with invalid global config, the command sncast completions will silently fail.
That means our starkup-added logic for loading completions:
# BEGIN FOUNDRY COMPLETIONS
_snforge() {
if ! snforge completions zsh >/dev/null 2>&1; then
return 0
fi
eval "$(snforge completions zsh)"
_snforge "$@"
}
_sncast() {
if ! sncast completions zsh >/dev/null 2>&1; then
return 0
fi
eval "$(sncast completions zsh)"
_sncast "$@"
}
compdef _snforge snforge
compdef _sncast sncast
# END FOUNDRY COMPLETIONS
will fail if we have invalid global config, e.g. one that has recently deprecated Starkscan as block explorer:
[sncast.default]
account = "user1"
network = "sepolia"
block-explorer = "StarkScan"
and the user won't have access to completions, which seems hard to debug for user to me.
Objective
sncast completions should skip the config loading parsing it doesn’t use anything from config anyway
Additional Context
There are maybe other commands that are loading config while they don't have to.
But, this is mainly important in completions context, since these are loaded based on starkup-added logic in .bashrc / .zshrc
Current State
Currently, with invalid global config, the command
sncast completionswill silently fail.That means our starkup-added logic for loading completions:
will fail if we have invalid global config, e.g. one that has recently deprecated
Starkscanas block explorer:and the user won't have access to completions, which seems hard to debug for user to me.
Objective
sncast completionsshould skip the config loading parsing it doesn’t use anything from config anywayAdditional Context
There are maybe other commands that are loading config while they don't have to.
But, this is mainly important in completions context, since these are loaded based on starkup-added logic in
.bashrc/.zshrc