News for hackers. Stuff that matters.
Re:Sudo Replacement by accrual on Friday January 20, 2023 @11:35PM (#34463938)
I noticed and enjoy that both sudo and doas use each side of a standard qwerty keyboard to type, though doas uses 3 keys on the left while sudo has two on the left and two on the right. It made the transition a little easier for my muscle memory.
Re:Sudo Replacement by epakai on Friday January 20, 2023 @11:46PM (#34463986)
On dvorak they're also mostly on the home row (except d), and the split is even 2-2 for both.

(aoeu)id(htns)

Re:Sudo Replacement by scns on Saturday January 21, 2023 @01:45AM (#34464439)
The neo2 layout has both in the home row.
Re:Sudo Replacement by arp242 on Saturday January 21, 2023 @12:21PM (#34468021)
I mapped ^S in zsh to toggle "doas" at the start of the line:

  # Toggle "doas" at the start.
  toggle-doas() {
      [[ "${BUFFER:0:4}" = "doas" ]] &&
          {CURSOR+=-5; BUFFER="${BUFFER:5}";} ||
          {BUFFER="doas $BUFFER"; CURSOR+=5;}
  }
  zle -N toggle-doas toggle-doas && bindkey '^s' toggle-doas
Even less typing!