summaryrefslogtreecommitdiff
path: root/shell-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'shell-scripts')
-rwxr-xr-xshell-scripts/kakup9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell-scripts/kakup b/shell-scripts/kakup
index c015d95..bb4a051 100755
--- a/shell-scripts/kakup
+++ b/shell-scripts/kakup
@@ -20,10 +20,15 @@ session-or-client() {
tmux new-window -n $client kak -c $name
fi
popd
- } </dev/stdin >debug 2>&1
+ } </dev/stdin >/dev/null 2>&1
echo $client
}
-client="$(fd -d1 "." -t d $HOME $HOME/projects | fzf -1 | session-or-client)"
+case "${@}" in
+ "") client="$(pwd | session-or-client)" ;;
+ .) client="$(fd -d1 "." -t d $HOME $HOME/projects | fzf -1 | session-or-client)" ;;
+ *) client="$(echo "${@}" | session-or-client)" ;;
+esac
+
echo "client: $client"
[[ $client ]] && tmux attach -t "$client"