summaryrefslogtreecommitdiffstats
path: root/.config/zsh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/zsh/alias.zsh14
1 files changed, 14 insertions, 0 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index 41b090c..bcd4cf8 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -69,6 +69,20 @@ alias \
dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME' \
confgit='git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/' \
git-pull-all='git branch -r | sed "1d;s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; git checkout "${remote#origin/}"; git pull; done'
+b() {
+ oldpath="$(pwd)"
+ cd $HOME/.config/nnn/bookmarks
+ dir=$(fzf)
+ if [ -z "$dir" ]; then
+ cd "$oldpath"
+ return
+ fi
+ if ! cd "$dir"; then
+ cd "$oldpath"
+ return
+ fi
+ nnn
+}
bssh() {
user='rbousset'
host='bastion'