Add variable for the zsh alias directory and set it to .zshrc.d.

This commit is contained in:
cyteen 2020-12-13 16:15:44 +00:00
parent b0491d4f1c
commit 8c466f593d
11 changed files with 189 additions and 170 deletions

View File

@ -324,8 +324,10 @@ if [ -f ~/.aliases ]; then
fi
EOF
mkdir -p ${DEST}/.zsh_aliases.d
echo "alias xcalc=/usr/bin/free42bin" > ${DEST}/.zsh_aliases.d/003_free42.zsh
ALIAS_DIR=".zshrc.d"
mkdir -p ${DEST}/${ALIAS_DIR}
echo "alias xcalc=/usr/bin/free42bin" > ${DEST}/${ALIAS_DIR}/003_free42.zsh
cd /usr/src

View File

@ -10,8 +10,9 @@ DSC_FILE="http://deb.debian.org/debian/pool/main/f/free42-nologo/free42-nologo_1
DEST=${1:-/etc/skel}
# Set and alias
mkdir -p ${DEST}/zsh_aliases.d
echo "alias xcalc=/usr/bin/free42bin" > ${DEST}/.zsh_aliases.d/003_free42.zsh
ALIAS_DIR=".zshrc.d"
mkdir -p ${DEST}/${ALIAS_DIR}
echo "alias xcalc=/usr/bin/free42bin" > ${DEST}/${ALIAS_DIR}/003_free42.zsh
mkdir -p ${DEST}/.free42/

View File

@ -2,7 +2,8 @@
apt install -y grc
DEST=${1:-/etc/skel}
ALIAS_HOME=${DEST}/.zsh_aliases.d/
ALIAS_DIR=".zshrc.d"
ALIAS_HOME=${DEST}/${ALIAS_DIR}/
ALIAS_FILE=${ALIAS_HOME}/003_grc.sh
mkdir -p ${ALIAS_HOME}

View File

@ -81,7 +81,7 @@ RELEASE=git
## Create directories and configuration files
# '$ mw add' and follow the prompts.
ALIAS_DIR=".zshrc.d"
BUILD_DIR=/var/tmp/build_mutt-wizard
MUTTWIZARDCONF="/usr/local/share/mutt-wizard"
#MUTTDIR="$HOME/.config/mutt"
@ -251,8 +251,8 @@ mkdir -p ${EXAMPLES}/accounts
mkdir -p ${EXAMPLES}/fonts
#---------------------------------------------------------------------------------
mkdir -p ${BUILD_DIR}/skel/.zsh_aliases.d/
echo 'alias mutt="neomutt "' >> ${BUILD_DIR}/skel/.zsh_aliases.d/002_neomutt.zsh
mkdir -p ${BUILD_DIR}/skel/${ALIAS_DIR}/
echo 'alias mutt="neomutt "' >> ${BUILD_DIR}/skel/${ALIAS_DIR}/002_neomutt.zsh
#---------------------------------------------------------------------------------
## git clone https://github.com/sheoak/neomutt-powerline-nerdfonts.git

View File

@ -15,117 +15,123 @@ DEST=/etc/skel
NEOVIM_HOME=${DEST}/.config/neovim
LANGSERVER_CONF=${NEOVIM_HOME}/coc-settings.json
declare -A COC_OPT
# FIXME: Convert the following heredocs to jq
cat > ${LANGSERVER_CONF} <<EOF
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
}
EOF
#cat > ${LANGSERVER_CONF} <<EOF
#"languageserver": {
# "golang": {
# "command": "gopls",
# "rootPatterns": ["go.mod"],
# "filetypes": ["go"]
# }
#}
#EOF
COC_OPT[1]='.["languageserver"] = {"golang": {"command": "gopls", "rootPatterns" = ["go.mod"] , "filetypes" = ["go"] }'
## https://github.com/rcjsuen/dockerfile-language-server-nodejs
#cat > ${LANGSERVER_CONF} <<EOF
#"languageserver": {
# "dockerfile": {
# "command": "docker-langserver",
# "filetypes": ["dockerfile"],
# "args": ["--stdio"]
# }
#}
#EOF
COC_OPT[2]='.["languageserver"] = {"dockerfile": {"command": "docker-langserver", "filetypes" = ["dockerfile"], "args" = ["--stdio"] }'
# https://github.com/rcjsuen/dockerfile-language-server-nodejs
cat > ${LANGSERVER_CONF} <<EOF
"languageserver": {
"dockerfile": {
"command": "docker-langserver",
"filetypes": ["dockerfile"],
"args": ["--stdio"]
}
}
EOF
# h# https://github.com/palantir/python-language-serverttps://github.com/mads-hartmann/bash-language-server
cat > ${LANGSERVER_CONF} <<EOF
"languageserver": {
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"],
"ignoredRootPaths": ["~"]
}
}
## h# https://github.com/palantir/python-language-serverttps://github.com/mads-hartmann/bash-language-server
#cat > ${LANGSERVER_CONF} <<EOF
#"languageserver": {
# "bash": {
# "command": "bash-language-server",
# "args": ["start"],
# "filetypes": ["sh"],
# "ignoredRootPaths": ["~"]
# }
#}
COC_OPT[3]='.["languageserver"] = {"bash": {"command": "bash-language-server", "filetypes" = ["sh"], "args" = ["start"], "ignoredRootPaths" = ["~"] }'
## Python
# https://github.com/palantir/python-language-server
cat > ${LANGSERVER_CONF} <<EOF
"languageserver": {
"python": {
"command": "python",
"args": [
"-mpyls",
"-vv",
"--log-file",
"/tmp/lsp_python.log"
],
"trace.server": "verbose",
"filetypes": [
"python"
],
"settings": {
"pyls": {
"enable": true,
"trace": {
"server": "verbose"
},
"commandPath": "",
"configurationSources": [
"pycodestyle"
],
"plugins": {
"jedi_completion": {
"enabled": true
},
"jedi_hover": {
"enabled": true
},
"jedi_references": {
"enabled": true
},
"jedi_signature_help": {
"enabled": true
},
"jedi_symbols": {
"enabled": true,
"all_scopes": true
},
"mccabe": {
"enabled": true,
"threshold": 15
},
"preload": {
"enabled": true
},
"pycodestyle": {
"enabled": true
},
"pydocstyle": {
"enabled": false,
"match": "(?!test_).*\\.py",
"matchDir": "[^\\.].*"
},
"pyflakes": {
"enabled": true
},
"rope_completion": {
"enabled": true
},
"yapf": {
"enabled": true
}
}
}
}
}
}
EOF
#cat > ${LANGSERVER_CONF} <<EOF
#"languageserver": {
# "python": {
# "command": "python",
# "args": [
# "-mpyls",
# "-vv",
# "--log-file",
# "/tmp/lsp_python.log"
# ],
# "trace.server": "verbose",
# "filetypes": [
# "python"
# ],
# "settings": {
# "pyls": {
# "enable": true,
# "trace": {
# "server": "verbose"
# },
# "commandPath": "",
# "configurationSources": [
# "pycodestyle"
# ],
# "plugins": {
# "jedi_completion": {
# "enabled": true
# },
# "jedi_hover": {
# "enabled": true
# },
# "jedi_references": {
# "enabled": true
# },
# "jedi_signature_help": {
# "enabled": true
# },
# "jedi_symbols": {
# "enabled": true,
# "all_scopes": true
# },
# "mccabe": {
# "enabled": true,
# "threshold": 15
# },
# "preload": {
# "enabled": true
# },
# "pycodestyle": {
# "enabled": true
# },
# "pydocstyle": {
# "enabled": false,
# "match": "(?!test_).*\\.py",
# "matchDir": "[^\\.].*"
# },
# "pyflakes": {
# "enabled": true
# },
# "rope_completion": {
# "enabled": true
# },
# "yapf": {
# "enabled": true
# }
# }
# }
# }
# }
#}
#EOF
COC_OPT[4]='.["languageserver"] = {"python": {"command": "python", "filetypes" = ["py"], "args" = ["-mpyls", "-vv", "--log-file", "/tmp/lsp_python.log"], "ignoredRootPaths" = ["~"] }'
pip install -U setuptools
pip install 'python-language-server[all]'

View File

@ -2,15 +2,17 @@
sudo apt -y install tldr-py fzf
TLDR_CONFIG_DIR=${HOME}/.tldr
#mkdir -p ${TLDR_CONFIG_DIR}
ALIAS_DIR=".zshrc.d"
mkdir -p ${TLDR_CONFIG_DIR}
cd ${HOME}
git clone https://github.com/tldr-pages/tldr.git .tldr
cat > ${HOME}/.zsh_aliases.d/003_tldr.zsh <<EOF
cat > ${HOME}/${ALIAS_DIR}/003_tldr.zsh <<EOF
if [ -x /usr/bin/tldr ]; then
alias howto="tldr find"
alias fhowto="tldr list | fzf | xargs -I{} tldr find {}"
fi
EOF
cat > ${HOME}/.tldrrc <<'EOF'

View File

@ -3,7 +3,8 @@ mkdir -p ~/.config/vifm/scripts
# https://gitlab.com/dwt1/dotfiles/tree/master/.config/vifm/scripts
cat > ~/.zsh_aliases.d/005_vifm.zsh << 'EOF'
ALIAS_DIR=".zshrc.d"
cat > ~/${ALIAS_DIR}/005_vifm.zsh << 'EOF'
alias vifm="~/.config/vifm/scripts/vifmrun"
EOF

View File

@ -2,6 +2,7 @@
# Run 020_zsh.sh to populate the files needed for /etc/skel
# assuming default user
ZSH_USER=default
ALIAS_DIR=".zshrc.d"
sed -i 's,^\(DSHELL=\).*,\1'/bin/zsh',' /etc/adduser.conf
#sed -i 's,^\(SHELL=\).*,\1'/bin/zsh',' /etc/default/useradd
@ -13,7 +14,7 @@ cp -a /home/${ZSH_USER}/.zshrc /etc/skel
cp -a /home/${ZSH_USER}/.zshrc.d /etc/skel
cp -a /home/${ZSH_USER}/.zsh_functions /etc/skel
cp -a /home/${ZSH_USER}/.zsh_aliases /etc/skel
cp -a /home/${ZSH_USER}/.zsh_aliases.d /etc/skel
cp -a /home/${ZSH_USER}/${ALIAS_DIR} /etc/skel
#cp -a /home/${ZSH_USER}/.zsh-completitions /etc/skel
cp -a /home/${ZSH_USER}/.zgen /etc/skel
cp -a /home/${ZSH_USER}/.zgen-setup /etc/skel

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash
echo "Broken, incomplete or untested."
exit 1
DEST=${1:-/etc/skel}
ALIAS_DIR=".zshrc.d"
## Completions for Debian 9.0 - may be included in zgen
#
#sudo bash -c "cat > /etc/apt/sources.list.d/shells:zsh-users:zsh-completions.list" << 'EOF'
@ -22,31 +26,31 @@ set -x
mkdir -p /usr/local/share/zsh/site-functions
chmod g-w /usr/local/share/zsh/site-functions
cd ~ || exit
cd ${DEST} || exit
chsh -s "$(which zsh)" "${USER}"
apt install -y git
# Install zgen plugin manager and zsh quicktart to get a default setup for zsh
git clone http://github.com/tarjoilija/zgen # available with apt install zgen which installs to /usr/share/zgen
#git clone http://github.com/unixorn/zsh-quickstart-kit # FIXME: needs to be packaged
mkdir -p ~/.zgen/robbyrussell/
git clone http://github.com/ohmyzsh/ohmyzsh ~/.zgen/robbyrussell/ohmyzsh
mkdir -p ${DEST}/.zgen/robbyrussell/
git clone http://github.com/ohmyzsh/ohmyzsh ${DEST}/.zgen/robbyrussell/ohmyzsh
#ln -sfr ~/zsh-quickstart-kit/zsh/.zshrc ~/.zshrc
#ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_functions ~/.zsh_functions
#ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_aliases ~/.zsh_aliases
#ln -sfr ~/zsh-quickstart-kit/zsh/.zgen-setup ~/.zgen-setup
#ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_completions ~/.zsh-completions
mkdir -p ~/.zshrc.d
echo "setopt PROMPT_SUBST" >> ~/.zshrc
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zshrc ${DEST}/.zshrc
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zsh_functions ${DEST}/.zsh_functions
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zsh_aliases ${DEST}/.zsh_aliases
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup ${DEST}/.zgen-setup
#ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zsh_completions ${DEST}/.zsh-completions
mkdir -p ${DEST}/.zshrc.d
echo "setopt PROMPT_SUBST" >> ${DEST}/.zshrc
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> ~/.zshrc.d/008_nvim.zsh
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ~/.zshrc.d/008_nvim.zsh
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> ${DEST}/.zshrc.d/008_nvim.zsh
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ${DEST}/.zshrc.d/008_nvim.zsh
touch /var/tmp/nvim_python.log
# Fix for using urls on the commandline
cat >> ~/.zshrc.d/005_url-quote-magic.zsh <<EOF
cat >> ${DEST}/.zshrc.d/005_url-quote-magic.zsh <<EOF
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
@ -60,21 +64,21 @@ zstyle -e :urlglobber url-other-schema \
EOF
# fix path error in .zshrc
#sed -i 's|pushd $(dirname "${HOME}/$(readlink ~/.zshrc)")|pushd $(dirname "$(readlink ~/.zshrc)")|' ~/zsh-quickstart-kit/zsh/.zshrc
#sed -i 's|pushd $(dirname "${HOME}/$(readlink ${DEST}/.zshrc)")|pushd $(dirname "$(readlink ${DEST}/.zshrc)")|' ${DEST}/zsh-quickstart-kit/zsh/.zshrc
# debians locate db locate
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc
echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > ~/.zshrc.d/005-locatedb.zsh
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ${DEST}/.zshrc
echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > ${DEST}/.zshrc.d/005-locatedb.zsh
# add plugins to the load-starter-plugin-list() function in ~/.zgen-setup ~/zsh-quickstart-kit/zsh/.zgen-setup
# add plugins to the load-starter-plugin-list() function in ${DEST}/.zgen-setup ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
# FIXED: create a file named .zgen-local-plugins and add your zgen load commands there.
# Don't forget to run `zgen save` at the end of your .zgen-local-plugins file.
# Warning: .zgen-local-plugins REPLACES the starter list setup, it doesn't add to it.
#sed -i -e "s|zgen load srijanshetty/docker-zsh|# zgen load srijanshetty/docker-zsh|" ~/zsh-quickstart-kit/zsh/.zgen-setup
#sed -i '/\# zgen load srijanshetty\/docker-zsh/a\ \ zgen load oh-my-zsh plugins\/docker\n\ \ zgen load oh-my-zsh plugins\/docker-compose' ~/zsh-quickstart-kit/zsh/.zgen-setup
#sed -i -e "s|zgen load srijanshetty/docker-zsh|# zgen load srijanshetty/docker-zsh|" ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
#sed -i '/\# zgen load srijanshetty\/docker-zsh/a\ \ zgen load oh-my-zsh plugins\/docker\n\ \ zgen load oh-my-zsh plugins\/docker-compose' ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup
# The contents of the starter plugin function with changes above, pulling from upstream git with now not squash local changes.
cat > ~/.zgen-local-plugins << 'EOF'
cat > ${DEST}/.zgen-local-plugins << 'EOF'
echo "creating a zgen save"
ZGEN_LOADED=()
ZGEN_COMPLETIONS=()
@ -210,43 +214,42 @@ cat > ~/.zgen-local-plugins << 'EOF'
EOF
# example .d file use unset to prevent update
#echo '# Use unset 'QUICKSTART_KIT_REFRESH_IN_DAYS' to disable.' > ~/.zshrc.d/001-quickstart_refresh.zsh
#echo 'QUICKSTART_KIT_REFRESH_IN_DAYS=30' >> ~/.zshrc.d/001-quickstart_refresh.zsh
echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' > ~/.zshrc.d/001_zgen-refresh.zsh
#echo '# Use unset 'QUICKSTART_KIT_REFRESH_IN_DAYS' to disable.' > ${DEST}/.zshrc.d/001-quickstart_refresh.zsh
#echo 'QUICKSTART_KIT_REFRESH_IN_DAYS=30' >> ${DEST}/.zshrc.d/001-quickstart_refresh.zsh
echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' > ${DEST}/.zshrc.d/001_zgen-refresh.zsh
apt install -y fonts-powerline powerline
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ${DEST}/.zshrc
# Use powerline-daemon to speedup the prompt.
echo 'powerline-daemon -q' > ~/.zshrc.d/006_powerline-daemon.zsh
echo 'powerline-daemon -q' > ${DEST}/.zshrc.d/006_powerline-daemon.zsh
sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
# set theme for zsh
cat > ~/.zshrc.d/002_theme.zsh << 'EOF'
cat > ${DEST}/.zshrc.d/002_theme.zsh << 'EOF'
# https://zshthem.es/browse-zsh-themes/
ZSH_THEME="agnoster" # powerline based theme
#ZSH_THEME="3den"
#ZSH_THEME="Pure"
EOF
cat > ~/.zshrc.d/001_vi-mode.sh << 'EOF'
cat > ${DEST}/.zshrc.d/001_vi-mode.sh << 'EOF'
# Set vi mode
bindkey -v
bindkey '^R' history-incremental-search-backward
EOF
#git clone https://github.com/bhilburn/powerlevel9k.git ~/.zgen/robbyrussell/oh-my-zsh-master/themes/powerlevel9k
#git clone https://github.com/bhilburn/powerlevel9k.git ${DEST}/.zgen/robbyrussell/oh-my-zsh-master/themes/powerlevel9k
## add a separate zsh aliases directory
#echo > ~/.zshrc << 'EOF'
#echo > ${DEST}/.zshrc << 'EOF'
## Make it easy to append your own aliases
## loading all files from .zsh_aliases.d directory
#mkdir -p ~/.zsh_aliases.d
#if [ -n "$(ls ~/.zsh_aliases.d)" ]; then
# for dotfile in ~/.zsh_aliases.d/*
## loading all files from ${ALIAS_DIR} directory
#mkdir -p ${DEST}/${ALIAS_DIR}
#if [ -n "$(ls ${DEST}/${ALIAS_DIR})" ]; then
# for dotfile in ${DEST}/${ALIAS_DIR}/*
# do
# if [ -r "${dotfile}" ]; then
# source "${dotfile}"
@ -258,8 +261,8 @@ EOF
# alias python version
# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ~/.zsh_aliases.d/002_sudo.zsh
echo 'alias sudo="sudo "' >> ~/.zsh_aliases.d/002_sudo.zsh
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/${ALIAS_DIR}/002_sudo.zsh
echo 'alias sudo="sudo "' >> ${DEST}/${ALIAS_DIR}/002_sudo.zsh

View File

@ -1,22 +1,23 @@
#!/usr/bin/env bash
DEST=${1:-/etc/skel}
mkdir -p ${DEST}/.zsh_aliases.d
ALIAS_DIR=".zshrc.d"
mkdir -p ${DEST}/${ALIAS_DIR}
ALIAS_FILE=${DEST}/.zsh_aliases
cat >> ${ALIAS_FILE} <<'EOF'
# Enable .zsh_aliases.d to keep aliases separate from env variables
if [ -d ~/.zsh_aliases.d ]; then
for f (~/.zsh_aliases.d/**/*(N.)) . $f
# Enable ${ALIAS_DIR} to keep aliases separate from env variables
if [ -d ~/${ALIAS_DIR} ]; then
for f (~/${ALIAS_DIR}/**/*(N.)) . $f
fi
EOF
# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/.zsh_aliases.d/002_sudo.zsh
echo 'alias sudo="sudo "' >> ${DEST}/.zsh_aliases.d/002_sudo.zsh
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/${ALIAS_DIR}/002_sudo.zsh
echo 'alias sudo="sudo "' >> ${DEST}/${ALIAS_DIR}/002_sudo.zsh
cat > ${DEST}/.zsh_aliases.d/003_py-aliases.zsh << 'EOF'
cat > ${DEST}/${ALIAS_DIR}/003_py-aliases.zsh << 'EOF'
_py_version() {
PY_VERSIONS=(2 3)
@ -54,7 +55,7 @@ alias jupyter="_py_version"
EOF
cat > ${DEST}/.zsh_aliases.d/003_transfer.zsh <<'EOF'
cat > ${DEST}/${ALIAS_DIR}/003_transfer.zsh <<'EOF'
#
# Defines transfer alias and provides easy command line file and folder sharing.
#
@ -124,7 +125,7 @@ transfer() {
EOF
ALIAS_FILE=${DEST}/.zsh_aliases.d/003_local.sh
ALIAS_FILE=${DEST}/${ALIAS_DIR}/003_local.sh
cat > ${ALIAS_FILE} <<'EOF'
alias locate='locate --existing --follow --basename --ignore-case'
alias wget="wget --content-disposition -c"
@ -140,7 +141,7 @@ alias tsleech='torsocks leech'
alias tswget='torsocks wget'
EOF
ALIAS_FILE=${DEST}/.zsh_aliases.d/003_lsd.sh
ALIAS_FILE=${DEST}/${ALIAS_DIR}/003_lsd.sh
cat > ${ALIAS_FILE} <<'EOF'
if [ -x /usr/bin/lsd ]; then
alias lsd="/usr/bin/lsd"

View File

@ -26,6 +26,7 @@ chsh -s "$(which zsh)" "${USER}"
#DEST=$HOME
DEST=${1:-/etc/skel}
HOME=${DEST}
ALIAS_DIR=".zshrc.d"
apt install -y git
# Install zgen plugin manager and zsh quicktart to get a default setup for zsh
@ -240,10 +241,10 @@ EOF
## add a separate zsh aliases directory
#echo > ${DEST}/.zshrc << 'EOF'
## Make it easy to append your own aliases
## loading all files from .zsh_aliases.d directory
#mkdir -p ~/.zsh_aliases.d
#if [ -n "$(ls ~/.zsh_aliases.d)" ]; then
# for dotfile in ~/.zsh_aliases.d/*
## loading all files from ${ALIAS_DIR} directory
#mkdir -p ~/${ALIAS_DIR}
#if [ -n "$(ls ~/${ALIAS_DIR})" ]; then
# for dotfile in ~/${ALIAS_DIR}/*
# do
# if [ -r "${dotfile}" ]; then
# source "${dotfile}"
@ -253,13 +254,13 @@ EOF
#EOF
# alias python version
mkdir -p ${DEST}/.zsh_aliases.d
mkdir -p ${DEST}/${ALIAS_DIR}
# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/.zsh_aliases.d/002_sudo.zsh
echo 'alias sudo="sudo "' >> ${DEST}/.zsh_aliases.d/002_sudo.zsh
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/${ALIAS_DIR}/002_sudo.zsh
echo 'alias sudo="sudo "' >> ${DEST}/${ALIAS_DIR}/002_sudo.zsh
cat > ${DEST}/.zsh_aliases.d/003-py_aliases.zsh << 'EOF'
cat > ${DEST}/${ALIAS_DIR}/003-py_aliases.zsh << 'EOF'
_py_version() {
PY_VERSIONS=(2 3)
@ -296,7 +297,7 @@ alias ipython="_py_version"
alias jupyter="_py_version"
EOF
cat > ${DEST}/.zsh_aliases.d/003_transfer.zsh <<'EOF'
cat > ${DEST}/${ALIAS_DIR}/003_transfer.zsh <<'EOF'
#
# Defines transfer alias and provides easy command line file and folder sharing.
#