diff options
author | tdro <tdro@users.noreply.github.com> | 2019-06-07 17:38:56 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2019-06-07 17:38:56 -0400 |
commit | ca36664b2d49854904925fe1707b627ca4446ec0 (patch) | |
tree | d0a7a526cb4dee69b67d2964901aefe3d0ddad0b /.bashrc | |
parent | 2225a74e70ca9f843e8da40fa6825bc0ad601818 (diff) | |
download | dotfiles-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-- | .bashrc | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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" +} |