you have no idea how long it took me to get bash not to mess up the prompt length calculation. you see that line wrap on the long echo command input? that was a LOT OF EFFORT

i made a single-line version as well, if you prefer something less ostentatious

pastebin.com/XvfB5kn4 here's the code! stick it at the end of your .bashrc file if you wanna try it. i also made it so you can set SMOLFACE=1 or SMOLFACE=0 to turn on or off the small version

it could definitely be cleaner but if i wanted this to be Product-Quality Code it'd be patreon exclusive or something

i have been made aware (thru experimentation on my work laptop) that this doesn't work properly in conjunction with modern shell features of pressing up and tab and whatnot to autofill commands

oh well. i have more ideas for silly prompt stuff

@typhlosion oh yikes, yeah, i see no reason the single line variant wouldn't but the multiline definitely

@bossposs even the single line one makes bash barf a little, i guess because multibyte characters throw off its prompt length calculation, so i had to do Weird Stuff to make it work without long commands wrapping in a strange way. i suspect the Weird Stuff is interacting poorly with autocomplete whatnots

i'll play around with it more at some point. i want my screenface prompt dammit

@typhlosion i wonder if there's an option to make bash not choke on unicode...tho, actually, it might be an issue with how your terminal emulator is reckoning character widths?

@typhlosion idk what these characters are but there's a chance they might be considered double width by one of either your terminal or the shell and single width by the other >_> i know some terminals have this issue with emoji which i believe are officially double width now but used to be undefined, so some software that uses an older version of wcwidth (or a naive character width algorithm or a flawed homemade version) gets it wrong

@bossposs these characters are from the Braille Patterns block, U+28xx. i don't thiiiink they're ever considered double width?

the shell/terminal im using at work is bash in gnome terminal in ubuntu 18.04 lts, and at home it was bash in gnome terminal in ubuntu 19.04

@typhlosion oh yeah, those are not double width... prompt seems to work for me with bash under termite; i don't have the gnome libraries installed and dont really feel like running that at the coffee shop lmao, so i cant test gnome terminal

im wondering if maybe the issue is in fact with the color escapes

Follow

@bossposs have you tried putting in a really long command, like long enough that the line would wrap

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!