aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2019-06-07 17:38:56 -0400
committertdro <tdro@users.noreply.github.com>2019-06-07 17:38:56 -0400
commitca36664b2d49854904925fe1707b627ca4446ec0 (patch)
treed0a7a526cb4dee69b67d2964901aefe3d0ddad0b /.bashrc
parent2225a74e70ca9f843e8da40fa6825bc0ad601818 (diff)
downloaddotfiles-ca36664b2d49854904925fe1707b627ca4446ec0.tar.gz
dotfiles-ca36664b2d49854904925fe1707b627ca4446ec0.tar.bz2
dotfiles-ca36664b2d49854904925fe1707b627ca4446ec0.zip
.bashrc: path update, add fuzzy directory and remove duplicate history function
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc16
1 files changed, 14 insertions, 2 deletions
diff --git a/.bashrc b/.bashrc
index 67edcdb..249fb72 100644
--- a/.bashrc
+++ b/.bashrc
@@ -147,7 +147,19 @@ export PATH="$PATH:$HOME/.node_modules/bin"
export PATH="$PATH:$HOME/.local/share/bin"
# add npm prefix
-export npm_config_prefix=~/.node_modules
+export npm_config_prefix=$HOME/.node_modules
# source fzm
-source $HOME/.config/ranger/fzf-marks/fzf-marks.plugin.bash
+source "$HOME/.config/ranger/fzf-marks/fzf-marks.plugin.bash"
+
+# change directory with fzf
+fd() {
+ DIR=$(ls -t -A1 --color=never | fzf-tmux) \
+ && cd "$DIR" || exit
+}
+
+# remove bash history duplicates
+history-remove-duplicates() {
+ awk '!visited[$0]++' "$HOME/.bash_history" > /tmp/.bash_history.tmp;
+ mv -f /tmp/.bash_history.tmp "$HOME/.bash_history"
+}