summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-10 15:40:48 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-10 15:40:48 +0400
commit53746f5a3e10bc5e1603daee0e75f13531568457 (patch)
tree0b8246228a15bfe15b3db0692011c7de7d3b5947 /config
parent6f73838b912b00f3ad620a3cd73b8506d018c6e8 (diff)
functionrc for shells added
Diffstat (limited to 'config')
-rw-r--r--config/bash/bashrc4
-rw-r--r--config/shell/functionrc3
-rw-r--r--config/shell/profile7
-rwxr-xr-xconfig/zsh/zshrc4
4 files changed, 13 insertions, 5 deletions
diff --git a/config/bash/bashrc b/config/bash/bashrc
index 2692a4b..ca2435d 100644
--- a/config/bash/bashrc
+++ b/config/bash/bashrc
@@ -12,3 +12,7 @@ PS1='\e[01;31m$(code=${?##0};echo ${code:+[${code}]" "})\e[00m\u@\H \w % '
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ];then
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
fi
+
+if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/functionrc" ];then
+ source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/functionrc"
+fi
diff --git a/config/shell/functionrc b/config/shell/functionrc
new file mode 100644
index 0000000..7be1e1e
--- /dev/null
+++ b/config/shell/functionrc
@@ -0,0 +1,3 @@
+lfcd () {
+ cd "$(command lf -print-last-dir "$@")"
+}
diff --git a/config/shell/profile b/config/shell/profile
index 640b2f4..c9de99a 100644
--- a/config/shell/profile
+++ b/config/shell/profile
@@ -18,8 +18,5 @@ export XDG_BIN_DIR="$HOME/.local/bin"
export MAKEFLAGS="-j8" # Reduce compile times
-lfcd () {
- cd "$(command lf -print-last-dir "$@")"
-}
-
-[ mkdir -p XDG_BIN_DIR ] && PATH="${XDG_BIN_DIR}":$PATH
+mkdir -p "${XDG_BIN_DIR}"
+PATH="${XDG_BIN_DIR}":$PATH
diff --git a/config/zsh/zshrc b/config/zsh/zshrc
index 4821fef..e9ee318 100755
--- a/config/zsh/zshrc
+++ b/config/zsh/zshrc
@@ -70,3 +70,7 @@ bindkey -s '^f' '^ucd "$(dirname "$(fzf --reverse)")"\n'
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ];then
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
fi
+
+if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/functionrc" ];then
+ source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/functionrc"
+fi