« first day (4381 days earlier)      last day (578 days later) » 

10:56 AM
I wanted to use 2.6.2 Parameter Expansion to remove leading characters from a string, but was surprised to find out that "Remove Largest Prefix Pattern" doesn't automatically repeat the pattern.
x=aaaaabc
printf %s\\n "${x##a}"
This only removes the first a. Now I'm struggling to figure out how I have to write the pattern if I want to remove as many a as possible from the beginning of $x. I had no luck searching either, because many answers use bash, but I'm looking for a POSIX shell solution. Am I overlooking something obvious? Should I open a question for this?
 
1
Q: Inbox improvements: marking notifications as read/unread, and a filtered inbox view

marradosTL;DR: We're planning to make some changes to the inbox in a few weeks. You'll be able to mark individual notifications as read or unread, and to filter the inbox dropdown to show only unread notifications (or show all of them). We're also making some styling changes to make it easier to tell whe...

 
 
2 hours later…
12:56 PM
@rattlesnake ${x#${x%%[!a]*}}
Removes everything in $x from the first non-a character to the end, and then uses that result as the string to remove from the start of $x.
 
@Kusalananda Yes! :) I found that solution too
I'm terribly sorry, but I wasn't able to delete the chat messages above
 
@rattlesnake I don't think there's a need to delete it.
 
And I didn't want to link to the question because it's probably forbidden because it looks like I'm trying to draw more attention to it
 
(removed)
 
Still, thank you! :) I don't think it works with every pattern though
Right?
 
1:02 PM
Hmm I wonder what happens if a starred message actually gets deleted
 
@jesse_b There you go.
 
If I want to remove ababab from the beginning I think there is no way to match the rest of the string
@jesse_b Huh? What does this mean? Were you able to remove your own message?
 
@rattlesnake Not with POSIX shell patterns, no.
@rattlesnake It just means he knows how to type "(remove)" in slanted font.
 
I wasn't able to edit the message either :(
Otherwise I would have done that
 
Edit to the code I posted earlier: ${x#"${x%%[!a]*}"}
 
1:06 PM
You can delete them within a certain amount of time but in that case I just literally typed (removed)
 
The inner quotes make it possible to work with string containing shell patterns.
 
hell patterns sound metal
 
:-)
hell script programming is my forte
 
My work chat has a hellmo emoji and it's my favorite thing ever
 
@jesse_b Yeah okay, but I had only posted the question after 1 hour had passed after the chat message :) So I guess that "certain amount of time" was already over
 
1:08 PM
@rattlesnake yeah I think it's like 5 minutes or something short
 

« first day (4381 days earlier)      last day (578 days later) »