.dotfiles/configs/zsh/functions/conf.zsh

31 lines
404 B
Bash
Raw Normal View History

2022-03-14 19:21:46 +01:00
function conf(){
2022-03-28 14:12:36 +02:00
OLD_PWD=$PWD;
2022-03-14 19:21:46 +01:00
if [ "$1" = "u" ]; then
source ~/.zshrc
else
cd ~/.dotfiles/
if [ "$1" != "" ]; then
cd configs
cd $1
fi
if [[ -f "init.lua" ]]; then
nvim init.lua
elif [[ -f ".zshrc" ]]; then
nvim .zshrc
source ~/.zshrc
elif [[ -f "config" ]]; then
nvim config
else
nvim .
fi
fi
2022-03-28 14:12:36 +02:00
cd $OLD_PWD
2022-03-14 19:21:46 +01:00
}