-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Organize scripts in src dir in subdirectories #398
Comments
Well - it is nice to see that bashly is easy enough to use that you have built (or planning to build) such a large bash script with it. There is a See:
But now that I look a all this, I agree - it is tedious, and I am not a big fan of the fact that so many filenames end with I am going to try to do the following: Have a setting in the Makes sense? |
Sure! But I don't know how your last PR will solve this issue? #399 |
The PR adds a setting value, that when set, will automatically organize all the commands in the src folder, in subdirectories. See this example. Points of interest: bashly/examples/command-paths/settings.yml Lines 1 to 7 in e94a65f
https://github.com/DannyBen/bashly/tree/master/examples/command-paths/src/commands And, if you have sub-sub-commands - like Meaning: The setting not only sets a sub directory for commands, but it also changes the entire path generation logic. Isn't this what you wanted? You can use the edge version to test it. |
I did with # frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
gem 'bashly', github: 'DannyBen/bashly' It works :) ├── commands
│ ├── completions.sh
│ ├── concerto
│ │ ├── config_dump.sh
│ │ ├── config_print.sh
│ │ ├── notify_release.sh
│ │ ├── notify_sentry.sh
│ │ ├── restart.sh
│ │ ├── setup.sh
│ │ ├── update_french_logo.sh
│ │ └── update_staging.sh
│ ├── docker
│ │ ├── config.sh
│ │ ├── down.sh
│ │ ├── enter.sh
│ │ ├── exec.sh
│ │ ├── images.sh
│ │ ├── logs.sh
│ │ ├── prune_images.sh
│ │ ├── ps.sh
│ │ ├── pull.sh
│ │ ├── restart.sh
│ │ ├── start.sh
│ │ ├── stop.sh
│ │ ├── top.sh
│ │ └── up.sh
│ ├── get-config
│ │ ├── concerto-version.sh
│ │ ├── date.sh
│ │ ├── debian-version.sh
│ │ ├── env.sh
│ │ ├── local.sh
│ │ └── service-version.sh
│ ├── maintenance
│ │ ├── start.sh
│ │ ├── status.sh
│ │ └── stop.sh
│ ├── postgres
│ │ ├── backup.sh
│ │ ├── psql.sh
│ │ ├── reindex.sh
│ │ ├── restore.sh
│ │ └── vacuum.sh
│ ├── rails
│ │ ├── console.sh
│ │ └── rake.sh
│ └── redis
│ └── cli.sh At first I was surprised by the Thank you! It works great! |
It is beautiful right? Much better for large scripts. Thanks for suggesting it. I am updating the example so it is clearer that commands get subdirectories as well. |
It is 👍 ❤️ |
Released in 1.0.7 This was a nice one Nicolas, thanks. |
We've indeed been doing this manually the whole time for our (also pretty large) script :) Thanks for adding this! |
Description
Hi there!
Today scripts are organized in
src
dir in a flat way :It would be great to have an option to organize scripts in subdirectories :
Thank you!
The text was updated successfully, but these errors were encountered: