From ddaeb1e9354cd108513ea430fb1daa5745c334ff Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 26 Jun 2019 23:46:41 +0200 Subject: [PATCH] Add join_by as a globally available function Signed-off-by: Knut Ahlers --- .zsh/config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.zsh/config.sh b/.zsh/config.sh index 9b227fc..8edac0c 100644 --- a/.zsh/config.sh +++ b/.zsh/config.sh @@ -8,6 +8,15 @@ source $HOME/.zsh/go-binaries.sh ## Local installed pip package binaries export PATH=$PATH:$HOME/.local/bin +## Make join_by function globally available +function join_by() { + local d=$1 + shift + echo -n "$1" + shift + printf "%s" "${@/#/$d}" +} + ## Some default settings export EDITOR=/usr/bin/nvim export BROWSER=/bin/echo # enable usage of `hub browse` on remote machines