Skip Navigation

Posts
188
Comments
356
Joined
2 yr. ago

  • Ooh very cool! Thanks for sharing back your solution.

  • Whoops, thanks, I'll edit this into the post.

  • Would you consider editing the main post with the details from here? At least one person here has explicitly said

    wish I’d known that before I ordered

    And I'd guess many here would like to know that before deciding whether to support the company.

  • Apparently it goes toward sending customers "Liberal Moron" shirts instead of their requested designs, and also illegally underpaying employees. So... I doubt it.

  • OK, well FWIW in Zsh you can use a keybind to trigger ZLE functions that turn your already-entered lines back into in-progress lines.

    The most straightforward built-in function for this is push-line-or-edit:

    At the top-level (PS1) prompt, equivalent to push-line. At a secondary (PS2) prompt, move the entire current multiline construct into the editor buffer. The latter is equivalent to push-input followed by get-line.

    So let's say you want to trigger this with ctrl+e, all you need is:

     
        
    bindkey '^e' push-line-or-edit
    
      
  • What behavior are you looking for? Could Zsh with some configuration work?

  • Leaving traffic safety to human police, discretion often means racist biases and outcomes.

  • https://nestedtext.org/

    It’s like yaml but simple, consistent, untyped, and you never need to escape any characters, ever.

    Types and validation aren’t going to be great unless they’re in the actual code anyway.

  • https://nestedtext.org/

    It’s like yaml but simple, consistent, untyped, and you never need to escape any characters, ever.

    Types and validation aren’t going to be great unless they’re in the actual code anyway.

  • https://nestedtext.org/

    It's like yaml but simple, consistent, untyped, and you never need to escape any characters, ever.

    Types and validation aren't going to be great unless they're in the actual code anyway.

  • For managing non-distro versions of language runtimes I suggest rtx.

     
        
    $ cat .tool-versions
    python     system
    nodejs     latest
    rust       system
    elm        latest
    
    $ rtx current
    python system
    node 20.5.0
    rust system
    elm 0.19.1
    
    $ rtx local go@latest  # go gets installed
    $ which go
    /home/andy/.local/share/rtx/installs/go/1.21.0/go/bin/go
    
      
  • meld really is my favorite, but there's also mcdiff from mc, in combination with your editor of choice (use_internal_edit=false). If you can like the internal editor, though, that's got to be a better experience.

    I find a bunch of the themes are unreadable, so am rotating and eliminating with this Zsh function:

     
        
    mcdiff () {
      emulate -L zsh
    
      local skins=(
        gotar
        gray-green-purple256
        modarin256-defbg
        modarin256
        modarin256root-defbg
        modarin256root
        sand256
        seasons-autumn16M
        seasons-spring16M
        seasons-summer16M
        seasons-winter16M
        xoria256
        yadt256-defbg
        yadt256
      )
    
      local skin=${skins[RANDOM % $#skins + 1]}
    
      print -rl -- "Using skin: $skin:t:r"
      =mcdiff -c -S $skin $@
    }
    
      

    For a non-interactive diff viewer I find riff's output pretty legible.

    Other than that, I've used a combination of tools with a broot config to browse and manage the diffs...

  • I wanted to try using yamlpath (yaml-set in particular) to recreate the first example, even though the usage model doesn't quite match up. It's a bit tedious because I don't think you can do unrelated replacements in a single command:

     
        
    $ <<<'{}' yaml-set -g ignored.hello -a world | yaml-set -g tabwidth -a 2 -F dquote | yaml-set -g trailingComma -a all | yaml-set -g singleQuote -a true -F dquote | yaml-set -g semi -a true -F dquote | yaml-set -g printwidth -a 120 -F dquote | yaml-get -p .
    
      

    Trying to make it neater with Zsh and (forbidden) use of eval:

     
        
    $ reps=(ignored.hello world tabwidth 2 trailingComma all singleQuote true semi true printwidth 120) cmd=()
    $ for k v ( ${(kv)reps} )  cmd+=(yaml-set -g $k -a $v -F dquote \|)
    $ <<<'{}' eval $cmd yaml-get -p .
    
      

    EDIT: Ugh I can't figure out how to properly write the less than sign in lemmy comments.

  • Bash code is not safe to run as if it were Zsh, and Zsh has language features Bash doesn't. They are different languages.

  • I see a lot of good recommendations already, and want to add one more suggestion to try: Siduction.

    I'm not sure how exactly its repos match up against the software you want more recent releases for but IMO it's worth checking in a live boot environment or VM.

  • I see you've already got your problem solved, but FYI someone made whatfiles for this purpose.