You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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:
These would return a special
Glob
structure instead of aPath
.The text was updated successfully, but these errors were encountered: