-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
proposalNew feature or requestNew feature or request
Description
In light of potentially using Princess as a shell replacement it would make sense to have something as crucial as paths and their manipulation as a language feature.
It could work like this:
let segment = "folder name"
let p1 = ./some_path/{segment}/more_path/
let p2 = #/root/path/{p1}/../up
let p3 = ./some_path/{segment}
let p4 = ./some\ path\ with\ spaces/
let p5 = ./"how about this"/instead
let p6 = ~/relative/to/home
Paths may be concatinated with other paths or alternatively strings directly.
A path would be introduced by either a unary #/ for absolute paths, ~/ for paths relative to the home directory or a ./ for paths relative to the current working directory.
The path ends with a space or alternatively a closing /.
Additonally one could support globs as part of paths:
for var p in ./some/path/*.txt {
print(p)
}
These would return a special Glob structure instead of a Path.
Metadata
Metadata
Assignees
Labels
proposalNew feature or requestNew feature or request