NireBryce

reality is the battlefield

the first line goes in Cohost embeds

๐Ÿฅ I am not embroiled in any legal battle
๐Ÿฆ other than battles that are legal ๐ŸŽฎ

I speak to the universe and it speaks back, in it's own way.

mastodon

email: contact at breadthcharge dot net

I live on the northeast coast of the US.

'non-functional programmer'. 'far left'.

conceptual midwife.

https://cohost.org/NireBryce/post/4929459-here-s-my-five-minut

If you can see the "show contact info" dropdown below, I follow you. If you want me to, ask and I'll think about it.


Is there a glaring downside for me using ;: for in-line comments in my scripts after a command is run, for home use?

for instance,
echo "test" ;: this is here to demonstrate the use

My understanding is ; ends the command and : no-ops the input until it hits a ;, so :; should emulate in-line comments

Which is the opposite of elisp comments, which is sort of poetic. but lets set that aside for now

But I'm wondering if there's risk in assuming only ; ends the no-op or if there's something that could bite me

(For those who can't wrap your head around it, I've only just barely skimmed but this seems an accessible explanation if you have familiarity with linux cli)

Edit:

I gave up. Behold: 'i will just use the comment highlighting scheme'


"Thats unreadable! Especially rotated like that!" you might say. But I'm the only one who has to read them, unless some poor soul decides to grab my dotfiles

first person to recommend org mode gets sent to chroot jail is2g


You must log in to comment.

in reply to @NireBryce's post:

i mean, you're still subject to regular bash grammar if you do that... most comments would be safe, but some of them could accidentally introduce code execution (like `` and $() and anything after &)

may i ask why ;: # instead of ## or #> or some other false digraph beginning with the comment character?

i doubt ;: is going to introduce any seriously noticeable lag in any shell script, but it just seems potentially more confusing

(now i've been nerd sniped about how to inject commands into a shell script... and i remembered there's also <(blah blah) to run blah blah in a sub shell and return a path to its stdout as a file, like cat <(echo haha))

zplug was choking on it when sourcing the file with my zplug package list on launch, but maybe I need to run something different because those commands are expected to be run manually, I'll go digging

like the real problem here is that I'm trying to make things as reproducible as I can without completely learning nix enough to actually daily drive it, but eventually I'm just going to give in

update: uh, rebooting WSL fixed it, ## works again, something was up

deciding to take caution for once in my life, I have ended up just doing all of them as pre-comments because I can just use comment highlighting plugins for everything, and have everyone who isn't me hate me. See edit