22
submitted 11 months ago by [email protected] to c/[email protected]

I have a few devices running Arch... Rasperrys, laptops, a NAS, etc

After an update I'll run pacdiff to check for any updated configurations to look out for.

On the laptops I'll use meld to compare and it's nice to visually pick and choose what to update.

But for the headless units, I'm using vimdiff and it's sometimes difficult to see what to change - esp. when a few lines in a block of changes needs picking and choosing.

What other approaches are you using for this?

top 4 comments
sorted by: hot top controversial new old
[-] [email protected] 4 points 11 months ago* (last edited 11 months ago)

I use nvim -D which is a lot like vimdiff. Few tips:

  • if the color scheme is unreadable, try :set termguicolors
  • dp to push a diff chunk to the other file
  • do to obtain a chunk from the other file
  • I have alt+hjkl bound to switch windows, which is nice

It works really well for me, I haven't wanted anything else. I'm one of those weirdos who spends all day using neovim, though

[-] [email protected] 2 points 11 months ago

Ah, ok, not tried that... I'll check it out. Thanks

[-] [email protected] 2 points 11 months ago

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...

[-] [email protected] 3 points 11 months ago

Thanks. Interesting points to look at there. I like the look of riff for config comparison we do at work too - thanks!

this post was submitted on 14 Aug 2023
22 points (100.0% liked)

Arch Linux

7357 readers
19 users here now

The beloved lightweight distro

founded 4 years ago
MODERATORS