« first day (3349 days earlier)      last day (45 days later) » 

12:50 AM
@sourcejedi I just worry that user will now go off to answer SE's survey and be taken as an expert on how non-welcoming U&L SE is, and how we should never do such things again.
 
 
6 hours later…
7:03 AM
This is something I noticed about my email hosting provider, Luxsci, which let's a lot of spam through. The headers contain the following line:
> X-Lux-State: Email message > 200KB in size. Basic anti-Spam filtering skipped.
??!!
 
7:32 AM
:-) So, if someone wants to spam you, they just need to make sure to send large enough email? That makes sense.
 
8:31 AM
@Kusalananda I hope that's meant sarcastically.
Lusci has a separate spam plan, so it's possible they are deliberately disabling spam filtering. That would go some way towards explaining why the spam filtering is so bad.
Weird, I lost the connection to SE Chat on the line I was using, though the internet connection still seemed to be up. Oh, well. Switched to my other line.
It's at times like this that I'm glad I have two lines. Sigh.
 
@FaheemMitha Yes. Sorry.
 
@Kusalananda No apology necessary. Just checking.
This piece of insanity is currently being debated in India - en.wikipedia.org/wiki/…
In case anyone is interested.
 
9:17 AM
@StephenKitt @cas: The Debian Lua packages are in a horribly unmaintained state, but in many cases, uploading new/fixed versions would not be hard. In fact, quite easy. Do you know anyone who would be willing to sponsor Lua package uploads?
 
10:04 AM
@FaheemMitha Ondřej possibly; given that Enrico is on the LowNMU list, you could prepare an upload (even adding yourself as co-maintainer) and file an RFS, even look for a sponsor on debian-mentors
The usual caveats with a language apply: you should test reverse-dependencies as much as possible, at least rebuild them with the updated package...
And of course the upload should take care of as many bugs as possible (in particular, the security issue, although since I haven’t reviewed it I don’t know whether it really is important).
 
@StephenKitt I've tried asking for sponsors on debian mentors in the past. I think there is also a web site one can upload on. I've got a whole lot of nothing in return.
I've found it more productive to try to contact people directly. Not that I'm found much interest in that direction either.
 
That’s unfortunate!
My experience of debian-mentors is the opposite: every time I’ve picked up an RFS and started the back-and-forth with the uploader, someone else has come along and sponsored the package without comment. I’ve pretty much given up reviewing packages now as a result.
 
@StephenKitt I see. My specific experience was with CCL. Which is Common Lisp.
That might be untypical, I suppose.
 
And Lua probably is too ;-).
 
@StephenKitt Probably is what?
@StephenKitt That's unfortunate too. Did the person coming by see that you were in the process of a dialog? If so, that's not very polite.
 
10:13 AM
@FaheemMitha is probably untypical, in the same way as CCL.
 
@StephenKitt Ah. Well, Lua is more widely used than Common Lisp.
 
@FaheemMitha everything was set correctly on the bugs (ownership etc.) but the person in question didn’t pay attention to that.
@FaheemMitha yes, indeed; but given the state of the package I think the community of interested Debian developers is of a similar size...
 
@StephenKitt That sucks. Did you say anything?
@StephenKitt That's a likely possibility, certainly.
Who is this Ondřej you speak of?
 
@FaheemMitha yes, the first two or three times.
 
I didn't think DDs were so ill-mannered. Live and learn.
 
10:26 AM
@FaheemMitha I don’t think it’s a case of “ill-mannered”, more a case of trying to be helpful by doing things quickly (which of course could be considered “ill-mannered”).
 
@StephenKitt If you are already working with the packager, they should find someone else to work with.
 
@Wildcard well... let's try not to bring up the firestorm, if we don't need to. IMO it wouldn't hurt for SE to have another look at user feedback on the specific feature they felt so strongly about.
 
I'm sure there is plenty of work to go around. Though I suppose DDs would tend to restrict themselves to software they're familiar with.
 
10:49 AM
@StephenKitt Thank you. Is there any easy way of seeing if the DD has been active recently?
 
@FaheemMitha go to their contributor page, e.g. contributors.debian.org/contributor/ondrej%40debian.org
 
@sourcejedi hi there. yesterday I was suprised that "closing as duplicate" will redirect the OP links, which is sort off a hidden operation. But those OP can still be found but tend to be upvoted less often I guess
 
Hi @dotbit . Reading you loud and clear :-).
 
11:04 AM
@sourcejedi a closed duplicate has its original link redirected which is quite unsuspected after it seemed to work and point to the OP at first, but no longer does. some might not savour this, including myself.
it would be better if the popupWindow that announces "dupe closing" would make that abundantly clear instead of clouding the "bitter reality" of redirection
 
@dotbit I just tried with unix.stackexchange.com/questions/552462/… in a private window, and it doesn’t redirect
and the question appears stand-alone in a Google web search: google.com/…
 
sourcejedi: fyi : the site does a weird instant redirect AWAY FROM the duplicated-against question, in EVERY situation without consent of the OP. seen as unfriendly by some.
 
@StephenKitt it only happens if the duplicate question also does not have an answer.
 
@sourcejedi ah, right!
 
how can it get an answer if it got closed then ?
 
11:10 AM
@dotbit someone answered before it was closed.
 
not in my case
 
@StephenKitt if both me and you are a bit confused by this, I think it's fair to think the feature is a bit confusing :-).
 
@sourcejedi yes, indeed
I also wonder if Google gets served a different page, without an immediate redirect
 
it has significant p!ss-off value to be honest
 
@StephenKitt I don't know. Originally, yes. But originally, the Link sidebar did not include ?noredirect=1, so it went round in a circle
 
11:12 AM
s.o. might have posted the original LINK in several place which are now near worthless
 
@dotbit if you can still edit the other places, you can add ?noredirect=1 on the end of the link, is my point.
 
@dotbit The reasoning behind the automatic redirect is that a dupe with no answers is unhelpful to someone landing on the page from a search engine. Sometimes they will just see the question, that it has no answer, and then they leave. It does not matter how many hours you spent on crafting your question if it's a duplicate, it's still a duplicate.
 
sourcejedi yeah so why did you not tell me when I needed to know that ?
 
@StephenKitt I don't know what/if SE is doing to tell Google to prefer the duplicate target, now that Google can find the ?redirect=no links.
 
It was discussed and implemented some 7 years ago I believe.
 
11:14 AM
@dotbit I didn't know
@dotbit I provided that information in an answer to your Meta question just now.
@dotbit if you look in this chat transcript, you will find me being confused and Kuslananda linking me the old Meta.SE explanations about this :-).
 
as laid out, people should be informed about that consequence of "dupe close" right there and then to avoid significant frustration and anger
 
@dotbit Why? Would it not be better to search the site for similar questions before spending time writing a dupe?
 
yes now we know...
 
@sourcejedi well, it looks like Google sees the original page but then the user gets redirected immediately anyway. So the existence of the duplicate does still help search engines, except most users can’t see that.
and other search engines show weird content, e.g. DDG shows the summary of dotbit’s question, with the title of the linked dupe!
 
@Kusalananda Kusa, that really depends. I did not find the dupe, for example, because it was dubiously worded . at one point you stop searching and post yourself, naturally.
 
11:19 AM
@StephenKitt eww. I'm sure Google have reviewed this in some way, but like the other Meta's say, I'm surprised that's allowed by Google's rules.
Showing the snippet like Google does there feels like bait and switch.
 
@Kusalananda Kusa, actually you are wrong in that the case in point is not strictly a duplicate. A true 100% verbatim duplicate would be wortless, bus as u ureself point out: the secondary post was meticulously crafted and THUS NOT A DUPLICATE in the true sense. You misapply the word.
 
@dotbit a friendly general warning, try not to clutter the tech questions up with too much meta discussions about how the site features work. I'm making sure to answer your question on Meta, because a lot of the comments on the main Q&A site are likely to get "cleaned up".
 
@dotbit SE’s definition of “duplicate” is indeed confusing, which is why the phrasing around the whole issue was reworked recently. SE allows questions which are answered by answers to another question, to be closed, with a link to the other question.
 
@dotbit (asking in chat can be OK too, within reason)
 
There’s a conflict of interest here: the user wants an answer to their specific question, with all its subtleties; but SE wants to have all the best answers in the same place.
And usually the older question ends up being used as the link target, even if it’s not the best question.
 
11:27 AM
I'm perfectly happy with users reopening a duplicate question if the answers to the linked question does not answer the question. If the linked question's anwers do answer the question, there is no point in reopening the dupe.
In fact, it happens with some frequency taht a question gets closed as a dupe, the user modifies the question to point out the points that are not answered by the other question's answers, and the question is reopened. No drama.
 
@Kusalananda agreed.
 
This is, I believe, the way it should work.
 
@Kusalananda Kusa, you actually tacitly admit that your "linked posts" are indeed not duplicates in a strict sense.
Kusa you should know full well that there is a closing frenzy ongoing of enormous proportions.
 
@dotbit I'd appreciate it if you do not abbreviate my name.
 
fine
 
11:32 AM
And yes, I subscribe to StackExchange's definition of duplicate.
It's their site, after all.
 
with rather dire consequences of penalizing non-duplicates in a real sense.
 
Character-by-character duplicates are exceedingly rare.
 
owner or not, they can still be wrong. owners often are, look at SCU UNIX.
 
In fact, I don't think I've seen one.
 
you mean, a lot of non-duplicates get closed as duplicates.
 
11:34 AM
@dotbit Think about it. You asked a question. It got flagged as a duplicate. The duplicate contains answers to your issue. Who does not win?
 
those who want the original link not tampered with.
 
The way I see it. You resolved your issue, which is what this site is about. That, and providing future readers with solutions to the same issue.
 
but my post has next to no chance of upvote.
 
No, because it was a duplicate.
 
I told you many times now: IT IS NOT A DUPLICATE, OK ?
 
11:37 AM
If it's reputation points you're after. It's usually easier to get these by writing well formulated answers to questions.
 
that is not how stuff works mate
 
@dotbit You also said it was a duplicate.
 
because I was mislead by the popup and other comments
I retracted that ill informed statement
 
I'm not sure what it is you are actually rebelling against. Is it simply that less people will read what you have written?
You posted your own answer to that other question. And I believe it received at least one up-vote.
 
You will be OK with whatever the owners want. no point argueing, dude.
keep suqqing up to them
 
11:43 AM
I'm not "suqqing" up to anyone. I'm agreeing with them that a question that has the same exact answers as another question is a dupe of that question.
As I said. No two questions will ever be the same, apart from by accident. Answering questions that have already been answered is tiring and unnecessary, and the quality of answers will go down over time if that is allowed to happen.
Better then to mark one question as a dupe of another. That way, if someone comes up with a new and novel way to solve the issue (like you did!), that can be added to the other answers.
A consequence of this is that more people will see your answer.
 
Are "polls" an old feature that doesn't exist anymore? There's a screenshot of an old notice that uses the word "poll". unix.meta.stackexchange.com/questions/66/…
 
@sourcejedi I saw that bubble up. I'm not entirely sure what that refers to.
That was 10 years ago too.
 
but NO ONE will see it under the original link I disseminated.
unless I repost a modified link.
which I was not made aware of how to modify to begin with
 
12:41 PM
@StephenKitt Ok, thank you. I'll try to remember that.
 
 
1 hour later…
1:43 PM
@dotbit I am having trouble understanding what bothers you, to be honest. Surely the objective is to get an answer, right? And the duplicate's answer did provide you with an answer, right? And your own post is still indexed by search engines, so its presence will make it easier for the next person to find the duplicate. I really don't understand what the issue is.
Is it that you want your post to be seen? Why? It's a question, those exist to be answered. Why is seeing the question so important?
And if you've shared the original link, then people will still find the answer (and more easily since they will be redirected). Isn't all this a good thing? What am I missing?
 
2:20 PM
@terdon They may or may NOT find my answer, and in a more difficult way since they will be redirected elsewhere. In this case, I not only asked a Q but later actually provided a solution myself as part of the question text block.
the link given initially after posting did no longer work as intended which is "surprising" to say the least.
 
2:40 PM
anyone here use Guix package manager?
I want to understand it's package installation procedure. I've recently installed Guix on Debain
It seems it's downloading packages then probably compiling locally? at /gnu/store
 
3:06 PM
Hi @Paṇḍyā. How are you doing?
 
3:26 PM
@FaheemMitha Fine, How are you? meeting after long time!
 
@Kusalananda Using your full name: "Oh powerful and merciful god of great answers, our savior of shell perils, our god Kusalananda" may be a bit long, don't you think? ;-) ;-)
 
3:44 PM
@dotbit There are two things here. First, questions should be questions and answers need to be posted separately. That is essential since that is the only way people can vote on answers and the entire system is based on votes. So no matter what, the answer would always have been removed from the question.
Second, if your question was closed as a dupe, @dotbit, then why not post your answer on the duplicate? That way, everyone will benefit!
As for the link, you give a link, people click on it and get taken to where they can find an answer to their question. How else should it work? If you post your answer on the dupe, you will then be able to link to your answer directly.
 
@Paṇḍyā I'm ok, I guess.
Can't say the same of India, though.
 
4:10 PM
@Isaac I dunno. I didn't make the name up :-) You can drop the flowers and garlands though.
 
@FaheemMitha Normally regexps are resolved for longest match first ("greedy"). E.g., (a*)(a+) against aaaa would give aaa and a
Would have to check the Lua docs to see if they do anything weird, been a bit since I worked with Lua
 
@derobert I don't follow. Is (a*)(a+) one pattern?
 
yeah
a* (a, repeated 0 or more times) will grab aaa and then a+ (a, repeated 1 or more times) will grab a
 
@StephenKitt Well, I don't think I'm going to be building any new Lua packages. At least not without a significant investment of time. I tried to get a library to build for 5.3, and it promptly failed with a C compile error.
@derobert So going from left to right, the first match grabs everything possible?
 
yeah
 
4:22 PM
Because a+ has to be at least 1 char?
 
yep. Conceptually, the a* first grabs everything. But then the match fails (because a+ fails), so it "backtracks", trying a* grabbing one less than everything. That succeeds.
 
@derobert @MichaelHomer I'm considering using LPEG in desperation. The default pattern stuff is a bit underpowered (and my best effort doesn't quite work), and I can't get rexlib to build for 5.3.
@derobert Does this backtracking actually start over from the beginning. Or is more a sort of tree search kind of thing?
@derobert If you had to do Lua pattern matching, what would you use?
Or I guess I could ask for help on SO? I've got a version that almost works, though it wouldn't win any points for elegance.
 
@FaheemMitha Actual implementations employ a lot of tricks to avoid the backtracking. But its conceptually a go back to the last match, try the next possibility, see if that works brute-force type of thing
 
@derobert Hmm. One would hope it could do better than that.
Any opinion about LPEG?
Incidentally, the error I get is exactly the same as this one -> github.com/keplerproject/luasql/issues/30
If I want to make a global change of one piece of text for another across all subdirs of a dir, what's the best tool to use?
 
Perl :-)
 
4:36 PM
769
Q: How can I replace a string in a file(s)?

terdonReplacing strings in files based on certain search criteria is a very common task. How can I replace string foo with bar in all files in the current directory? do the same recursively for sub directories? replace only if the file name matches another string? replace only if the string is found...

 
@terdon Thanks. A priori, I'd expect a sed incantation of some kind.
 
5:09 PM
@Kusalananda :-) So, are you giving me permission to "abbreviate your name" to the simple and more mundane Mr. Kusalananda ? Thanks for such high honor. ... You may address me by my abbreviated name of: "Isaac, God solver of all shell mysteries" for short, you can skip the other 20 titles and degrees. :-P ( nothing to be taken seriously in any sense! )
 
@Isaac :-) Sir.
I just answered (or actually, undeleted and modified an old answer of mine) the most downvoted, still not closed, question on the site (-23). It is a fairly interesting issue relating to parsing out directories from $PATH and looking for specific files in them. It's not a trivial issue.
I wonder why it was voted into oblivion? Well, it's a homework question, obviously, but it's still an interesting thing to poke at (and it's quite old by now).
 
This library has bindings for different regex libraries - rrthomas.github.io/lrexlib
Which one should I use, and why? The list includes POSIX, GNU, and PCRE.
 
@FaheemMitha :-) Well, POSIX of course? No, use whatever feels most natural to you.
 
@Kusalananda I don't know anything about this stuff.
Michael earlier had a PCRE recipe. I guess that's Perl?
Is that some kind of standard?
 
@FaheemMitha PCRE is as standard as the Perl language (not at all, but fairly stable).
 
5:24 PM
@Kusalananda So commonly used?
 
@FaheemMitha Yes. If you need to do things like negative/positive lookahead/lookbehind, then use PCRE.
GNU is a bit of a mix between POSIX and some minor features of PCRE, like being able to use \w, \d, \s etc.
I don't really see much point in those, except that someone with a typing impairment may find them easier to write.
 
@Kusalananda Hmm. So is PCRE the most widely used of those?
 
5:44 PM
@FaheemMitha Generally, yes. On the Unix command line, no. It depends on the application area.
 
5:59 PM
@Kusalananda I'm not using it on the Unix command line.
 
6:11 PM
@FaheemMitha if you're going to learn one flavor, I would suggest PCRE. It is the most powerful of the three (by far), it has better syntax (IMO) and it is ubiquitous in the GNU world. Sed doesn't suport it (but GNU sed supports some of its features) but grep does and so do many, many programming languages.
@Kusalananda really? You don't see why \s would be better than [:[space]:]?
Or whatever that weird BRE syntax is?
I'm starting to understand why you're a Windows user... :P
 
@terdon Ok, I'll do that. I'm unclear how LPEG fits into this, but it seems it's not a regular expression thingy. And my background in this area is too deficient for me to have an idea of what it is. At least, without more study.
 
@terdon peanut gallery: I'd find [[:space:]] more self-documenting than \s -- is that whitespace or non-whitespace?
 
[[:blank:]] but yes. [[:space:]] is different.
@terdon :-P
 
@JeffSchaller yes, that's fair. But I find the double brackets really confusing (as I just demonstrated by showing my inability to even remember the damn things)
 
Haven't booted the Windows laptop in a year.
 
6:13 PM
So you say...
 
Say so I do.
 
heh
Also, the [[:space:]] is longer which means not only harder to type but more error prone. You need to enter 11 characters. That's 11 opportunities for error as opposed to two with \s.
 
\s and [[:space:]] are not the same. \s matches spaces or tabs. This is what [[:blank:]] is for. [[:space:]] additionally matches newlines, carriage returns, form feeds, and vertical tabs.
Same as isspace() in C.
As I said. \s is fine if you have trouble writing, or have an extremely short attention span, or if you're extremely eager to get things going.
Well, personal opinion, and all that.
 
6:40 PM
I wonder if I can go the entire Winterbash without earning a hat
 
@JeffSchaller Unlikely. There should be a hat for that.
 
Hmmm, looks like all but 1 are under my control; weird goal, but there it is
@Kusalananda the no-hat hat? looks like a black hole?
or maybe it says "I hate hats" on it?
 
@JeffSchaller That hat that is actually a cigar.
Or was that a pipe?
That would be even more fitting.
On account of the plumbing that you do around here.
 
nice -- plumbing -> pipes -> fitting
 
Maybe just a Mario moustache?
 
6:45 PM
thanks for choosing the top end of Mario
 
That's all I know about the character right there.
 
well, it was just a lark after seeing Stéphane's icon with rainbow vomit; I'm not going to fret too much
 
:-)
 
Would anyone care to recommend a PCRE tutorial?
Oh, and can I assume PCRE 2?
 
7:00 PM
@FaheemMitha This seems like a lot more work than just writing the trivial loop for this particular problem, honestly
 
@MichaelHomer Trivial loop?
 
Remember where the last / and . are and then substr between them
 
7:13 PM
@FaheemMitha Is there an actual problem you're trying to solve? I must have missed that...
 
@Kusalananda Of course. I wasn't trying to learn this stuff for my entertainment.
I mean, maybe you guys consider it fun...
If I want to match an actual dot/period, do I go with [.] or "\."?
 
@FaheemMitha Either.
 
@Kusalananda Ok. Any reason to prefer one over the other?
 
Most people seem to prefer \.
 
@Kusalananda Ok. Is there a reason to do so?
 
7:24 PM
Maybe because they save a precious keystroke?
There is no reason other than aesthetics to choose one over the other as far as I know.
 
Ah, yes. Less keystrokes are better. But perhaps "[.]" is clearer?
 
I would say that "it looks balanced".
I've never really liked escaping stuff with backslash. It looks messy.
(Which is part of the reason I favour [[:blank:]] over \s)
 
Also double-backslashing is a pain for languages where they're written in strings
 
7:46 PM
@Kusalananda Also arguably more explicit.
 
So it is
 
 
2 hours later…
9:17 PM
@Kusalananda there are so many regex flavors I had to actually check. In Vim, \. is interpreted differently depending whether "magic" or "nomagic" is set. But turns out the same is true of [.] vs. \[.]. And then there's \_. which will match newlines also, but so far as I know that's unique to Vim. :)
 
magic is default in Vim, I believe.
 
@FaheemMitha Use regular-expressions.info to learn (all flavors of regexes) and regex101.com to try (some/several) regexes on line. Of course, teh easiest to learn are BRE expressions but the least powerful, then jumping the gap to ERE (extended) comes quite easy. PCRE are quite complex as there are many options/alternatives. Just my 2¢ here.
 
@Isaac Thanks. I'm actually looking at regular-expressions.info right now. PCRE looks like a reasonable choice, but for now I'll just learn enough to get my job done.
Are you familiar with LPEG? Or even just PEG?
 
I have some ideas about both. What do you want to do to any/both? @FaheemMitha
 
@Isaac I don't understand the question.
 
9:27 PM
@FaheemMitha I am trying to know or ask what is it that you try to implement using Lua and LPEGs?
Understand that LPEG are NOT regex-es. Are two diferent, but related, things.
 
@Isaac Oh, I'm just trying to do a simple bit of pattern matching. Split a pathname. So for example if I have /foo/bar/baz.jpg, I want to extract the baz.
But I also want it to handle corner cases the way I want.
@Isaac I understand that LPEG is different from regexes, but I don't know what it is.
 
I'll be back in 15 minutes, sorry. .... @FaheemMitha
 
@Isaac Not carefully, no.
 
9:50 PM
@FaheemMitha .*/([^.]*) would capture baz I believe.
 
@Kusalananda What about corner cases, like when there is no .?
 
@FaheemMitha That expression does not match a dot, so should be ok.
If the name is a hidden name, like .baz.jpg, then it would match the empty string in front of it.
Personally though, I would use basename '/foo/bar/baz.jpg' .jpg
 
@Kusalananda Hmm. Is this a PCRE expression?
 
@FaheemMitha Not only that, it's a POSIX ERE expression.
Yes, it's PCRE.
And ERE
 
@Kusalananda You mean you'd refer to .jpg as the basename? I thought that was customarily referred to as the extension.
 
9:55 PM
That's a shell command.
(I don't know what context you're doing this in)
 
@Kusalananda I don't follow. What's a shell command?
 
basename '/foo/bar/baz.jpg' .jpg
Returns baz
 
@Kusalananda It's in the context of LuaTeX. I'm trying to process files based on their extensions for appending to a LaTeX document. It's mostly working, but one case I'm trying to handle got a bit complicated.
@Kusalananda Oh, a shell utility. Got it.
Probably C code under there. I see it's in coreutils.
faheem@orwell:/usr/local/src/coreutils/coreutils-8.30/src$ wc -l basename.c
190 basename.c
That's an impressive amount of C code for a simple task.
@Kusalananda What would your code do for foo.bar.jpg? I'd like it to return foo.bar.
 
@FaheemMitha It's a GNU utility ;-) GNU utilities have lots of code. 100 lines on OpenBSD.
@FaheemMitha The regular expression I mentioned earlier?
It would not match. There is no /.
 
@Kusalananda There's a separate OpenBSD implementation? Why the difference?
@Kusalananda Ah. But I'd like that case to be handled as well.
 
10:05 PM
@FaheemMitha Um. Yes. BSD utilities are not GNU implementations.
 
I could strip off the / in a first step, of course.
 
@FaheemMitha I'm a bit too tired to think about it...
 
@Kusalananda No problem. Appreciate the advice and suggestions.
 
10:23 PM
@FaheemMitha There is a place to try LPEG: lpeg.trink.com/share/split. However, why are you using lua? Furthermore why ask about LUA in a UNIX forum? Unix doesn't use the Lua language and has no equivalent of LPEG.
 
10:40 PM
@Isaac I'm using Lua because I'm writing LuaTeX. Are you familiar with TeX? And I'm asking here, because regular expressions and their cousins are quite close to Unix. At least pattern matching of various kinds are definitely popular in Unix.
Even if it's only globbing.
I doubt I'd choose to use Lua if I wasn't using LuaTeX. What you use Lua for?
 
@FaheemMitha Ah, LuaTex, doesn't this answer your question: tex.stackexchange.com/questions/484970/…
@Kusalananda Do find ${PATH//:/ } -type f -executable solve unix.stackexchange.com/questions/157887/… In your opinion?
 
@Isaac Only if you disable globbing with set -f and restrict with -maxdepth 1. Executables in subdirectories are not commands in $PATH.
And you'd have to specify a shell that can do that substitution and a find that has those options.
What that would have above my loop is that you test whether the found files are executable by the current user. I don't do that.
 
10:56 PM
@Kusalananda I believe that that question has been so downvoted because people are searching for away to list executables (commands) and the question makes some restrictions that most users doesn't find helpful (do not use completion). Maybe a question with the same title and without restrictions would be helpful to people seeking to find lists of commands.
 
Yes. Then the compgen commands may be a suitable solution for bash at least.
Right, going to bed. Be well.
 
@Kusalananda Yes to set -f and maxdepth. Reasonable bells and whistles to add.
@Kusalananda Sleep tight.
 
11:38 PM
@Isaac Interesting. Thanks for pointing that out. I don't understand Henri Menke's answer at all right now - it looks extremely complicated. Are you a TeX user too?
 
@FaheemMitha I have used TeX several times in the past to solve some particular problem(s). But I am not a proficient user in that language (nor in Lua). But I can find my way around if that is needed.
 
@Isaac About to sleep now. But I'm curious what "particular problem" would be solved by TeX. Me, I just use it write stuff. Nearly everything that isn't plain text.
 
11:56 PM
@FaheemMitha Does this help: luajit.org/ext_ffi_tutorial.html
 

« first day (3349 days earlier)      last day (45 days later) »