Giter VIP home page Giter VIP logo

dotly's Introduction

⚑️ Simple and fast dotfiles framework ⚑️

The path to increasing your productivity on macOS, Linux and WSL

codely.tv CodelyTV Courses CI pipeline status

dotly is a dotfiles framework built on top of zim, one of the fastest zsh existing frameworks. It creates an opinionated dotfiles structure to handle all your configs and scripts.

πŸš€ Installation

Using wget:

bash <(wget -qO- https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)

Or using curl:

bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)

🐳 Try it in Docker

You can safely install additional software and make any changes to the file system. Once you exit zsh the image is deleted.

Using Alpine:
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --rm alpine sh -uec '
  apk add curl sudo bash zsh git g++ python3
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
  zsh'
Or using Ubuntu:
docker run -e TERM -e COLORTERM -w /root -it --rm ubuntu sh -uec '
  apt-get update
  apt-get install -y curl build-essential sudo
  su -c bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
  su -c zsh'

Restore your Dotfiles manually

  • Install git
  • Clone your dotfiles repository git clone [your repository of dotfiles] $HOME/.dotfiles
  • Go to your dotfiles folder cd $HOME/.dotfiles
  • Install git submodules git submodule update --init --recursive modules/dotly
  • Install your dotfiles DOTFILES_PATH="$HOME/.dotfiles" DOTLY_PATH="$DOTFILES_PATH/modules/dotly" "$DOTLY_PATH/bin/dot" self install
  • Restart your terminal
  • Import your packages dot package import

Restore your Dotfiles with script

Using wget

bash <(wget -qO- https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)

Using curl

bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)

πŸ”’ You need to know your GitHub username, repository and install ssh key if your repository is private.

It also supports other git repos, but you need to know your git repository url.

πŸ’» Usage

🚢 First steps

Once dotly is installed, the next step is to commit and push your dotfiles. Create a new repository in your GitHub named dotfiles and then copy the url. Then go to your dotfiles (cd "$DOTFILES_PATH") and execute:

git remote add origin YOUR_DOTFILES_REPO_URL &&
git add -A &&
git commit -m "Initial commit" &&
git push origin main

⚠️ It's recommended to commit every time you add/modify a config or script.

🌚 The dot command

dot is the core command of dotly. If you execute it, you'll see all your scripts.

{β–Έ} ~ dot -h
Usage:
   dot
   dot <context>
   dot <context> <script> [<args>...]
   dot -h | --help

🌴 Understanding your dotfiles folder structure

β”œβ”€β”€ πŸ“ bin                 # External binaries/symlinks. This folder has preference in your $PATH
β”œβ”€β”€ πŸ“ doc                 # Documentation of your dotfiles
β”œβ”€β”€ πŸ“ editors             # Settings of your editors (vscode, IDEA, …)
β”œβ”€β”€ πŸ“ git                 # git config
β”œβ”€β”€ πŸ“ langs               # Config for programming languages/libraries
β”œβ”€β”€ πŸ“ os                  # Specific config of your Operative System or apps
β”œβ”€β”€ πŸ“ restoration_scripts # This will be execute when you restore your dotfiles in another computer/installation
β”œβ”€β”€ πŸ“ scripts             # Your custom scripts
β”œβ”€β”€ πŸ“ shell               # Bash/Zsh/Fish?… configuration files
└── πŸ“ symlinks            # The config of your symlinks

βš™οΈ Versioning configs

dotly allows you to version your apps' config files. Once you've found the config to version you should:

  1. Copy your config file inside your dotfiles so this will be the source of truth. E.g. cp ~/Library/Application Support/Code/User/settings.json $DOTFILES_PATH/editors/code/settings.json
  2. Symlink this file. To do this you should edit your $DOTFILES_PATH/symlinks/conf.YOUR-OS.yaml and add it. E.g. ~/Library/Application Support/Code/User/settings.json: editors/code/settings.json

🎨 Customization

dotly includes an opinionated, minimal, very fast and powerful theme by default. You can configure it using the following parameters in your shell/exports.sh:

CODELY_THEME_MINIMAL=false|true  # If true the theme will only show the prompt status
CODELY_THEME_MODE="dark"|"light" # Use dark if you use dark colors, light if light
CODELY_THEME_PROMPT_IN_NEW_LINE=false|true           # If true the prompt will be in a newline
CODELY_THEME_PWD_MODE="short"|"full"|"home_relative" # short will show the first letter of each directory, full the full path and home_relative the full path relative to the $HOME dir
CODELY_THEME_STATUS_ICON_KO="β–ͺ" # The icon to show if the previous command failed. Useful if you're color blind

πŸ’Ύ Default scripts

β”œβ”€β”€ πŸ“ dotfiles
β”‚  β”œβ”€β”€ create # Creates the dotfiles scructure
β”‚  └── import # Import an existing dotfiles
β”œβ”€β”€ πŸ“ git
β”‚  β”œβ”€β”€ amend           # Amend a commit
β”‚  β”œβ”€β”€ apply-gitignore # Exlude all commited files that are inside the project .gitignore
β”‚  β”œβ”€β”€ changed-files   # Show all changed files to main
β”‚  β”œβ”€β”€ commit          # Add all files and then commit
β”‚  β”œβ”€β”€ contributors    # List contributors with number of commits
β”‚  β”œβ”€β”€ find            # Find commits by commit message
β”‚  β”œβ”€β”€ pretty-diff     # Show a pretty git diff using fzf (and copy selected path to the clipboard)
β”‚  β”œβ”€β”€ pretty-log      # Git log filtering
β”‚  └── rm-file-history # Remove completely a file from the repo with its history
β”œβ”€β”€ πŸ“ mac
β”‚  β”œβ”€β”€ brew     # Some brew utils
β”‚  └── defaults # Some defaults utils to view your changes, import and export
β”œβ”€β”€ πŸ“ package
β”‚  β”œβ”€β”€ add        # Install a package
β”‚  β”œβ”€β”€ dump       # Dump all installed packages
β”‚  β”œβ”€β”€ import     # Import previously dumped packages
β”‚  └── update_all # Update all packages
β”œβ”€β”€ πŸ“ self # Instead of `dot self` you can use direclty `dotly` in your terminal
β”‚  β”œβ”€β”€ debug           # Debug dotly
β”‚  β”œβ”€β”€ install         # Install dotly and setup dotfiles
β”‚  β”œβ”€β”€ lint            # Lint all dotly related bash files
β”‚  β”œβ”€β”€ static_analysis # Static analysis of all dotly related bash files
β”‚  └── update          # Update dotly to the latest stable release
β”œβ”€β”€ πŸ“ shell
β”‚  └── zsh # ZSH helpers
└── πŸ“ symlinks
    └── apply # Apply all symlinks

πŸ’½ Alias

You can see the default aliases here. The most commonly used are:

  • ..: cd one directory up
  • la: ls all files/dirs with colors
  • up: Update all your package managers packages

πŸ“½οΈ Feature showcase (Spanish)

For an in-depth look at the features offered by dotly, you can take a look at this video:

Watch the video

⁉️ Troubleshooting

You can execute dot self debug in parallel with another command to see the errors output.

🀝 Contributing

  • If you want to implement a new feature/script, please, open an issue first

😊 Thanks

A lot of dotly concepts has been inspired by denisidoro/dotfiles

βš–οΈ LICENSE

MIT Β© CodelyTV

dotly's People

Contributors

3d24rd0 avatar afloresdz avatar anjeludo avatar atorfan avatar borjapazr avatar boscodomingo avatar d-asensio avatar danieledu avatar dannegm avatar eduardosimon avatar goi17 avatar gtrabanco avatar henrypalacios avatar inmovilizame avatar ismanapa avatar javiercane avatar josecarlosduran avatar joucogi avatar lsfiege avatar m0rtadelo avatar manuelpimentel avatar mglezsosa avatar pablobernardo avatar rgomezcasas avatar rootcg avatar rubencm avatar santakadev avatar skilla avatar usarral avatar zigotica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotly's Issues

[installer] Error: ".zshrc:source:16: no such file or directory: XXX_DOTFILES_PATH_XXX"

Error in the installing process running dotly for the first time on a MacOS computer:

/Users/xxx/.zshrc:source:16: no such file or directory: XXX_DOTFILES_PATH_XXX/shell/init.sh

Complete output:

% bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles): 
 > Ok! dotfiles will be located in: /Users/javiercane/.dotfiles
 > Initializing your dotfiles git repository
 > Cloning dotly
 > Installing dotly dependencies
 > rust not installed, installing
 > docpars not installed, installing
 > Creating dotfiles structure
 > 🍎 Setting up macOS platform
 > Installing needed gnu packages
 > Installing mas
 > Setting up symlinks
 > Installing zim
 > Installing completions
/Users/javiercane/.zshrc:source:16: no such file or directory: XXX_DOTFILES_PATH_XXX/shell/init.sh
Usage: prompt <options>
Options:
    -c              Show currently selected theme and parameters
    -l              List currently available prompt themes
    -p [<themes>]   Preview given themes (defaults to all)
    -h [<theme>]    Display help (for given theme)
    -s <theme>      Set and save theme
    <theme>         Switch to new theme immediately (changes not saved)

Use prompt -h <theme> for help on specific themes.
/Users/javiercane/.zshrc:source:23: no such file or directory: XXX_DOTFILES_PATH_XXX/shell/zsh/key-bindings.zsh
/Users/javiercane/.zshrc:source:24: no such file or directory: XXX_DOTFILES_PATH_XXX/modules/dotly/shell/zsh/bindings/reverse_search.zsh
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

Problems with installation on Mac

Hello everybody, I have a problem with Mac OS Big Sur, when I update the OS and restart the computer, dotly have problems running correctly and I try to remove all dotfiles and config files manually and install again, but when I run the installation command on the readme, only creates .dotfiles backup and don't do anything more.
Do you have any idea how can solve it?

Thanks for your time!

DOTLY_PATH: unbound variable

Luego de instalar y versionar los dotfiles en una Mac.
Clono el repositorio a un Ubuntu, intento ejecutar:

.dotfiles/modules/dotly/bin/dot self install

Y muestra:
.dotfiles/modules/dotly/bin/dot: line 5: DOTLY_PATH: unbound variable

ΒΏHay algΓΊn paso que me estΓ© faltando para poder ejecutar dot?

Cuando instalo dotly en MacOS no se instalan las dependencias de homebrew.

Al instalarme dotly en MacOS he notado que no se ejecuta la parte que instala las dependencias de Homebrew.

Por lo que he podido ver en la versiΓ³n del script de instalaciΓ³n que tenΓ©is en el repositorio de CodelyTV/dotfiles, con aΓ±adir lo siguiente al final del archivo estarΓ­a resulto:

if platform::is_macos; then
  output::answer "🍎 Installing MacOS custom packages"
  output::question "🌍 Network: Which name do you want to give to this computer? " "network_computer_name"
  install_macos_custom "$network_computer_name"
fi

Enhorabuena por el framework, me parece increíble! 🀩

Error bΓΊsquedas con find (macos)

Ejemplo:

cd ~/.dotfiles

BΓΊsqueda correcta

find . -name install
./modules/dotly/scripts/self/install
./modules/dotly/scripts/package/install
./modules/dotly/modules/dotbot/tools/git-submodule/install
./modules/dotly/modules/dotbot/tools/hg-subrepo/install

Error en la bΓΊsqueda al utilizar *

find . -name inst*
zsh: no matches found: inst*

Posible soluciΓ³n, aΓ±adir a .dotfiles/./shell/init.sh

setopt +o nomatch

Full installation of Xcode is required

As per #69, we would be automatically installing the Command Line Tools in order to have git available during dotly install:

dotly/installer

Lines 98 to 113 in 4828b14

case "$OSTYPE" in
darwin*)
_a "Checking if Command Line Tools are installed πŸ•΅οΈβ€β™‚οΈ"
xcode-select --install 2>&1 | grep installed > /dev/null
if [[ $? ]]; then
_a "Installing Command Line Tools πŸ“Ί"
xcode-select --install
_q "Press a key after command line tools has finished to continue...πŸ‘‡" "CLT_INSTALLED"
fi
;;
*)
_e "Could not install git, no package provider found"
exit 1
;;
esac

However, it seems that we would need an entire installation of Xcode in order to run mas:

%  bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles): 
 > Initializing your dotfiles git repository
 > Cloning dotly
 > Installing dotly dependencies
 > 🍎 Setting up macOS platform
 > Installing needed gnu packages
Error: No such keg: /opt/homebrew/Cellar/bash
Error: No such keg: /opt/homebrew/Cellar/zsh
Error: No such keg: /opt/homebrew/Cellar/coreutils
Error: No such keg: /opt/homebrew/Cellar/make
Error: No such keg: /opt/homebrew/Cellar/gnu-sed
Error: No such keg: /opt/homebrew/Cellar/findutils
Error: No such keg: /opt/homebrew/Cellar/bat
Error: No such keg: /opt/homebrew/Cellar/hyperfine
 > Installing mas
Error: No such keg: /opt/homebrew/Cellar/mas
mas: A full installation of Xcode.app 10.2 is required to compile
this software. Installing just the Command Line Tools is not sufficient.

Xcode can be installed from the App Store.
Error: An unsatisfied requirement failed this build.

It seems that we would not be able to automate the installation of Xcode. You have to manually install it through the App Store, or downloading it from the Apple Developer website after signing in with your Developer ID.

Would you find useful if even if having to do this by hand, we handle this error and instruct the user on how to proceed?

No se puede definir la variable DYLD_LIBRARY_PATH sin desactivar el SIP de MacOS

Buenas,

Ayer me instalΓ© dotly y tengo la necesidad de usar la variable DYLD_LIBRARY_PATH para un proyecto de C#. Como mi necesidad es temporal en tiempo de desarrollo, la ando cargando mediante:

$ export DYLD_LIBRARY_PATH=[path_to_libs]/

Antes de la instalaciΓ³n de dotly, podΓ­a crear esta variable de entorno justo antes de la ejecuciΓ³n de mi programa.

Por ahora, he averiguado que si deshabilito la protecciΓ³n de integridad del sistema MacOS (SIP) la variable se carga sin problemas en la terminal zsh, y puedo ejecutar de nuevo mi programa de C#.

MΓ‘s que nada para que le dΓ©is una vuelta a este tema por si a alguien mΓ‘s le puede pasar y por si hay alguna forma de poder dar mΓ‘s privilegios a las sesiones de dotly que los que lleve por defecto.

Por lo demΓ‘s, gran curro y aprendiendo un poco sobre esta propuesta de los dot files, dotly y bash mediante vuestros cursos.

😊

Problems installing global npm packages

Problem

When running the command

dot package import and having the following file of global npm packages I get the follwing input:

commitlint
cordova
cordova-res
firebase-tools
git-cz
ios-deploy
ios-sim
native-run

---- Importing NPM apps from /home/edu/.dotfiles/langs/js/global_modules.txt ----
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/commitlint
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/commitlint'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/commitlint'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/commitlint'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_19_087Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/cordova
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/cordova'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/cordova'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/cordova'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_27_788Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/cordova-res
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/cordova-res'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/cordova-res'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/cordova-res'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_29_893Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/firebase-tools
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/firebase-tools'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/firebase-tools'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/firebase-tools'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_38_927Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/git-cz
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/git-cz'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/git-cz'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/git-cz'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_40_100Z-debug.log
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  undefined
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_40_574Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/ios-sim
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/ios-sim'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/ios-sim'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/ios-sim'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_42_971Z-debug.log
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/lib/node_modules/native-run
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/native-run'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/native-run'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/lib/node_modules/native-run'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edu/.npm/_logs/2021-03-21T16_30_44_286Z-debug.log
 > All packages imported

Environment

npm 7.6.0
WSL 2 

Notes

When running the command once the dotfiles have been installed I get the exact same ouput. I guess this is due to the user running the install command.

Discussion: Executing scripts in a different way

Description

Would be nice if users can add their own scripts without the need of adding Dotly core libraries manually. This mean delete the necessity of include these three lines in scripts:

set -euo pipefail
. "$DOTLY_PATH/scripts/core/_main.sh"
docs::parse "$@"

Motivation

Core functionality to be included in all scripts by default and not manually.

Features

Can force previous way of command execution by including a comment in the script like this:

# FORCE_DOT_LEGACY

Testing

You can test by using feature/new_dot of my dotly fork here:

You can view how the new dot works with two sample scripts I have created:

dot dotly test
dot dotly test_legacy

Second one will fail because try to use Dotly core functionality but is forced to use previous way of script execution with new syntax. It just to view that fail. To check if old syntax works you can execute any other old style script and view that it works perfectly.

Review Sample Code

To view the changes I have created a PR in my own repository just to view the files that changed this proposal:

Approval considerations

If you accept this change it can be included in PR #129 because it could be considered an important update or create another PR. But some functions from that PR should be included here. To be explicit, core functions that are in dot.sh library.

Mentions: @rgomezcasas @JavierCane @santakadev

error al ejecutar dot en ubuntu

Al ejecutar dot en ubuntu obtengo el siguiente error:

find: modo invΓ‘lido β€˜+111’

Modifique el find que hace dot por "-perm /111" en vez de "-perm +111" y ahora funciona

Me guiΓ© de las opciones de esta gua: https://www.ostechnix.com/find-files-based-permissions/

Igualmente entiendo que si estos scripts, estΓ‘n dentro de mi dotfiles, mas que seguro tienen que tener permisos para mi usuario, no?

Problems migrating to dotly

Hi!

so far the migration to dotly of my dotfiles was quite straight forward. I really like the folder structure which makes it more easily readable. I already had almost all the configurations done in my dotfiles except some interesting findings like navi.
Here you can find my dotfiles migrated to dotly in the develop branch https://github.com/frandieguez/.dots/tree/develop, compare them to the stable master branch which I've being installing on my work machine for quite some time. My desire is to replace my master branch when I see that the develop is stable and I solve some problems that I describe πŸ‘‡

Problems found

  1. Lack of documentation
  • could you document how to add scripts to scripts/? I didn't realize that I have to give execution permissions in order show scripts in the dot command completion
  • From the codelyTV Pro course πŸ˜‰, I've learned some tips but I need some documentation files that remind me of those opinionated rules you already though about.
  1. Extend the installer
    Ok, the dotly installer is really good to perform a fresh start, but once you have ported your dotfiles to dotly and upload them to github... could dotly generate an installer inside my dotfiles folder to ease future installations? To solve this I have created an installer https://github.com/frandieguez/.dots/blob/develop/installer but
  • Not sure if this is a bug but... in my installer I need to execute # zsh $INSTALL_PATH/modules/dotly/modules/zimfw/zimfw.zsh install in order to have the zimfw/init.sh file available. Could this be included inside the dotly self install
  • Is there anything already implemented to install external packages, i.e. in archlinux do something like ... grep -v '#' ./os/linux/archlinux-packages | strings | yay -S --noconfirm but I cannot execute it conditionally for archlinux, and have another one for mac...
  • I found something related with npm, composer, pip, gem package installer but what I can extend it? Is there any documentation to know what to put in the langs/ folder?
  • In the install script I need to execute some after install everything, i.e. I use vim with vim-plug to install plugins.
  • What if I want to share my configurations between my work machine and my personal machine? I call this profiles, and each profile can have it's own Git user/email, system packages to install... Is there any plan to perform this inside dotly?
  1. Common files
  • Where would you put common dotfiles inside the os folder? I have .agignore, .dircolors, .ctags, .tmux.conf... hat I would like to install in mac as well. For now I'm only installing them in Linux and symlinking them with the symlinks/config.yml but... Is there any plans to add a common folder to folder the structure of this use case?

As you can see I have tons of questions.... hope you find them useful. And congrats, dotly is quite useful.

[ISSUE] Failing dot self install

When exec in a new computer where I want my old dotfiles:

export GITHUB_USER="myuser"
export DOTFILES_REPOSITORY="dotfiles" # Your private repository
export DOTFILES_PATH="${HOME}/.dotfiles"
export DOTLY_PATH="$DOTFILES_PATH/modules/dotly
xcode-select --install
git clone [email protected]:$GITHUB_USER/$DOTFILES_REPOSITORY.git "$DOTFILES_PATH"
cd "$DOTFILES_PATH"
git submodule update --init --recursive
"$DOTLY_PATH/bin/dot" self install

The self install stops suddenly. It is because this command in scripts/self/utils/install.sh:

CI=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" >/dev/null 2>&1

It stops the self install and fail. If I remove CI=1 all is running ok but some keyboard input are necessary. I suggest to change to:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2>&1

or use yes command but the user needs to put the administrator password so I do not think is a good idea unless your admin password is yes...

Anyway I think is good for the user receive some output about what is happening dropping the >/dev/null part of the command... What do you think @rgomezcasas ?

After this I installed homebrew first and run again self install I got more errors during git clone in self install:

> Installing mas
/usr/local/Cellar/mas/1.7.1/bin/mas
/usr/local/Cellar/mas/1.7.1/etc/bash_completion.d/mas
/usr/local/Cellar/mas/1.7.1/Frameworks/MasKit.framework/ (33 files)
/usr/local/Cellar/mas/1.7.1/share/fish/vendor_completions.d/mas.fish
 > Setting up symlinks
βœ” Done!
 > Installing zim
x environment: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/environment': Permission denied
x git-info: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/git-info': Permission denied
x history: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/history': Permission denied
x input: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/input': Permission denied
x zsh-autosuggestions: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/zsh-autosuggestions': Permission denied
x completion: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/completion': Permission denied
x zsh-syntax-highlighting: Error during git clone
  fatal: could not create leading directories of '/Users/myoldusername/.dotfiles/modules/dotly/modules/zimfw/modules/zsh-syntax-highlighting': Permission denied

The problem here is that the script is using the old path of myoldusername user instead of current $USER, $HOME. Yes I made a different username in the new computer...

Should the script ask again to rewrite the variable DOTFILES_PATH?

Error al abrir nuevo terminal

Luego de instalar dotly al abrir una nueva terminal esta inicia con esto

/Users/usuario/.zshrc:source:10: no such file or directory: /Users/lliccien/.dotfiles/modules/dotly/modules/zimfw/init.zsh
/Users/usuario/.dotfiles/shell/init.sh:ulimit:2: setrlimit failed: invalid argument
/Users/usuario/.zlogin:source:1: no such file or directory: /Users/lliccien/.dotfiles/modules/dotly/modules/zimfw/login_init.zsh

SO: macOS Catalina 10.15.6
App: Iterm2

Como lo soluciono?

Homebrew install error due to lack of privileges

Problem

dotly installer stops while trying to install Homebrew

Steps followed & log

% bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer) 
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles): 
 > Ok! dotfiles will be located in: /Users/javiercane/.dotfiles
 > Initializing your dotfiles git repository
 > Cloning dotly
 > Installing dotly dependencies
 > 🍎 Setting up macOS platform
 > brew not installed, installing
javiercane@Javiers-MacBook-Pro ~ % echo $OSTYPE
darwin20.0
javiercane@Javiers-MacBook-Pro ~ % cat dotly.log
----- 2021-02-11 07:21:31 - Initializing repository -----
Initialized empty Git repository in /Users/javiercane/.dotfiles/.git/

----- 2021-02-11 07:21:31 - Adding dotly submodule -----
Cloning into '/Users/javiercane/.dotfiles/modules/dotly'...

----- 2021-02-11 07:21:34 - Installing dotly dependencies -----
Submodule 'modules/dotbot' (https://github.com/anishathalye/dotbot.git) registered for path 'modules/dotly/modules/dotbot'
Submodule 'modules/z' (https://github.com/rupa/z.git) registered for path 'modules/dotly/modules/z'
Submodule 'modules/zimfw' (https://github.com/zimfw/zimfw.git) registered for path 'modules/dotly/modules/zimfw'
Cloning into '/Users/javiercane/.dotfiles/modules/dotly/modules/dotbot'...
Cloning into '/Users/javiercane/.dotfiles/modules/dotly/modules/z'...
Cloning into '/Users/javiercane/.dotfiles/modules/dotly/modules/zimfw'...
Submodule path 'modules/dotly/modules/dotbot': checked out 'cf366bbf6676d1c95f412eb514509f16322b5c9c'
Submodule 'lib/pyyaml' (https://github.com/yaml/pyyaml) registered for path 'modules/dotly/modules/dotbot/lib/pyyaml'
Cloning into '/Users/javiercane/.dotfiles/modules/dotly/modules/dotbot/lib/pyyaml'...
Submodule path 'modules/dotly/modules/dotbot/lib/pyyaml': checked out '2f463cf5b0e98a52bc20e348d1e69761bf263b86'
Submodule path 'modules/dotly/modules/z': checked out '125f4dc47e15891739dd8262d5b23077fe8fb9ab'
Submodule path 'modules/dotly/modules/zimfw': checked out 'dfbe535430271c5ee0bbd7cfac6df42222e8cdf0'

----- 2021-02-11 07:21:48 - Installing brew -----
Need sudo access on macOS (e.g. the user javiercane to be an Administrator)!

Some help in order to fix this

  • The dotly installer line where this takes place is:

CI=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2>&1 | log::file "Installing brew"

  • Homebrew discourages sudo usage
  • The exact same command we're executing from dotly is the same that Homebrew recommends from their documentation, the only difference would be that we're setting the CI=1 environment variable
  • If we execute that command without the CI=1 it properly installs Homebrew, so it would be nice to ask for sudo privileges only once while running the dotly installer and use that for all the different installers maybe?

Temporary workaround

  • Install Homebrew directly from your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Once installing Homebrew, in order to properly run again the dotly installer, we have to add Homebrew to the path (☝️path specific for Apple Silicon, check your previous command execution output just in case you're installing it in other platform or with Rosetta):
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/javiercane/.zprofile
eval $(/opt/homebrew/bin/brew shellenv)
type "brew" # should print "brew is /opt/homebrew/bin/brew"
  • Execute again the dotly installer
bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  • It will throw some errors about some kegs not found. I guess because Homebrew does not override the native macOS ones while installing these dependencies, but it symlink them after the installation process in order to do so. So I guess this is not something critical:
# …

 > Installing needed gnu packages
Error: No such keg: /opt/homebrew/Cellar/bash
Error: No such keg: /opt/homebrew/Cellar/zsh
Error: No such keg: /opt/homebrew/Cellar/coreutils
Error: No such keg: /opt/homebrew/Cellar/make
Error: No such keg: /opt/homebrew/Cellar/gnu-sed
Error: No such keg: /opt/homebrew/Cellar/findutils
Error: No such keg: /opt/homebrew/Cellar/bat
Error: No such keg: /opt/homebrew/Cellar/hyperfine

# …

% type "make"
make is /usr/bin/make

BTW: Homebrew is now officially compatible with Apple Silicon πŸŽ‰

Error durante instalaciΓ³n inicial

πŸ‘‹ !

Me he encontrado con lo siguiente en una instalaciΓ³n limpia de Mac:

angel@MacBook-Pro ~ % bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles2): ~/.dotfiles
 > Ok! dotfiles wll be located in: /Users/angel/.dotfiles
 > Initializing your dotfiles git repository
 > Cloning dotly
 > Installing dotly dependencies
 > Creating dotfiles structure
sed: 1: "/Users/angel/.dotfiles/ ...": command a expects \ followed by text

docker command not found

Tengo el comando de docker funcional antes de intalar dotly pero ahora no me lo reconoce, y debo usar sudo

{β–Έ} ~ docker
zsh: command not found: docker
{β–Έ} ~

Problem with dot git pretty-log script

  • S.O: Ubuntu 20
  • dotly: commit e4c8131

When I have a git repository and I tried to run:

dotly git pretty-log

If there are merges and branches in the git graph,
it does no show the modified files and does not copy the commit hash.

Selection_009

Error al instalar en Ubuntu

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles2): $HOME/.dotfiles

Ok! dotfiles wll be located in: /home/marce-ldv/.dotfiles2
Initializing your dotfiles git repository
Cloning dotly
Installing dotly dependencies
Creating dotfiles structure
sed: can't read : No such file or directory

zcompinit Error while installing

I was testing the installation with feature/core with a brand new user and I found this error:

zsh compinit: insecure directories and files, run compaudit for list.
Ignore insecure directories and files and continue [y] or abort compinit [n]? y

It seems like an error with ZIM?

I also test a brand new installation with master with the same problem, could anyone test just to know if is an error I only receive, please?

Anyway asnwering yes, it seems like there are no more errors... I can use it without problem.

Feature Suggestion: dotfiles in iCloud for macOS device

I can work on it, but need to know why it wouldn't be a good idea because I can't see many cons.

I was thinking would be great to have an installer that try to get the dotfiles from iCloud in macOS and reinstall all stuff in a new installation of macOS keeping the secrets in the .dotfiles directory already configured because they are saved ciphered in the iCloud.

I can't see any cons but I do not know how safe is iCloud so I want more opinions to work on this feature or don't work on it.

jq: orden no encontrada

Error on execute "up" comand

i've solved the problem with this command on linux: sudo apt-get install jq


♻️ Updating all the apps on your system

If you want to debug what's happening behind the scenes, you can execute dot self debug in parallel.

🐘 Composer

Changed current directory to /home/luisg/.config/composer
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
1/14: http://repo.packagist.org/p/provider-archived$60d5f896e444581ddd4baae5eaf7f04b63ec618d00f1d8ddf3af1fcf41264015.json
2/14: http://repo.packagist.org/p/provider-2020-07$8a571317def16c1a3e82c347af8643b6c1ef47703e61fb0b4914c0424e255f51.json
3/14: http://repo.packagist.org/p/provider-latest$5acef179572543498650a6ec4a7e2e405019b72973e22f67b41c153904c71db5.json
4/14: http://repo.packagist.org/p/provider-2021-01$83a14872298465060752ee451c2d1c38473b20d5bf5da5a2ccc8d42c5f9600be.json
5/14: http://repo.packagist.org/p/provider-2013$d0dc77fd03e5732f1bdb80037c61df42ed94764bddb5f24774761c59739791cc.json
6/14: http://repo.packagist.org/p/provider-2020-10$5f45a8746e259ad1f4a913b5918b1764c7c47fae06557f26c86c9f9bdefc6e50.json
7/14: http://repo.packagist.org/p/provider-2016$7b8f1749c41d2c755e25992d763588fa527308b20f53fb15523c5a938d960bc4.json
8/14: http://repo.packagist.org/p/provider-2021-04$5589d4c48bd0b13b1c84e38b638052008022abda30a90f1104b9483dcb6e9bea.json
9/14: http://repo.packagist.org/p/provider-2014$ab43f689a426163c7bd97eee1359d66270cf969532a976b03d4d4e608395b25c.json
10/14: http://repo.packagist.org/p/provider-2019$faad80b841acda6f4b6c50e755f3aa08030d08c789c941b6f668ec28734e1956.json
11/14: http://repo.packagist.org/p/provider-2020$35f31d981cbcac859697f80a51b6a485ba62378c6842041a2eee6fcb0e70cdba.json
12/14: http://repo.packagist.org/p/provider-2015$5dd99e47c377393321c91a2b7cede7c1dff20f23728c89dd551c20543750cf5e.json
13/14: http://repo.packagist.org/p/provider-2017$62c94621ae4a052b1d7e00cb9398703ef09bc8f69fe8fce22e309a831b6011f9.json
14/14: http://repo.packagist.org/p/provider-2018$a8da54a720fed967e5abc63f2893b62641cd24b16ec9102c2417215d40e4db0d.json
Finished: success: 14, skipped: 0, failure: 0, total: 14
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
/home/luisg/.dotfiles/modules/dotly/scripts/package/src/package_managers/composer.sh: lΓ­nea 3: jq: orden no encontrada
/home/luisg/.dotfiles/modules/dotly/scripts/package/src/package_managers/composer.sh: lΓ­nea 3: jq: orden no encontrada
/home/luisg/.dotfiles/modules/dotly/scripts/package/src/package_managers/composer.sh: lΓ­nea 5: [: : se esperaba una expresiΓ³n entera

Alias gd no funciona

Al usar el alias gd no funciona.

/home/jmiralles/.dotfiles/modules/dotly/bin/dot: line 45: /home/jmiralles/.dotfiles/modules/dotly/scripts/git/pretty-diff: No such file or directory

He mirado en la carpeta scripts y no veo ninguna carpeta git.

Pasos que seguΓ­:

  • Instalar dotly en PC1

  • Commitar en repo personal la carpeta .dotfiles

  • Clonar en PC2 (con flag --recurse-submodules) el repo .dotfiles

  • Ejecutar dot self install

AΓ±adir visualizaciΓ³n de la documentaciΓ³n de los comandos a la vista del comando dot

En los dotfiles de @rgomezcasas y en el propio curso de dotfiles, se puede ver la documentaciΓ³n de un comando en la parte derecha del comando dot.

image

He conseguido aΓ±adirlo en mi local modificando el fichero _main.sh para que lea el fichero documentation.sh:

#!/usr/bin/env bash

docs::eval() {
  eval "$(docpars -h "$(grep "^##?" "$0" | cut -c 5-)" : "$@")"
}

Para que funcione correctamente es necesaria la dependencia docpars.

Abro la issue por si es una feature de la cual aceptarΓ­as PR.

Muchas gracias!

Missing backup for existing files

There is not a disclaimer when you install dotly on a configured computer, the installation overwrites my existing .zshrc and replace them with the default template, I lost my configuration.

Problema al tratar de restaurar mis dotfiles

al tratar de restaurar mis dotfiles estoy teniendo un error, segui los pasos segun los pasos segun la Issue #9
como resultado me arroja este error: zsh: no such file or directory: /home/osito/.dotfiles/dot

luego segui este otro:

Restore your Dotfiles

  • Install git
  • Clone your dotfiles repository git clone [your repository of dotfiles] $HOME/.dotfiles
  • Go to your dotfiles folder cd $HOME/.dotfiles
  • Install git submodules git submodule update --init --recursive
  • Install your dotfiles DOTFILES_PATH="$HOME/.dotfiles" DOTLY_PATH="$DOTFILES_PATH/modules/dotly" "$DOTLY_PATH/bin/dot" self install
  • Restart your terminal
  • Import your packages dot package import

En el 4to paso con el comando: DOTFILES_PATH="$HOME/.dotfiles" DOTLY_PATH="$DOTFILES_PATH/modules/dotly" "$DOTLY_PATH/bin/dot" self install arroja este error: zsh: no such file or directory: /bin/dot

Alguien podria ayudarme por favor, gracias de antemano
P.D: SO Archlinux

Error Installing on WSL

I get this error installing on Win10 with WSL Ubuntu

Intalling rust
error: linker cc not found

I solved following this post
solution

Error instalaciΓ³n con wget en ubuntu

Hola,

En una ubuntu 19.10 con zsh he probado de instalar mediante el comando wget, justo despues de preguntar por la carpeta y responder con la opcion por defecto, aparece un error de que la carpeta no existe.

Por algun motivo, en lugar de crear .dotfiles2 ha creado una carpeta que se llama asi:

'DOTFILES_PATH=DOTFILES_PATH="${DOTFILES_PATH:-$HOME'

DespuΓ©s de borrar esta carpeta 'estraΓ±a', he copiado el script al disco local y funciona correctamente.

Tambien he probado el comando con bash + curl y me ha funcionado correctamente.

La salida del instalador es esta (sin la conexion del wget):

wget -O - https://raw.githubusercontent.com/CodelyTV/dotly/master/installer | bash
2020-05-14 19:30:00 (18,2 MB/s) - written to stdout [2401/2401]

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Ok! dotfiles wll be located in: DOTFILES_PATH=DOTFILES_PATH="${DOTFILES_PATH:-$HOME/.dotfiles2}"
Initializing your dotfiles git repository
Cloning dotly
Installing dotly dependencies
bash: line 90: cd: DOTFILES_PATH=DOTFILES_PATH="${DOTFILES_PATH:-$HOME/.dotfiles2}"/modules/dotly: No such file or directory

Cargo update problem

When executing cargo update I am having this error:

error: could not find `Cargo.toml` in `/Users/<username>` or any parent directory

MacOS Big Sur 11.2

This affects to dot package update_all do not know why I am getting this error. I tried:

  • Creating the file manually empty after uninstalling all packages and reinstalling them.
  • Uninstall rust and reinstall.
  • Updated Command Line Tools

No valid solution found. I know it is not a dotly error, but could affects to one command of dotly.

Using sed in 'script/dotfiles/create' does not work on linux

Due to different behaviours in sed for MacOS (BSD) and Linux (GNU) there is no way to make an in-place substitution that works on both OS families.

# MacOS 
sed -i '' -e ... 

# Linux
sed -i -e ...

The only way I've found to make it work on both specifications was to use this workaround:

# Create in both OS families a '.bak' file that can be deleted
sed -i.'bak' -e ...

# Create in both OS families a '.' file that can be deleted
sed -i.'' -e ...

I had to face this issue while making some common Makefile used on linux and macos.

PD: Is it ok to contribute? Might be an option to use the os detection that already being used in dotly to apply a proper sed in each case... I know is dirty, but the only solution available so far if using sed is mandatory :)

PD2: Super happy with my CodelyTV susbcription and working on my dotfiles!!

core/paths.sh cuando escribo dot devuelve illegal mode string

Cuando ejecuto el comando dot me responde con un illegal mode string, busque las funciones y lo que hice fue remover la barra para que me funcionarΓ‘.

{β–Έ} ~ dot
find: -perm: /+111: illegal mode string
find: -perm: /+111: illegal mode string

βœ– No executable scripts

No sΓ© mucho de bash, entonces es posible que algo este omitiendo o algo haya agregado antes que provoque ese comportamiento.

agrego la linea en donde hice el cambio

find "$DOTLY_PATH/scripts" -maxdepth 2 -perm /+111 -type f |

saludos.

The autocompletion of the dot command does not work in Ubuntu 18.04+

Dot command autocompletion does not work in Ubuntu. It has been tested on Ubuntu 18.04 and Ubuntu 20.04.

In Ubuntu it is necessary to deactivate the compinit at a global level, since it delays the startup time of the shell.

Possible solutions:

One question. Currently the autocompletions of the dot command are loaded by launching the zsh reload_completions command. It is a one time configuration, right? You could implement a mechanism by which this is done every X time, as the following snnipet shows: https://gist.github.com/ctechols/ca1035271ad134841284

PD: If you need to test in Ubuntu, I can do it without any problem, since I work daily in this OS.

Installer failing after trying to install docpars

Description

dotly installer fails while installing docpars and stops dotly installation without any kind of error message.

Environment

  • MacBook Pro (13-inch, M1, 2020)
  • macOS Big Sur 11.0.1 (20B29)

How to reproduce

$ bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles): 
 > The path '/Users/javiercane/.dotfiles' already exist
 > Creating a backup in '/Users/javiercane/.dotfiles.1607287362.back'
 > Initializing your dotfiles git repository
 > Cloning dotly

 > Installing dotly dependencies

 > rust not installed, installing
 > docpars not installed, installing
$

2 different issues

  1. Not being able to debug what happened due to redirecting all the installer standard error to /dev/null due to 2>&1
  2. Not installing docpars properly

Troubleshooting

It seems to be related with:

! platform::command_exists cargo && output::error "rust not installed, installing" && curl https://sh.rustup.rs -sSf | sh -s -- -y >/dev/null 2>&1
! platform::command_exists docpars && output::error "docpars not installed, installing" && cargo install docpars >/dev/null 2>&1

If we execute these commands separately, we see something that may be the root cause.

Rust installation:

$ curl https://sh.rustup.rs -sSf | sh -s -- -y

info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-apple-darwin
warning: Updating existing toolchain, profile choice will be ignored
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: default toolchain set to 'stable-x86_64-apple-darwin'

  stable-x86_64-apple-darwin unchanged - rustc 1.48.0 (7eac88abb 2020-11-16)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done
automatically.

To configure your current shell, run:
source $HOME/.cargo/env

This (configuring the current shell) is something we don't do in the dotly installer. If we don't do so, cargo is not in the current path and it fails while trying to install docpars:

$ cargo install docpars
zsh: command not found: cargo

If we execute:

$ source $HOME/.cargo/env
$ cargo install docpars  
    Updating crates.io index
  Downloaded docpars v0.2.0
  Downloaded 1 crate (12.7 KB) in 1.11s
  Installing docpars v0.2.0
  Downloaded thread_local v1.0.1
  Downloaded memchr v2.3.4
  Downloaded proc-macro2 v1.0.24
  Downloaded quote v1.0.7
  Downloaded unicode-xid v0.2.1
  Downloaded strsim v0.9.3
  Downloaded regex v1.4.2
  Downloaded regex-syntax v0.6.21
  Downloaded lazy_static v1.4.0
  Downloaded syn v1.0.53
  Downloaded docopt v1.1.0
  Downloaded serde_derive v1.0.118
  Downloaded serde v1.0.118
  Downloaded aho-corasick v0.7.15
  Downloaded 14 crates (1.2 MB) in 0.76s
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling memchr v2.3.4
   Compiling syn v1.0.53
   Compiling serde_derive v1.0.118
   Compiling serde v1.0.118
   Compiling lazy_static v1.4.0
   Compiling regex-syntax v0.6.21
   Compiling strsim v0.9.3
   Compiling thread_local v1.0.1
   Compiling aho-corasick v0.7.15
   Compiling quote v1.0.7
   Compiling regex v1.4.2
   Compiling docopt v1.1.0
   Compiling docpars v0.2.0
    Finished release [optimized] target(s) in 31.37s
  Installing /Users/javiercane/.cargo/bin/docpars
   Installed package `docpars v0.2.0` (executable `docpars`)

It successfully installs docpars and we can finally execute the dotly installer without errors due to already having docpars available πŸŽ‰:

bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/master/installer)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
~ β”‚ πŸš€ Welcome to the dotly installer! β”‚ ~
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€” Where do you want your dotfiles to be located? (default ~/.dotfiles): 
 > The path '/Users/javiercane/.dotfiles' already exist
 > Creating a backup in '/Users/javiercane/.dotfiles.1607290158.back'
 > Initializing your dotfiles git repository
 > Cloning dotly
 > Installing dotly dependencies
 > delta not installed, installing
 > Creating dotfiles structure
 > 🍎 Setting up macOS platform
 > Installing needed gnu packages
 > Installing mas
 > Setting up symlinks
 > Installing zim
$ 

Conclusions

  1. Should we really have to redirect the commands standard error to /dev/null? In fact, it's happening the same thing again with the Installing zim step. This makes it harder to debug & report dotly errors. Alternatives:
    1. If what we want is a cleaner output for the installer: Do not redirect the standard error to /dev/null but only the standard output (remove the 2>&1 part leaving the > /dev/null one)
    2. Redirect the standard error to a file in order to be able to debug it and/or file issues with its content
    3. Adding a --debug mode without redirecting any output
    4. Consider any of the previous options at least until reaching a stable 1.0 dotly version
    5. 🌈
  2. Should we add the source $HOME/.cargo/env execution in between these lines?
    ! platform::command_exists cargo && output::error "rust not installed, installing" && curl https://sh.rustup.rs -sSf | sh -s -- -y >/dev/null 2>&1
    ! platform::command_exists docpars && output::error "docpars not installed, installing" && cargo install docpars >/dev/null 2>&1

🌈 TODO VA A SALIR BIEN 🌈

Autocompletions error while entering bash mode

How to reproduce

  • Install dotly
  • Restart your Terminal
  • Execute bash

Output

{β–Έ} ~ bash                                                                             
bash: /Users/javiercane/.dotfiles/shell/bash/completions/*: No such file or directory

Expected

No errors in the output

Workaround

rm ~/.dotfiles/shell/bash/completions/.gitkeep

Duda sobre DOTFILES_PATH para scripts/core/_main

Para el caso de que ya se instalo dotly en el sistema (mac en mi caso), si utilizo $git co (o discard) me sale un error:

Users/juanito/.dotfiles/modules/dotly/bin/git-undo: line 5: /Users/juanito/.dotfiles/scripts/core/_main.sh: No such file or directory

No seria cambiar a DOTLY_PATH en lugar de DOTFILES_PATH para que funcione ?

source "$DOTFILES_PATH/scripts/core/_main.sh"

Igual creo que quizΓ‘s se podria quitar de ahi, pero no se.

saludos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.