Skip to content

Commit

Permalink
feat(zsh): allow navigate to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
spywhere committed Oct 25, 2023
1 parent e503265 commit b44b925
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion configs/zsh/functions
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ work() {
fi
fi
query=""
if test -n "$@"; then
if test "$@" = "-"; then
cd "$WORKSPACE" || return
return
elif test -n "$@"; then
query="-q $*"
fi
cd "$(find "$WORKSPACE" -mindepth 1 -maxdepth 1 -type d | fzf --height=20 '--preview=git -C {} branch' '--bind=ctrl-/:toggle-preview' "$query")" || return
Expand Down

0 comments on commit b44b925

Please sign in to comment.