rename .subbash to .config/bash, .subzsh to .config/zsh

This commit is contained in:
TheK4n 2023-11-07 09:39:35 +03:00
parent 841ad03a9b
commit c4cea7e6c9
24 changed files with 59 additions and 58 deletions

10
.gitignore vendored
View File

@ -1,12 +1,12 @@
home/user/.subzsh/plugins/* home/user/.config/zsh/plugins/*
home/user/.config/nvim/plugin home/user/.config/nvim/plugin
home/user/.config/nvim/spell home/user/.config/nvim/spell
home/user/.subbash/bashrc.d/* home/user/.config/bash/bashrc.d/*
!home/user/.subbash/bashrc.d/.gitkeep !home/user/config/bash/bashrc.d/.gitkeep
home/user/.subzsh/zshrc.d/* home/user/.config/zsh/zshrc.d/*
!home/user/.subzsh/zshrc.d/.gitkeep !home/user/.config/zsh/zshrc.d/.gitkeep
*.zwc *.zwc

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
# .bashrc by TheK4n # .bashrc by TheK4n
# https://github.com/TheK4n/dotfiles # https://github.com/TheK4n/dotfiles
if [ -f $HOME/.subbash/sourcer ]; then if [ -f "$HOME/.config/bash/sourcer" ]; then
source $HOME/.subbash/sourcer source $HOME/.config/bash/sourcer
fi fi

View File

@ -0,0 +1,19 @@
_so () {
[ -r "$1" ] && source "$1"
}
if [[ $0 == *bash ]]; then
_so "$HOME"/.config/bash/export
_so "$HOME"/.config/bash/shopt
fi
if [[ $- == *i* ]]; then
_so "$HOME"/.config/bash/prompt
_so "$HOME"/.config/bash/aliases
_so "$HOME"/.config/bash/functions
_so "$HOME"/.config/bash/completion
fi
_sod "$HOME"/.config/bash/bashrc.d

View File

@ -26,7 +26,7 @@
addEmptyPathspec = false addEmptyPathspec = false
[alias] [alias]
a = "!git ls-files -m | fzf | xargs git add" a = "!git ls-files --exclude-standard -m --others -t | fzf | cut -d' ' -f2 | xargs git add"
d = diff d = diff
ds = diff --staged ds = diff --staged
dno = diff --name-only dno = diff --name-only

View File

@ -14,7 +14,7 @@ install_if_not_exists zsh-users/zsh-syntax-highlighting
install_if_not_exists hlissner/zsh-autopair install_if_not_exists hlissner/zsh-autopair
install_if_not_exists unixorn/fzf-zsh-plugin install_if_not_exists unixorn/fzf-zsh-plugin
so ~/.subzsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh so ~/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
so ~/.subzsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh so ~/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh
so ~/.subzsh/plugins/hlissner/zsh-autopair/autopair.zsh so ~/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh
so ~/.subzsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh so ~/.config/zsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh

View File

@ -0,0 +1,22 @@
_so () {
[ -f "$1" ] && source "$1"
}
_so /etc/zsh_command_not_found
_so "$HOME"/.config/zsh/options
_so "$HOME"/.config/zsh/completion
_so "$HOME"/.config/zsh/history
_so "$HOME"/.config/zsh/prompt
_so "$HOME"/.config/zsh/other
_so "$HOME"/.config/zsh/plugin
_so "$HOME"/.config/zsh/aliases
_so "$HOME"/.config/bash/aliases
_so "$HOME"/.config/bash/completion
_so "$HOME"/.config/bash/export
_so "$HOME"/.config/bash/functions
_so "$HOME"/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
_sod "$HOME"/.config/zsh/zshrc.d

View File

@ -1,19 +0,0 @@
_so () {
[ -r "$1" ] && source "$1"
}
if [[ $0 == *bash ]]; then
_so "$HOME"/.subbash/export
_so "$HOME"/.subbash/shopt
fi
if [[ $- == *i* ]]; then
_so "$HOME"/.subbash/prompt
_so "$HOME"/.subbash/aliases
_so "$HOME"/.subbash/functions
_so "$HOME"/.subbash/completion
fi
_sod "$HOME"/.subbash/bashrc.d

View File

@ -1,22 +0,0 @@
_so () {
[ -f "$1" ] && source "$1"
}
_so /etc/zsh_command_not_found
_so "$HOME"/.subzsh/options
_so "$HOME"/.subzsh/completion
_so "$HOME"/.subzsh/history
_so "$HOME"/.subzsh/prompt
_so "$HOME"/.subzsh/other
_so "$HOME"/.subzsh/plugin
_so "$HOME"/.subzsh/aliases
_so "$HOME"/.subbash/aliases
_so "$HOME"/.subbash/completion
_so "$HOME"/.subbash/export
_so "$HOME"/.subbash/functions
_so "$HOME"/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
_sod "$HOME"/.subzsh/zshrc.d

View File

@ -2,8 +2,8 @@
# .zshrc by TheK4n # .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles # https://github.com/TheK4n/dotfiles
if [ -f $HOME/.subzsh/sourcer ]; then if [ -f $HOME/.config/zsh/sourcer ]; then
source $HOME/.subzsh/sourcer source $HOME/.config/zsh/sourcer
fi fi

View File

@ -9,8 +9,8 @@ readonly SUB="$(pwd)/home/user"
declare -A TARGETS=( declare -A TARGETS=(
["bash"]=".subbash .bashrc .profile" ["bash"]=".config/bash .bashrc .profile"
["zsh"]="%bash .subzsh .zshrc .zprofile .zfunc .zlogout .inputrc" ["zsh"]="%bash .config/zsh .zshrc .zprofile .zfunc .zlogout .inputrc"
["tmux"]=".tmux.conf" ["tmux"]=".tmux.conf"
["alacritty"]=".config/alacritty" ["alacritty"]=".config/alacritty"
["nvim"]=".config/nvim .local/bin/vim_askpass_helper .local/bin/vim_askpass_helper_python" ["nvim"]=".config/nvim .local/bin/vim_askpass_helper .local/bin/vim_askpass_helper_python"