Earlier quoted context omitted.
"Documents and Settings" still exists on Windows 10, as a soft link to "Users".
You know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...
I'm “still afraid to use spaces in file names” years old
221–230 of 817 posts
Re: I'm “still afraid to use spaces in file names” years old
#222Re: I'm “still afraid to use spaces in file names” years old
#223Earlier quoted context omitted.
The shell ought to be able to help with that. There's no need to remember if it's --conf or --config if you can press --conf . One of the things I like about Fish is that by default it can tab-complete program options and also shows a one-line description of what each of them does. (It grabs that info from the man page).
So much of computing is dedicated to solving problems that could be omitted.
Re: I'm “still afraid to use spaces in file names” years old
#224Earlier quoted context omitted.
You know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...
You monster!
Re: I'm “still afraid to use spaces in file names” years old
#225I have an uneasy feeling whenever I see a path parameter declared as string. Path is not a string - it's a sequence of path components and should be treated as such by our APIs. A path should be parsed once - on user input - and then used in its "sequence form" throughout the software stack. And "path component" is not an arbitrary string either - e.g. appending a path component to the path should first require conve…
"Path is not a string - it's a sequence of path components and should be treated as such by our APIs." For maximum correctness, you want to turn it into a file handle as soon as possible, and do all operations through the variations of the file functions that end in "at", like: https://linux.die.net/man/2/openat The downside of this approach is that you still technically have to carry the path around with you if you…
Re: I'm “still afraid to use spaces in file names” years old
#226Damn, I feel old now :P
Re: I'm “still afraid to use spaces in file names” years old
#227Define " space ". Is the Hangul filler we talked about yesterday a spacing character? Is the zero-width non-breaking space a spacing character? What about the typographic spacing characters? You should better be very afraid of using spaces in filenames. You should do everything you can to support them but you have to know you'll invariably encounter countless cases where you'll have this or that tool that won't work…
You get all those space characters working and then some jerk comes along and uploads a file like this: ŗ̶̧̢͓̳͍͙͔̳̻̥͉̭͓̫̟͍̞̭͉͓͉̮̹͍͚̳̹̬͉͚̰͈̘̐̊̾̈̀̒͒̀͛̓̋̔͊̏͘̚ę̴̨̛̣͙̤̟̬̩̟͙͖̥̹̱̱̊͑͗̇̇͛̆̈́̃͋̓̀̔̍̍̌̐͊̎̓̅̀̕ͅģ̴̹̜̘͍̱̑͐̉̌̐̄̊͛̎́̐̌̅̈́͂͑̈́̋̔͂̊̊̒̒̔͛͆̚͘̕͠e̶̙͕̫̳̘͐̾́̑͆̓͂̿͊̊̍͛͐̌̆͗̌̅̅̔͊̂͛͗̅̕͝͝͝͝x̵̢̧̦̫͖̝̥̹͓̬͖̤̩͚̝̫̋̃̅̈́̆͋̌͑́̎̈́̊̾͒̀̒̎̓͛͊̿̓͊̀̍͐̆̚͝͝-̴̨̮̯͖͖̠̜̲̪͕̘͈͖̮̈́̓̐̃́̅̄̏́̍̉̐͌́̔̓̄͋͗̐̕͜͝ţ̴̢̧̖̗͖̞̮̫̦̼̝̺̼̱̳͓͉̜̟̤̲͖̻͙́̌̈̌̈͆̾̄͊̿̏̓͗̈́̕͜ͅh̶̽́͊̎͐͌̆̍̎̏̕͝…
Re: I'm “still afraid to use spaces in file names” years old
#228Earlier quoted context omitted.
yep, I still don't use spaces. I also don't use uppercase characters. Just underscores or hyphens.
Sometimes I break the rule and use uppercase but never spaces.
Build script works fine locally on Windows, but then chokes in *nix test server, as it's effectively a different path.
Re: I'm “still afraid to use spaces in file names” years old
#229Re: I'm “still afraid to use spaces in file names” years old
#230 #!/usr/local/bin/sbcl --script
(load "~/.sbclrc2")
(require 'replace-all)
(in-package :replace-all)
(format t "file is ~s" (second sb-ext:*posix-argv*) (probe-file (second sb-ext:*posix-argv*)))
(let* ((args sb-ext:*posix-argv*)
(orig (second args) )
(newfn (if orig
(replace-all orig "(" "-")
orig))
(newfn1 (replace-all newfn ")" "_"))
(newfn2 (replace-all newfn1 " " "-"))
(newfn3 (replace-all newfn2 "&" "-"))
(newfn4 (replace-all newfn3 ":" "-")))
(when orig
(format t "renaming \"~a\" to \"~a\"~%" orig newfn4)
(multiple-value-bind (new-name old-truename true-newname)
(rename-file orig newfn4)
(format nil "new-name ~a old-true ~a new true ~a" new-name old-truename true-newname))))