Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    tunabot
    @tunabot
    [xiaq] i particularly don't like the fact in [a b c]{ ... } there must be no space between ]{
    [xiaq] i am also thinking about supporting docstrings as part of the syntax. that's also something to consider if we want to change the lambda syntax.
    tunabot
    @tunabot
    lostsummer joined chat
    tunabot
    @tunabot
    [xiaq] Test fishroom
    Kurtis Rader
    @krader1961
    What is the rationale for Elvish behaving as if the equivalent of doing 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.
    Kurtis Rader
    @krader1961
    Also, I've read the "unique semantics" document. Specifically the section "Exit Status and Exceptions". The problem is it says "Elvish has no concept of exit status". Then goes on to say that an external commands non-zero exit status is turned into an exception. Which is okay if explicitly enabled but should not be the default behavior.
    tunabot
    @tunabot
    [xiaq] krader1961, do you propose to make it an option whether to treat non-zero exit status as exception?
    tunabot
    @tunabot
    [xiaq] If so: no. External command interaction is a fundamental shell feature, and it is a sign of poor design to make such fundamental semantics customizable. We can think about how to document it better, how to make it more ergonomic. Or getting rid of it. But making it customizable solves no problem
    Kurtis Rader
    @krader1961
    I am not sure how to deal with this. The same discussion has occurred in the Fish shell project. What I do believe, quite strongly, is that a non-zero exit status of an external command should not be a fatal error by default. There are too many commands which exit with a non-zero status that do not indicate a fatal error.
    The canonical example being grep but it is by no means the only example.
    If I write a elvish script that invokes such commands it is unreasonable to require me to wrap every invocation in a try { } except { } block.
    tunabot
    @tunabot
    [xiaq] There is a more lightweight ?() syntax for capturing exceptions, which include non-zero exit status
    Kurtis Rader
    @krader1961
    Note that Elvish builtins and functions can be exempted from this although I don't see a good reason to do so. Since builtins and functions can explicitly raise an exception rather than simply exit with a non-zero status.
    tunabot
    @tunabot
    [xiaq] krader1961, elvish functions do not have exit status
    Kurtis Rader
    @krader1961
    So you expect every invocation of an external command in a Elvish script which might return a non-fatal non-zero status to be wrapped like this: ?(echo abc | grep def)?
    And that doesn't even work unless you do it in the context of something like if ?(echo abc | grep a) { ... }.
    tunabot
    @tunabot
    [xiaq] It depends on your intention when using grep. There are two typical uses: one is for determining whether a string occurs, as in “if some-cmd | grep -q xxx” (this is posix sh). In that case, you can simply wrap it inside ?()
    [xiaq] Another is filtering lines that contain a string. In that case you need to suppress the exception when grep finds no match and exits with 1. I have long wanted to provide a syntax for that but you see I am really lazy :)
    [xiaq] AFAIK, most commands exit with 1 on non-fatal errors, and it would be nice to be able to suppress such errors.
    tunabot
    @tunabot
    [xiaq] I do not want to burden the user with the overhead of explicitly handling non-fatal errors; in this aspect our goals are aligned. But I also do not want any fatal error to go unnoticed.
    Russell
    @miller-time

    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

    Russell
    @miller-time
    sorry, probably wrong room. posted in elvish-public
    tunabot
    @tunabot
    [xiaqqaix] Packagers: I have updated the description for Elvish. It now reads:
    [xiaqqaix] Elvish is a cross-platform shell, supporting Linux, BSDs and Windows. It features an expressive programming language, with features like namespacing and anonymous functions, and a fully programmable user interface with friendly defaults. It is suitable for both interactive use and scripting.
    tunabot
    @tunabot
    zzamboni joined chat
    tunabot
    @tunabot
    [xiaqqaix] I just tagged 0.11-rc2 as zhsj discovered build failures on Debian and submitted a fix. This will become 0.11 later this week if no other severe bugs are discovered
    [xiaqqaix] Draft of the release note: http://draft.elvish.io/blog/0.11-release-notes.html You are all invited to review it! :) But please do not share this draft elsewhere yet
    tunabot
    @tunabot
    [zzamboni] @xiaqqaix no mention of epm in the release notes?
    [zhsj] Would it possible to add changelog in the code repo?
    tunabot
    @tunabot

    [zzamboni] @xiaqqaix no mention of epm in the release notes?

    [xiaqqaix] It's better to announce it after merging your PR and having some test usage; that will be in 0.12.

    [zzamboni] @xiaqqaix sounds good to me
    [xiaqqaix] It feels a bit too much a hassle to announce it now, only to announce some big changes next version
    [zzamboni] yes, makes sense

    [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
    tunabot
    @tunabot
    [xiaqqaix] Does that require the changelog to be in the same code repo? I would be a bit surprised if it does

    [xofyarg] apt changelog elvish

    [zhsj] no, apt changlog will not show changlog of upstream

    [xiaqqaix] Although on the other hand, I am considering merging the website repo into the main code repo
    [zzamboni] @xiaqqaix was there a way to forward-declare a function, so it can be used before its body appears in the file?
    [zzamboni] I seem to remember something about it, but can't find it
    [zzamboni] sorry, this is more for the other group

    [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

    tunabot
    @tunabot

    [xiaqqaix] Although on the other hand, I am considering merging the website repo into the main code repo

    [zhsj] That would be great, so I can ship usage documents too

    [zhsj] If the documents merged into main repo, we can also generate man pages
    tunabot
    @tunabot
    [xiaqqaix] 0.11 has been tagged. Release note: https://elvish.io/blog/0.11-release-notes.html
    Ming Hu
    @mingwho
    Hey guys I'm new to open source development but very interested in this project, and would love to contribute
    ged
    @gedw99
    elves looks amazing
    It looks like its built for doing pipelines from terminal ?
    on ALl Desktop OS's which is amazingly useful