manually call the others
Yeah, most distros will set up source
chains to make things nicer for users.
manually call the others
Yeah, most distros will set up source
chains to make things nicer for users.
Yeah, I’d write this as a single update
script with options to update vimplugins
or update pkg
or update all
.
I see that you want it to be a function so you can get the chdir as a side effect, but mixing that with updating doesn’t make sense to me.
When in doubt, ~/.zshrc
. It’s the right choice 99% of the time. Otherwise, there’s a chance you fuck up scripts you’ve installed which assume no shell options have been changed in non-interactive contexts.
What kind of functions do you write which you share between your scripts? Generally if I’m wanting to reuse a non-trivial function, I extend the functionality of the first script instead.
Select the color which matches the steps before filenames ((non-)login and (non-)interactive), then follow that arrow the rest of the way. There’s more colors in Bash because Bash makes a distinction between remote and local shells.
Another way to look at the same data for Zsh (note: $ZDOTDIR
will be used instead of $HOME
if it’s defined at any step along the way):
File | neither | interactive | login | both |
---|---|---|---|---|
/etc/zshenv |
x | x | x | x |
${ZDOTDIR:-$HOME}/.zshenv |
x | x | x | x |
${ZDOTDIR:-$HOME}/.zprofile |
x | x | ||
${ZDOTDIR:-$HOME}/.zshrc |
x | x | ||
${ZDOTDIR:-$HOME}/.zlogin |
x | x | ||
${ZDOTDIR:-$HOME}/.zlogout |
x | x |
One confusion on the Bash side of the diagram is that you see branching paths into ~/.profile
, ~/.bash_profile
and ~/.bash_login
. Bash will use for ~/.bash_profile
, ~/.bash_login
, and ~/.profile
, in that order, and execute only the first one that exists and is readable.
CSS is turing conplete.
You could still NAT between v6’s though.
I care mostly about shell scripting, so I’m focusing on those bits. Via the HackerNews thread, mostly from a-french-anon:
Nope. If you open a nonexistent path and you have permissions to write to that directory, then that file is created.
I run my Nextcloud behind Tailscale, and Caddy handles theTailscale https certs.
in the OP
My reply is to a commenter who said they prefer "${HOME}/docs"
over both options in the original image ("$HOME/docs"
or "$HOME"/docs
). Many people prefer to always include braces around the parameter name out of consistency, instead of only when they are required.
My comment explained why my habit is to only include braces when they are necessary.
It’s interesting, the results here are way different than the Code Golf & Coding Challenges Stack Exchange. I would never expect Haskell to be that low. But after looking at code.golf, I realize it’s because I/O on CG&CC is more relaxed. Most Haskell submissions are functions which return the solution.
Sidenote: I like the CG&CC method, it’s semi-competitive, semi-cooperative.
IMO It’s geared towards what is the best part about code golf: teaching people about algorithm design and language design.
This has never stuck with me, and I hadn’t thought about why until now. I have two reasons why I will always write ${x}_$y.z
instead of ${x}_${y}.z
:
$x_
being expanded as ${x_}
."$#array[3]"
actually prints the length of the third item in array
, rather than (Bash:) the number of positional parameters, then the string 'array[3]'
.This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
Typically find "$HOME/docs"
, but with a few caveats:
In Zsh or Fish, the quotes are unnecessary: find $HOME/docs
If I’m using anything potentially destructive: mv "${HOME:?}/bin" ...
Of course, if it’s followed by a valid identifier character, I’ll add braces: "${basename}_$num.txt"
Excuse me, OCI container, we’re a runtime-agnostic family here.
I was going to say “At least I can click ‘Continue reading’ and it actually goes away immediately” but actually, no. This is still enshittification, I’ve just gotten used to shittier versions of it.
Fwiw, gitea has compatible actions. Not sure how compatible, though.
Stole Forked this idea from Drew Devault.
I’m looking at NixOS now for my server, and while I understand the host config, I’m curious whether I could integrate this into my config in some way.
I know that “Vanity Addresses” are a common thing for onion sites, and there are tools which generate tons of keys looking for prefixes. I haven’t seen such a tool for ssh host keys though.