🐛 (.zshrc, install.sh): fix newline issues at the end of files

This commit is contained in:
Frank Qing
2025-05-28 02:42:18 +08:00
parent d160d1795b
commit 5f22fb4d7e
5 changed files with 46 additions and 2 deletions

2
.zshrc
View File

@@ -228,4 +228,4 @@ export FZF_DEFAULT_OPS="--extended"
# Initialize zoxide (smarter cd command) # Initialize zoxide (smarter cd command)
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
alias k="k -h" # show human readable file sizes, in kb, mb etc alias k="k -h" # show human readable file sizes, in kb, mb etc

View File

@@ -347,4 +347,4 @@ fi
# Restore original working directory # Restore original working directory
cd "$ORIGINAL_DIR" cd "$ORIGINAL_DIR"
exit exit

29
install_nvm.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Save the original working directory
ORIGINAL_DIR="$(pwd)"
# Install nvm (Node Version Manager) if it is not already installed
if command -v nvm &> /dev/null; then
echo -e "nvm is already installed\n"
else
echo -e "Installing nvm (Node Version Manager)\n"
# Using the official install script (https://github.com/nvm-sh/nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# Load nvm for the remainder of this script
export NVM_DIR="${XDG_CONFIG_HOME:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi
# OPTIONAL: Install the latest LTS version of Node.js
# Uncomment the following line if you would like to automatically install it
nvm install --lts
# Apply the "basic" zsh configuration patch (downloads zshrc/basic.zsh to ~/.config/zshrc/basic.zsh)
curl -s https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s basic
# Restore original working directory
cd "$ORIGINAL_DIR"
echo -e "\nAll basic packages have been installed. Restart your terminal or run 'source ~/.zshrc' to start using them.\n"

4
zshrc/nvm.zsh Normal file
View File

@@ -0,0 +1,4 @@
# Initialize nvm (Node Version Manager)
export NVM_DIR="${XDG_CONFIG_HOME:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

11
zshrc/personal.zsh Normal file
View File

@@ -0,0 +1,11 @@
# This my personal zshrc configs. Feel free to use it and modify according to your needs
# Place all your .zshrc configurations (including this one) in a single or multiple files under ~/.config/ezsh/zshrc/ folder
# Additional OH-MY-ZSH plugins to enable
plugins+=(lol httpie docker docker-compose pyenv pip)
# Remove OH-MY-ZSH plugins from the default config
plugins=(${plugins:#(zsh-autosuggestions|lol)})
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv status command_execution_time background_jobs todo ram load rvm time)