I_fucking_hate_them_now

a year ago by cm0002 to c/programmer_humor

lemming741 195 points a year ago

Microsoft intentionally made programs install to C:\Program Files on Windows 95+ to force programmers to deal with spaces in filenames.

Someone make one of those "statements made by the utterly deranged" memes about it, please and thank you.

path: 0 19538308, hotness: undefined, score: 195, children: 17
lime 79 points a year ago

what is even more funny about this is that the name of that directory used to be locale-dependent, so in sweden it was just called "Program", completely nullifying that idea.

path: 0 19538308 19539765, hotness: undefined, score: 79, children: 14
jjagaimo 59 points a year ago

C:\Program Files

C:\Program Files (x86)

C:\ProgramData

path: 0 19538308 19539765 19540900, hotness: undefined, score: 59, children: 3
some_kind_of_guy 54 points a year ago

C:\PROGRA~1

path: 0 19538308 19539765 19540900 19541879, hotness: undefined, score: 54, children: 1
dosuser123456 1 point a year ago

me coming back to cmd after spending a month in command.com:

path: 0 19538308 19539765 19540900 19541879 19723546, hotness: undefined, score: 1, children: 0
BanMe 43 points a year ago

The fucking parenthetical x86 absolutely kills me. I don't normally wish dick cancer on people,

path: 0 19538308 19539765 19540900 19541830, hotness: undefined, score: 43, children: 0
SomethingBurger 9 points a year ago

It's only localised in the file explorer. The actual folder name is always Program Files.

path: 0 19538308 19539765 19543045, hotness: undefined, score: 9, children: 9
SorryQuick 9 points a year ago

Only since vista, it used to be localized.

path: 0 19538308 19539765 19543045 19546817, hotness: undefined, score: 9, children: 8
Appoxo 5 points a year ago

what about placeholders/variables like %localappdata%, %windir%, %programfiles%?

path: 0 19538308 19539765 19543045 19546817 19547994, hotness: undefined, score: 5, children: 6
uniquethrowagay 2 points a year ago

Really? That is absolute insanity

path: 0 19538308 19539765 19543045 19546817 19547860, hotness: undefined, score: 2, children: 0
sexy_peach 32 points a year ago

No this is just clever

path: 0 19538308 19538959, hotness: undefined, score: 32, children: 0
Shanmugha 7 points a year ago

Given even what little I know of their history and what they are doing now, I cannot be sure this wasn't the intention at least partially

path: 0 19538308 19541356, hotness: undefined, score: 7, children: 0
IcedRaktajino 111 points a year ago

I've recently learned that in Linux, you can use emois in filenames. I died a little lot inside when I learned that.

path: 0 19537688, hotness: undefined, score: 111, children: 40
FrostyPolicy 81 points a year ago

On Linux file systems you can use any character except NULL, and / is a reserved character.

E.g. on ext-4 "All characters and character sequences permitted, except for NULL ('\0'), '/', and the special file names "." and ".." which are reserved for indicating (respectively) current and parent directories."

path: 0 19537688 19538061, hotness: undefined, score: 81, children: 19
xthexder 58 points a year ago

I once accidentally created a file with a newline character in it... it was pretty tricky to fix from command line.

path: 0 19537688 19538061 19538469, hotness: undefined, score: 58, children: 14
malware 86 points a year ago

path: 0 19537688 19538061 19538469 19539400, hotness: undefined, score: 86, children: 6
tdawg 69 points a year ago

Arrest this person

path: 0 19537688 19538061 19538469 19539400 19539439, hotness: undefined, score: 69, children: 0
voodooattack 33 points a year ago

This is absolutely haram

path: 0 19537688 19538061 19538469 19539400 19541078, hotness: undefined, score: 33, children: 3
exu 15 points a year ago

This is why you shouldn't parsels output btw. Use find and read instead

path: 0 19537688 19538061 19538469 19539400 19539698, hotness: undefined, score: 15, children: 0
GenderNeutralBro 13 points a year ago

I actually did this a lot on classic Mac OS. Intentionally.

The reason was that you could put a carriage return as the first character of a file, and it would sort above everything else by name while otherwise being invisible. You just had to copy the carriage return from a text editor and then paste it into the rename field in the Finder.

Since OS X / macOS can still read classic Mac HFS+ volumes, you can indeed still have carriage returns in file names on modern Macs. I don't think you can create them on modern macOS, though. At least not in the Finder or with common Terminal commands.

path: 0 19537688 19538061 19538469 19539558, hotness: undefined, score: 13, children: 0
sukhmel 6 points a year ago

I created a file with backspace in name, it was hard to understand why filename doesn't match

path: 0 19537688 19538061 19538469 19547456, hotness: undefined, score: 6, children: 0
toynbee 4 points a year ago

I don't conduct interviews very often, but when I do, one of my questions is always about interacting with files that have special characters in the filename.

path: 0 19537688 19538061 19538469 19539041, hotness: undefined, score: 4, children: 0
Warl0k3 3 points a year ago

Did you not just use tab? That's the usual method of dealing with weird characters in filenames that I've found

path: 0 19537688 19538061 19538469 19540117, hotness: undefined, score: 3, children: 3
xthexder 4 points a year ago

This was quite a while ago now, but I don't think my shell escaped the tab complete properly, I remember it just printing a literal newline and evaluating it as a second command. I think there was other unicode in there too, otherwise I would have just typed it out. I had to do something with null terminated output and piping it in to mv, but I can't remember what exactly.

path: 0 19537688 19538061 19538469 19540117 19541794, hotness: undefined, score: 4, children: 0
Hupf 1 point a year ago

Too bad when there's multiple files starting with and consisting mostly of e.g. kanji (when on a Latin keyboard).

path: 0 19537688 19538061 19538469 19540117 19547268, hotness: undefined, score: 1, children: 1
CanadaPlus 6 points a year ago

So ... is allowed, or all whitespace, or Zalgo text.

I mean, on the one hand, I guess why be restrictive, but on the other I feel like requiring something that looks like language somehow might be a good idea to avoid edge cases and attacks.

path: 0 19537688 19538061 19538311, hotness: undefined, score: 6, children: 3
joyjoy 13 points a year ago

You can have new lines in your file names. YSAP has a good video/playlist about how to deal with these and many more.

path: 0 19537688 19538061 19538311 19538514, hotness: undefined, score: 13, children: 0
Hupf 3 points a year ago

could you have .​.? I assume most terminals would just spell out .\x200b.?

path: 0 19537688 19538061 19538311 19547296, hotness: undefined, score: 3, children: 1
CanadaPlus 2 points a year ago

Or use a hair space so it looks almost the same. Or .. but you've added the right-to-left unicode character. I'm guessing there's something that looks a lot like a period, too.

If ext4 doesn't include restrictions terminals probably should.

path: 0 19537688 19538061 19538311 19547296 19553957, hotness: undefined, score: 2, children: 0
rem26_art 48 points a year ago

can confirm

path: 0 19537688 19537974, hotness: undefined, score: 48, children: 0
Gyroplast 24 points a year ago

In filenames? AMATEURS! Use obscure Unicode in your passphrases for maximum security. Ctrl-Shift-U, enter arbitrary code point, bam! 🦊 Works even better with a Compose key and a nice, chonky .XCompose file to throw some gr∑∑k letters around, for instance, like some confused script kiddie. :)

On topic: There are multiple variants of spaces in Unicode. You're welcome, and now go and create something utterly deranged with that information.

path: 0 19537688 19538599, hotness: undefined, score: 24, children: 4
wizardbeard 6 points a year ago

I already deal far too much with trying to handle dumb fucking typos in employee data, and trying to turn human names into valid email addresses.

The first time I encounter something like this there will be a body. It will not be found.

path: 0 19537688 19538599 19541047, hotness: undefined, score: 6, children: 0
Auster 5 points a year ago

иnteresting_idéa_lål.ㅅㅇ

path: 0 19537688 19538599 19539398, hotness: undefined, score: 5, children: 0
luciferofastora 2 points a year ago

Some grSSk letters?

path: 0 19537688 19538599 19636695, hotness: undefined, score: 2, children: 0
Shanmugha 1 point a year ago

This needs more upvotes. Chaos gods smile at you, and I thank you

path: 0 19537688 19538599 19541410, hotness: undefined, score: 1, children: 0
nialv7 17 points a year ago

unix filenames are just string of bytes, the operating system does not interpret it in anyway. this is a much saner approach compared to Windows where language settings can change file system behavior.

path: 0 19537688 19541710, hotness: undefined, score: 17, children: 1
who 5 points a year ago

the operating system does not interpret it in anyway.

*in any_way. ;)

path: 0 19537688 19541710 19542330, hotness: undefined, score: 5, children: 0
bobs_monkey 15 points a year ago

I'm just gonna pretend I didn't hear that.

path: 0 19537688 19537848, hotness: undefined, score: 15, children: 0
Benign 13 points a year ago

⏰️.🪵

path: 0 19537688 19538007, hotness: undefined, score: 13, children: 0
maxwells_daemon 9 points a year ago

ChatGPT is taking notes

path: 0 19537688 19537734, hotness: undefined, score: 9, children: 0
TootSweet 8 points a year ago

10 seconds of googling indicates this is true for Windows and Mac as well. I haven't looked specifically, but I'd be a little surprised if it wasn't true for Android and iOS as well.

But really, why would they add rules to prevent people from using certain unicode codepoints in filenames? Should they disallow Klingon as well? Kanji? Of course not. Emojis are codepoints just like U+0061 is.

Of course there are good reasons to disallow things like newlines and forward slashes in Linux filenames, but what specifically would even be the argument for preventing emojis?

path: 0 19537688 19538285, hotness: undefined, score: 8, children: 0
bigfondue 4 points a year ago
path: 0 19537688 19541009, hotness: undefined, score: 4, children: 1
IcedRaktajino 2 points a year ago

Lol, I think that's how I learned it was possible, too. yt-dlp uses the title as the filename, and all of the emojis came along with it. Was trying to rename them from terminal, but couldn't do much when half the filenames started with the fire emoji lol.

path: 0 19537688 19541009 19541066, hotness: undefined, score: 2, children: 0
9point6 4 points a year ago

It's all just Unicode

You can have emoji as your WiFi network name too

Kinda interesting to see what older devices do when faced with such a network

path: 0 19537688 19543989, hotness: undefined, score: 4, children: 1
SaharaMaleikuhm 3 points a year ago

What about an emoji only wifi password?

path: 0 19537688 19543989 19547183, hotness: undefined, score: 3, children: 0
Appoxo 3 points a year ago

Same for Windows (11): I just renamed a file to an apple emoji

path: 0 19537688 19548013, hotness: undefined, score: 3, children: 0
aaaaaaaaargh 2 points a year ago

I think that may be possible for every filesystem supporting UTF-8 encoding.

path: 0 19537688 19539154, hotness: undefined, score: 2, children: 0
Samskara 1 point a year ago

I have been using emoji in macOS for many years. It can be very useful to tag files.

path: 0 19537688 19537973, hotness: undefined, score: 1, children: 0
zqwzzle 1 point a year ago

You can use emojis for variable names in swift code.

path: 0 19537688 19539523, hotness: undefined, score: 1, children: 0
SpaceScotsman 58 points a year ago

I\ don\'t\ know\ what\ you\ mean,\ I\'ve\ never\ encountered\ any\ annoyances.

path: 0 19548959, hotness: undefined, score: 58, children: 5
Routhinator 7 points a year ago

'I don\'t know what you mean, I\'ve never encountered any annoyances.'

path: 0 19548959 19557181, hotness: undefined, score: 7, children: 4
gamma 7 points a year ago

Single quotes don't allow any escaping in shell, you need

'I don'\''t know what you mean, I'\''ve never encountered any annoyances'

Or, in Zsh with setopt rcquotes:

'I don''t know what you mean, I''ve never encountered any annoyances'
path: 0 19548959 19557181 19561193, hotness: undefined, score: 7, children: 3
Routhinator 6 points a year ago

Oh right, good catch. That's me shell scripting while in a meeting. 🫠

path: 0 19548959 19557181 19561193 19562597, hotness: undefined, score: 6, children: 1
stefenauris 4 points a year ago

Good use of a meeting to be fair

path: 0 19548959 19557181 19561193 19562597 19571813, hotness: undefined, score: 4, children: 0
quantenzitrone 1 point a year ago

it works in fish

path: 0 19548959 19557181 19561193 19586433, hotness: undefined, score: 1, children: 0
asdfranger 44 points a year ago
Oh\ come\ on,\ it\'s\ not\ that\ bad

Some shells enclose those types of files within inverted commas. Such that:

> ls
file\ name.md

is instead

> ls
'file name.md'

(I use fish)

path: 0 19537866, hotness: undefined, score: 44, children: 8
Supreme 25 points a year ago

"inverted commas"? single quotes?

path: 0 19537866 19538660, hotness: undefined, score: 25, children: 6
asdfranger 15 points a year ago

Yes, I am a weird english.

path: 0 19537866 19538660 19538797, hotness: undefined, score: 15, children: 2
marcos 5 points a year ago

What is the Old Continent name of those: `

path: 0 19537866 19538660 19538797 19539367, hotness: undefined, score: 5, children: 1
Revan343 6 points a year ago

On its own, the backtick is primarily used in computing, and so doesn't have an old-timey-English name, nor does the Jargon File mention a Commonwealth Hackish name for it. While there are a variety of other names, I don't think any of them are specific to the UK

When used with a letter, it marks a grave accent; this was its original purpose on a typewriter

path: 0 19537866 19538660 19538797 19539367 19540820, hotness: undefined, score: 6, children: 0
abbadon420 3 points a year ago

Floating commas

path: 0 19537866 19538660 19539412, hotness: undefined, score: 3, children: 2
lucg 3 points a year ago

In dutch I've heard them be called flying commas unapologetically (vliegende comma's — ironically has one in it because many plurals need it, it doesn't mark possession)

path: 0 19537866 19538660 19539412 19541584, hotness: undefined, score: 3, children: 1
lord_ryvan 1 point a year ago

Ik heb nog nooit iemand een ' een vliegende komma horen noemen, wordt dat in bepaalde delen van Nederland meer gezegd?

path: 0 19537866 19538660 19539412 19541584 19704021, hotness: undefined, score: 1, children: 0
zero_spelled_with_an_ecks 2 points a year ago

I tried to parse the first one but got all confused because there's no closing single quote.

path: 0 19537866 19538390, hotness: undefined, score: 2, children: 0
bleistift2 33 points a year ago

Are you typing the whole filename by hand? Tab expansion exists, you know?

path: 0 19538103, hotness: undefined, score: 33, children: 2
Truscape 16 points a year ago

If it fucking works...

Sometimes it does. But not always.

path: 0 19538103 19538240, hotness: undefined, score: 16, children: 1
kernelle 13 points a year ago

Zsh changed my life, but I still hate escape chars in my command lines for readability reasons

path: 0 19538103 19538240 19538470, hotness: undefined, score: 13, children: 0
livingcoder 24 points a year ago

Now I use lowercase and underscores everywhere.

path: 0 19539363, hotness: undefined, score: 24, children: 6
drmoose 9 points a year ago

Hyphens > underscores for filenames because all web standards prefer hyphens so if you ever want to network your files its a much smoother experience!

path: 0 19539363 19544911, hotness: undefined, score: 9, children: 3
livingcoder 5 points a year ago

This is what I need, an explicit reason that makes one choice better than another. If hyphens make for a smoother experience, then I'll reconsider my default behavior.

Thanks for pointing out this benefit.

path: 0 19539363 19544911 19545040, hotness: undefined, score: 5, children: 0
SaharaMaleikuhm 3 points a year ago

They suck hard. I use the renpy engine and there you reference file names directly but always lower case and spaces and hyphens turn to underscores. That can cause issues, so I just do underscores in my file names. Don't give damn about the web.

path: 0 19539363 19544911 19547217, hotness: undefined, score: 3, children: 1
drmoose 1 point a year ago

Yeah I prefer underscores too but kebab case is definitely better for web and general ergonomics. Dash doesnt require a shift hold! Tho I still mix these depeding on tool or existing idioms. One thing for sure is that spaces and capital letters are stupid and we should do less of them.

path: 0 19539363 19544911 19547217 19548025, hotness: undefined, score: 1, children: 0
Anahkiasen 5 points a year ago

This is the best for tab completion, altho I prefer hyphens visually

path: 0 19539363 19540239, hotness: undefined, score: 5, children: 0
BassTurd 3 points a year ago

I prefer lowercase with hyphens, but I'm transitioning into a team that does everything camelCase, which is the second best case, but I still strongly dislike it.

path: 0 19539363 19540746, hotness: undefined, score: 3, children: 0
cupcakezealot 20 points a year ago

the struggle between spaces in filenames look cute and oh fuck what's the code to reference a space in a filename in terminal?

path: 0 19542872, hotness: undefined, score: 20, children: 5
kamen 10 points a year ago

Just put the whole thing in quotes. You might have to escape extra sets of quotes, usually with a backslash.

path: 0 19542872 19548075, hotness: undefined, score: 10, children: 4
YellowTraveller 2 points a year ago

Or you can also put a \ in front of the space

path: 0 19542872 19548075 19550811, hotness: undefined, score: 2, children: 0
ulterno 0 points a year ago

If you intend on using that with tab completions, you will have extra work to do.

path: 0 19542872 19548075 19553176, hotness: undefined, score: 0, children: 2
kamen 3 points a year ago

Some shells put the path in quotes automatically as you attempt to complete anything with spaces in it.

path: 0 19542872 19548075 19553176 19553423, hotness: undefined, score: 3, children: 1
ulterno 0 points a year ago

Yeah, just need to set it up correctly.

path: 0 19542872 19548075 19553176 19553423 19553886, hotness: undefined, score: 0, children: 0
callyral 19 points a year ago

not sure why the default behavior is this:

file\ name\ with\ a\ bunch\ of\ spaces

instead of this:

"file name with a bunch of spaces"

but you can just press " before pressing tab to auto-complete, and it will use the 2nd form

path: 0 19560994, hotness: undefined, score: 19, children: 3
killeronthecorner 1 point a year ago

Because quoting requires token expansion (e.g. ~ to /home/you). Escaping gives you a much shorter path in that case.

That said I'm with you, full quoted paths read better to me.

path: 0 19560994 19569885, hotness: undefined, score: 1, children: 1
lord_ryvan 1 point a year ago

You can use variables in " like so: cd "$HOME/Desktop".

Maybe this helps?

path: 0 19560994 19569885 19704077, hotness: undefined, score: 1, children: 0
lord_ryvan 1 point a year ago

I mean, at least in Bash tools like ls do use quotes by default:

$ ls
 filename_without_space  'filename with space'

But yeah, tab expansion uses backslashes, sadly.

path: 0 19560994 19704056, hotness: undefined, score: 1, children: 0
AmazingAwesomator 17 points a year ago

i think i am old. i grew up using DOS, and really hated spaces in filenames and folders because they appreared truncated at the first space with a tilde and index of that file/folder representation.

ex: C:\folder name is bad\ == C:\folder~1

i hated that so much that when i got to windows 3.1 i refrained from using spaces (some command line was still necessary in w3.1)

i have jept that habit through the years, so when i moved from windoes to linux, my natural instincts of snake_case_folder_names made it so i didnt have to change : D

path: 0 19538331, hotness: undefined, score: 17, children: 5
aaaaaaaaargh 11 points a year ago

That's not even DOS I think. As far as I know Win 95 came up with this monstrosity in an attempt to circumvent the 8.3 character limitations present in older versions of DOS.

path: 0 19538331 19539188, hotness: undefined, score: 11, children: 0
wizardbeard 6 points a year ago

One of the fun things about modern Windows is that ~1 shit still appears every once in a rare while. Gotta love just stacking more and more shit on top of ancient systems in the name of backwards compatibility!

path: 0 19538331 19541191, hotness: undefined, score: 6, children: 0
db2 6 points a year ago

I think you're misremembering a little. Long filenames was introduced in Win95.

path: 0 19538331 19538880, hotness: undefined, score: 6, children: 0
Onomatopoeia 5 points a year ago

Yea, Win 3.1 didn't support long names - that came with Win95. Win 3.1 was a shell on DOS.

But I understand - it all blends together after um... 40 years (ouch!).

path: 0 19538331 19540468, hotness: undefined, score: 5, children: 0
toynbee 1 point a year ago path: 0 19538331 19539080, hotness: undefined, score: 1, children: 0
lengau 16 points a year ago

I very intentionally have all my code in Personal Projects 🥰 and Work Projects 🏦 directories so I can find bugs in the handling of file paths.

path: 0 19564769, hotness: undefined, score: 16, children: 0
BombOmOm 14 points a year ago

I'm a big fan of PascalCase. ThisIsAGreatFilename.odt

path: 0 19537872, hotness: undefined, score: 14, children: 1
RustyNova 3 points a year ago

Rust made me have an habit of using snake_case... .rs

path: 0 19537872 19538239, hotness: undefined, score: 3, children: 0
SnotFlickerman 14 points a year ago

" is your friend

path: 0 19538330, hotness: undefined, score: 14, children: 1
floquant 11 points a year ago

Yep, exactly. And tab. \ is weird at first but makes sense if you think about it

path: 0 19538330 19538668, hotness: undefined, score: 11, children: 0
Lyra_Lycan 11 points a year ago

Windows is stupid as shit, trying to shift+right click > open Powershell in a path containing a space results in it throwing an error, and you have to paste the path in yourself anyway

path: 0 19538989, hotness: undefined, score: 11, children: 0
ronigami 11 points a year ago

If your code is written well, it shouldn’t matter.

path: 0 19538626, hotness: undefined, score: 11, children: 7
Sonotsugipaa 19 points a year ago

They're annoying to deal with when interactively using command-line shells, especially so when pasting unquoted and unescaped file paths, doubly especially so with Bash where parameter expansion makes no goddamn sense if you know at least one other programming language

path: 0 19538626 19539092, hotness: undefined, score: 19, children: 6
ronigami 2 points a year ago

Example of how parameter expansion matters?

Generally if you are pasting file paths there is a better way to do that. Use find with exec, or xargs, or a for loop. Or, get the list in Vim and escape (quote) every line at once. Unless you have double quotes in the filename too (which is actually a crazy thing) it shouldn’t be a big deal.

path: 0 19538626 19539092 19540200, hotness: undefined, score: 2, children: 5
Sonotsugipaa 2 points a year ago

Expansion matters because using parameters without quotes automatically splits words, and IIRC a quoted array parameter can still be split into its members — as opposed to Zsh, where word splitting doesn't happen unprompted and quoted array parameters are flattened into a single string.

Generally if I want to run $HOME/random executable with spaces.exe through Wine in a terminal I copy the path in Dolphin (CTRL+SHIFT+C, or CTRL+ALT+C idr) and paste it, within quotes if needed (the four extra key inputs are the annoying part).

I find that much faster than manually typing find "$HOME" -name "random executable with spaces.exe" -type x -exec wine "{}" \;, or opening an editor to insert backslashes.

path: 0 19538626 19539092 19540200 19540789, hotness: undefined, score: 2, children: 4
ronigami 1 point a year ago

Why on earth not just type wine ~/random and then hit tab to autocomplete? Or you could do

wine `echo random*`

AFAIK, if $file is a filename with spaces, then some_util ${file} will not split the filename.

path: 0 19538626 19539092 19540200 19540789 19544513, hotness: undefined, score: 1, children: 3
bob_lemon 10 points a year ago

My work has me working with Matlab Simulink paths, which may (and sometimes actually do) contain newlines.

path: 0 19566699, hotness: undefined, score: 10, children: 0
lucg 8 points a year ago

Now I'm imagining a shell that looks iteratively through arguments to find where quotes would make total sense

$ ls
my victims.ods
$ wipe -f my victims.ods --thorough

So the shell would go like

  1. wipe → command name found, ok
  2. -f → no file in the current directory starts with that, skip
  3. my → matches a file, keep in memory...
  4. my victims.ods → full match, but missing quotes!
  5. Prompt user:
Filename "my victims.ods" found without quotes. Choose:
[a]dd quotes this time
[A]lways add quotes (dangerous)
[n]o quotes today please
[N]ever offer adding quotes again
[t]ell me what could possibly go wrong when I choose to always add quotes
[P]unch the person who proposed this feature
path: 0 19541547, hotness: undefined, score: 8, children: 3
BatmanAoD 7 points a year ago

For interactive use, tab-completion essentially makes this a non-issue, because shells add escaping in the appropriate places.

For scripting, where spaces are harder to deal with, unfortunately there's just not much you can do; your two options are basically to learn all of your particular shell's patterns for dealing with whitespace in filenames, or only write scripts in something other than a POSIX shell.

path: 0 19541547 19543205, hotness: undefined, score: 7, children: 2
lucg 2 points a year ago

Scripting isn't the issue, but for tab completion: the boundary is often at a space or parenthesis so that you need to type the backslash + char to continue tabbing to completion

path: 0 19541547 19543205 19546753, hotness: undefined, score: 2, children: 1
BatmanAoD 2 points a year ago

Believe me, whitespace-correct scripting is absolutely an issue.

You're right that it's annoying when filenames diverge right at a character that must be escaped.

path: 0 19541547 19543205 19546753 19552220, hotness: undefined, score: 2, children: 0
notarobot 8 points a year ago

Don't try svelte kit. This is pseudocode but it's valid. The only symbol show here that is not real is the / that I've placed at the end of folder to show that they are folders. There are other special cases

routes/
+page.ts
(admin)/
  +page.ts
  [user=uuid]/
    [[community]]/
      +page.ts
    posts/
      [...postIds@]/
        +page.ts
path: 0 19549802, hotness: undefined, score: 8, children: 4
dogs0n 3 points a year ago

sveltekit is beautiful (thanks for spreading the word)

path: 0 19549802 19560886, hotness: undefined, score: 3, children: 3
notarobot 3 points a year ago

Im trying it out yet. It seems fun, the tutorial is amazing. I don't think I'd want to do large enterprise projects with it

path: 0 19549802 19560886 19560919, hotness: undefined, score: 3, children: 2
dogs0n 2 points a year ago

Have you noticed issues that you think would arrise at scale, etc for an enterprise project?

I'm using it for a small/medium sized project and it's great and has not got in the way once. Wondering how you feel, since I don't have experience with much enterprise code.

path: 0 19549802 19560886 19560919 19561027, hotness: undefined, score: 2, children: 1
notarobot 3 points a year ago

Oh. No. You win. Mine is a gut feeling that modeling all routes with folders would become a paid. To navigate and manage, while you have actual experience

path: 0 19549802 19560886 19560919 19561027 19564661, hotness: undefined, score: 3, children: 0
jbk 8 points a year ago

smells like skill issue tbh

tools which cant handle being installed/run on directories with spaces are so annoying

path: 0 19549638, hotness: undefined, score: 8, children: 5
vivalapivo 8 points a year ago

tools which cant handle being installed/run on directories with spaces are unacceptably common

path: 0 19549638 19552515, hotness: undefined, score: 8, children: 0
nialv7 2 points a year ago

You are clearly not a command line user :)

path: 0 19549638 19550022, hotness: undefined, score: 2, children: 3
ulterno 1 point a year ago

I vaguely remember zsh in Manjaro (by default) having a tab completion that automatically added the slashes.
Never set it up myself though.

But I really hate having to worry about quoting my file variables in scripts.
So much, that after a certain complexity, I just give up the script and make the thing in C++.


Oh, and if I make a script that doesn't handle file names properly (because it's not required in that specific use case), I make sure to delete it after use, to prevent mistaken use later, which would otherwise cause more headache than just having to rewrite a script.

path: 0 19549638 19550022 19553070, hotness: undefined, score: 1, children: 2
TarantulaFudge 2 points a year ago

You can just start the path with a quote and it will auto complete with spaces. I spend a lot of time correcting files with spaces replaced now. The spaces are better. I think music is the most annoying, since I like to use tools like EasyTag to extract metadata from filenames.

So please stop.naming_files.like_this.its_stupid

path: 0 19549638 19550022 19553070 19589529, hotness: undefined, score: 2, children: 1
ulterno 1 point a year ago

You can just start the path with a quote and it will auto complete with spaces.

Oh, you're right. I just tried it out and it worked the same way.
I wonder what gave me the misconception the it doesn't by default.

path: 0 19549638 19550022 19553070 19589529 19589530, hotness: undefined, score: 1, children: 0
BuboScandiacus 6 points a year ago

“_” to the rescue

path: 0 19547264, hotness: undefined, score: 6, children: 0
pineapplelover 6 points a year ago

I still use spaces

path: 0 19560532, hotness: undefined, score: 6, children: 1
rumba 7 points a year ago

agreed, "still worth it"

I do, however, tend to keep spaces out of my folder names so i can just use quotes at the end.

/Images/Halloween/Projections/"Creepy Crawlies.mp4"

path: 0 19560532 19560833, hotness: undefined, score: 7, children: 0
bitjunkie 5 points a year ago

That's what backslash-tab is for

path: 0 19539617, hotness: undefined, score: 5, children: 0
zerofk 4 points a year ago

Computers should just know when I want a space to be part of a file name, and when I want them to be argument separators. No more escaping or quoting.

path: 0 19566487, hotness: undefined, score: 4, children: 1
Konstant -2 points a year ago
path: 0 19566487 19569545, hotness: undefined, score: -2, children: 0
brown567 4 points a year ago

whitespaceIsTheEnemy

path: 0 19542777, hotness: undefined, score: 4, children: 0
kieron115 4 points a year ago

at least you/arent/using\ linux

path: 0 19571997, hotness: undefined, score: 4, children: 0
falseWhite 2 points a year ago
path: 0 19549625, hotness: undefined, score: 2, children: 0
quantenzitrone 2 points a year ago

i y'all just started using fish shell, you'd have proper shell completions and argument splitting that doesn't care about spaces in file names

path: 0 19586484, hotness: undefined, score: 2, children: 0
krunklom 2 points a year ago

Mv /home/"$USER"/Downloads /home/"$USER"/downloads

path: 0 19554139, hotness: undefined, score: 2, children: 0
Korne127 2 points a year ago

Can't relate. I use shell all the time, and I always use spaces in file paths, especially to make sure scripts I make still work then

path: 0 19596726, hotness: undefined, score: 2, children: 0
sefra1 1 point a year ago

The number of keystrokes needed to type an underscore is the same that you need to type backslash space, so I don't see how underscores are in improvement

path: 0 19573103, hotness: undefined, score: 1, children: 0
ILikeBoobies 1 point a year ago

SameHereBrother.

path: 0 19541293, hotness: undefined, score: 1, children: 0
Jankatarch 1 point a year ago

capital letters.

path: 0 19561129, hotness: undefined, score: 1, children: 0
MehBlah 1 point a year ago

End each word with a . Pretty simple. I just realized lemmy wont show a forward slash.

path: 0 19540095, hotness: undefined, score: 1, children: 0
MonkderVierte 1 point a year ago
path: 0 19549552, hotness: undefined, score: 1, children: 0
craftrabbit 1 point a year ago

I love emoji filenames

path: 0 19539544, hotness: undefined, score: 1, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
32862
2487
7731

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

go to feed...