-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: Add fs-basename function #196
base: main
Are you sure you want to change the base?
Conversation
danielbayley
commented
Nov 29, 2024
Hi. Thanks for trying out YS and thanks for the PR. I'm not entirely opposed to this, but these already work:
Tell me a bit why you'd prefer this if you don't mind. |
@danielbayley I added a couple commits to your work here https://github.com/yaml/yamlscript/tree/fs-basename Let me know what you think. |
@ingydotnet Sure, so I was going on the Ruby # ~/path/to/file.ys
fs-basename(FILE ".*") # file
As does this: fs-filename(FILE):fs/strip-ext But it’s still 2 methods, rather than one. If I’m going to mix code directly into my data, I want it to be as terse as possible (without losing legibility). Also on that note, how come I also thought about adding this second param to the existing What do you think? @ingydotnet Further reading on this: babashka/fs#28, and babashka/fs#29. |
We have shared goals there!! I'll look it all over in a bit and push some commits for you to review |
We don't need to alias
|
I'll add support for
note that |
Well yes, but then why alias some and not others? I’m just thinking about consistency is all… |
afaict, none of Some are close like |
Pushed 14a53e6 to |