[-] gamma@programming.dev 0 points 1 year ago* (last edited 1 year ago)

Nothings bad about it. I don't think it's strictly better or worse. Just

  • I'm used to it
  • The comparison in the video was just disingenuous.
[-] gamma@programming.dev 1 points 2 years ago

What about adding the flags last?

rm deletethisrepo -rf
[-] gamma@programming.dev 1 points 2 years ago

You could still NAT between v6's though.

[-] gamma@programming.dev 1 points 2 years ago

How is it compared to wofi?

[-] gamma@programming.dev 0 points 3 years ago

I run my Nextcloud behind Tailscale, and Caddy handles theTailscale https certs.

[-] gamma@programming.dev 1 points 3 years ago

CorrectionsIt impressively identified exactly what eoo meant, and handled the array splicing, but it tripped over Zsh's globbing syntax.

/(#m)^-*: This is a pattern match within a substitution. It matches any occurrences of hyphens (-) at the beginning of each element.

  1. The : in ${foo:/pat/repl} requires pat to match the whole element
  2. The ^ actually negates the match, rather than anchors it to the start. ^-* matches any element not beginning with a hyphen.
  3. The (#m) flag captures the whole match in the parameter $MATCH.
  4. ${MATCH:a} transforms relative paths to absolute paths.

Full contextI use this as a wrapper around nvim --remote to make sure any non-options (i.e.: files) I pass have absolute paths rather than relative paths.

[-] gamma@programming.dev 1 points 3 years ago* (last edited 3 years ago)

Here's all the ones I was considering. I only posted the first two here. I'll add the explanations later.

ZDOTDIR="${${(%):-%x}:P:h}"                                              # posted 
reply=( ${(M)dirs:#*/$~pattern}(Noe['REPLY=${(l[3][0])#REPLY:t}'][1]) )  # posted
typeset -a $1=("${(@ps[$2])"${2:-"$(<&0)"}"}")
local d=("${(@s[/])${(%):-%~}}")
print -rn $termcap[sc]${termcap[ch]//(\%i|\%p1|\%d)}$termcap[ct]${(j::)s}$termcap[rc]
[ "${(Oa@)argv[1,-2]}" "${argv[-1]//(#m)[\[\]]/${(#)$((6 ^ #MATCH))}}"   # this one is definitely not useful
set -- "${@[0,eoo]:/(#m)^-*/${MATCH:a}}" "${@[eoo+1,-1]:a}"
[-] gamma@programming.dev 1 points 3 years ago

Plus there's kickstart.nvim if you want a more general-purpose starting point. I'm actually switching to it as a starting point now, and figuring out how to transfer anything I need from my old vimrc.

[-] gamma@programming.dev 0 points 3 years ago* (last edited 3 years ago)

Are you just posting your own blog posts so there's stuff to read here?

Yes.

Will you stop?

Hey, if you want to see and share other guides or questions, please post them!

view more: ‹ prev next ›

gamma

0 post score
0 comment score
joined 3 years ago
MODERATOR OF