forked from CodelyTV/dotly
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[WIP] [Feature] Move files to inside your dotfiles and create symlinks automatically #18
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…res/fixes in other PRs. Added feature of autoupdate dotly
…overflow.com/a/17841619 Removed duplicate functions
…ta branch for testing and developing.
…otly, fixed all the way init-scripts were loaded because they fail. Fixed some issues.
* Added new functions to get the current script_name or script_path where the functions were run * Added function to conver mayus to lower
`mas` has added support for Apple Silicon: mas-cli/mas#310
…led (#107) Co-authored-by: David Asensio Cañas <david.asensio@lifullconnect.com>
In case of having multiple Cargo dependencies installed such as: ```sh {▸} ~ cargo install --list docpars v0.2.0: docpars git-delta v0.6.0: delta ``` The previous command was passing out multiple lines: ```sh {▸} ~ cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ' docpars git-delta ``` Because of these lines were being received by the very same `cargo install` command, it was failing: ```sh {▸} ~ cargo install "$(cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ')" Updating crates.io index error: could not find `docpars git-delta` in registry `https://github.com/rust-lang/crates.io-index` with version `*` ``` Now, it executes the `cargo install` multiple times, but at least do not produce crashes 😅 ```sh {▸} ~ cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ' | xargs -n1 cargo install Updating crates.io index Ignored package `docpars v0.2.0` is already installed, use --force to override Updating crates.io index Ignored package `git-delta v0.6.0` is already installed, use --force to override ```
Having pip3 installed does not imply having defined any dependencies for python. This change avoids crashing while running the `up` command. We were crashing because of the combination of `set -euo pipefail` with an empty input for the `grep -v '^\-e'` 🤟
Added script 'dot symlinks update'
* Fix errors with symlinks update script when files are symbolic links * Fix non alphanumeric names of files
…ates can apply its own symlinks without adding files in symlinks subfolder
…so use it without copying files to the init-scripts folder Added a CHANGELOG
* When you have problems of file permissions of autocompletions or any zsh file you can solve those errors by executing this subcommand.
Merged official dotly master branch in this branch.
xargs: WARNING: a NUL character occurred in the input. It cannot be passed through in the argument list. Did you mean to use the --null option?
Requires |
This PR is stale because it has been opened for 30 days with no activity. |
This PR was closed because it has been inactive for 14 days since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds new functionality to move files inside your dotfiles and apply a symlink "automatically" and preserve those changes inside your dotfiles. New symlink is applied automatically.
Motivation
Makes more simple and faster to move files inside your dotfiles. This also removes the need of modify your conf.yaml file which is easy to make format errors while editing manually without an editor.
Fixes
New core libraries
files.sh
This is from PR #129 and it is documented there
files::check_if_path_is_older
function is not used in this branch but I expect PR #129 to be approved and keep this file as it is there. It is a consistency decision.dot.sh
Added functions to load libraries that is from PR #129 and it is documented there
output.sh
This is from PR #129 and it is full documented there
New Features
json.sh
json::to_yaml
convert json to yamlyaml.sh
yaml::to_json
convert yaml file to json to manipulate it withjq command
New commands
All these command use
symlinks/conf.yaml
by default if not argument like--yaml=conf.linux
is given. You can also provide a custom path to yaml file like--yaml="/path/to/my.yaml"
. It should respect the dotbot yaml format. If it is an empty file it will create the necessary directive.See the help for more options of all command because do more stuff all of them.
lazy symlinks link
Move a file in your current work directory in your console to the given path inside your DOTFILES_PATH (relative path).
lazy symlinks edit
Edit a current link to a new one and apply it.
lazy symlinks delete
Delete a symlink and the stored file.
lazy symlinks restore
Move from dotfiles to the link path (destroy the symlink and preserve the file in the deleted link).
Modified commands
lazy self install
Added a way to backup files.
lazy symlinks apply
Added silent mode.
Other modifications in this feature
Modified how symlinks are applied. Now there are "system" (dotly) symlinks and user symlinks. Stuff that are necessary for dotly to set up as symbolic links are now inside
dot self install
context folder. This mean thatdotfiles_template
were modified as well to split symlinks yaml files.Modified self install to install yq.
Modified update_all to update yq.
Tasks
feature/core
(only needed parts).dot self install
.link
symlinks script.edit
symlinks script.delete
symlinks script.restore
symlinks script.yq
.yq
to update all.