set -o errexit
in bash/zsh/ksh is always in effect? That is the only behavior that will keep me from using Elvish on a daily basis and contributing to its development given my reading of the documentation and experimenting with the implementation for a few days. Simply running a command like grep
that might return a non-zero exit status for a non-fatal reason (e.g., nothing matched the pattern) should not be a fatal error by default. It is unreasonable to be required to wrap every command of thaat nature in a try { command } except { }
block.
grep
but it is by no means the only example.
try { } except { }
block.
if ?(echo abc | grep a) { ... }
.
I'm having trouble defining an edit:arg-completer
for git. Here's what I've got in my rc.elv (basically just copied from the documented recipe):
# git branch completion
all-git-branches = [(e:git branch -a --format="%(refname:strip=2)" | eawk [0 1 @rest]{ put $1 })]
edit:arg-completer[git] = [args]{
n = (count $args)
if (eq $n 2) {
put st co rebase stash
} elif (ge $n 3) {
put $@all-git-branches
}
}
my git commands sometimes will do filename completion, but other than that all I get is the "unsupported completion :(" message
[zhsj] Would it possible to add changelog in the code repo?
[xiaqqaix] I haven't considered that before. What's the advantage?
[xofyarg] apt changelog elvish
[zhsj] no, apt changlog will not show changlog of upstream
[xiaqqaix] Does that require the changelog to be in the same code repo? I would be a bit surprised if it does
[zhsj] So I can ship changlog in package (though I think nobody will read it
[xiaqqaix] Does that require the changelog to be in the same code repo? I would be a bit surprised if it does
[zhsj] So I can ship changlog in package's document (though I think nobody will read it