Consolidate rgenv and update aliases files
This commit is contained in:
parent
5d7c4005b8
commit
5622ac654a
@ -110,7 +110,6 @@ alias zdotdir='cd -- ${ZDOTDIR:-${HOME}/.zsh}'
|
|||||||
alias zshaliases='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/00-aliases.zsh'
|
alias zshaliases='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/00-aliases.zsh'
|
||||||
alias zbindings='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/keybindings.zsh'
|
alias zbindings='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/keybindings.zsh'
|
||||||
alias zconf='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d'
|
alias zconf='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d'
|
||||||
alias zfuncs='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/functions'
|
|
||||||
alias zhist='${EDITOR} -- ${HISTFILE}'
|
alias zhist='${EDITOR} -- ${HISTFILE}'
|
||||||
alias zmod='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/modules'
|
alias zmod='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/modules'
|
||||||
alias zpath='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/path.zsh'
|
alias zpath='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/path.zsh'
|
||||||
@ -128,14 +127,6 @@ lsbin() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
rgenv () {
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
env | rg --ignore-case $1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
stow-config () {
|
stow-config () {
|
||||||
local dotfile_dir="${HOME}/Dotfiles"
|
local dotfile_dir="${HOME}/Dotfiles"
|
||||||
|
|
||||||
|
@ -107,42 +107,23 @@ alias myip='curl ifconfig.me'
|
|||||||
alias restartfans='sudo systemctl restart fancontrol.service'
|
alias restartfans='sudo systemctl restart fancontrol.service'
|
||||||
|
|
||||||
# zsh
|
# zsh
|
||||||
alias zdotdir='cd -- ${ZDOTDIR:-${HOME}/.zsh}'
|
alias zdotdir='cd -- "$ZDOTDIR"'
|
||||||
alias zshaliases='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/00-aliases.zsh'
|
alias zshaliases='${EDITOR} -- "$XDG_CONFIG_HOME"/zsh-macos/00-aliases.zsh'
|
||||||
alias zbindings='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/keybindings.zsh'
|
alias zbindings='${EDITOR} -- "$XDG_CONFIG_HOME"/zsh/00-keybindings.zsh'
|
||||||
alias zconf='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d'
|
alias zconf='cd -- $ZDOTDIR'
|
||||||
alias zfuncs='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/functions'
|
alias zhist='${EDITOR} -- "${HISTFILE}"'
|
||||||
alias zhist='${EDITOR} -- ${HISTFILE}'
|
alias zpath='${EDITOR} -- "$XDG_CONFIG_HOME"/zsh-macos/path.zsh'
|
||||||
alias zmod='cd -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/modules'
|
alias zprompt='${EDITOR} -- "$ZDOTDIR"/prompt.zsh'
|
||||||
alias zpath='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/path.zsh'
|
alias zshrc='${EDITOR} -- "$ZDOTDIR"/.zshrc'
|
||||||
alias zprompt='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/conf.d/prompt.zsh'
|
alias zshenv='${EDITOR} -- "$ZDOTDIR"/.zshenv'
|
||||||
alias zshrc='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/.zshrc'
|
|
||||||
alias zshrefresh='source -- ${ZDOTDIR:-${HOME}/.zsh}/.zshrc'
|
|
||||||
alias zshenv='${EDITOR} -- ${ZDOTDIR:-${HOME}/.zsh}/.zshenv'
|
|
||||||
|
|
||||||
# ---------- Parameterized Aliases ----------
|
# ---------- Parameterized Aliases ----------
|
||||||
lsbin() {
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
pacman -Qql $1 | rg bin
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rgenv () {
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
env | rg --ignore-case $1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
stow-config () {
|
stow-config () {
|
||||||
local dotfile_dir="${HOME}/Dotfiles"
|
local dotfile_dir="${HOME}/Dotfiles"
|
||||||
|
|
||||||
for conf in "${@}"; do
|
for conf in "${@}"; do
|
||||||
if [[ -n ${conf} ]]; then
|
if [[ -n ${conf} ]]; then
|
||||||
mkdir --parents "${dotfile_dir}/${conf}/.config"
|
mkdir -p "${dotfile_dir}/${conf}/.config"
|
||||||
mv "${XDG_CONFIG_HOME}/${conf}" "${dotfile_dir}/${conf}/.config"
|
mv "${XDG_CONFIG_HOME}/${conf}" "${dotfile_dir}/${conf}/.config"
|
||||||
cd "${dotfile_dir}" && stow "${conf}"
|
cd "${dotfile_dir}" && stow "${conf}"
|
||||||
cd -
|
cd -
|
||||||
|
@ -61,6 +61,14 @@ mkcd() {
|
|||||||
|
|
||||||
autoload -Uz mkcd
|
autoload -Uz mkcd
|
||||||
|
|
||||||
|
rgenv () {
|
||||||
|
if [[ -n $1 ]]; then
|
||||||
|
env | rg --ignore-case $1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Detect OS to autoload uncommon config files
|
# Detect OS to autoload uncommon config files
|
||||||
if [[ "$(uname)" =~ "Darwin" ]]; then
|
if [[ "$(uname)" =~ "Darwin" ]]; then
|
||||||
for dotfile in "$XDG_CONFIG_HOME"/zsh-macos/*(.); do
|
for dotfile in "$XDG_CONFIG_HOME"/zsh-macos/*(.); do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user