misc: dfm tweaks, documentation, code style

This commit is contained in:
2023-04-13 22:23:22 +03:00
parent dcd042262f
commit 5f5f79d270
5 changed files with 30 additions and 14 deletions

View File

@@ -66,17 +66,23 @@ function silent
"$@" >&/dev/null
}
# Remove directory from the PATH variable
# usage: path_remove ~/.local/bin
function path_remove
{
PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$1\"" | sed 's/:$//')
}
# Append directory to the PATH
# usage: path_append ~/.local/bin
function path_append
{
path_remove "$1"
PATH="${PATH:+"$PATH:"}$1"
}
# Prepend directory to the PATH
# usage: path_prepend ~/.local/bin
function path_prepend
{
path_remove "$1"
@@ -108,4 +114,3 @@ function x-default-antigen-bundles
hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin
}