diff options
| author | Mike Vink <mike.vink@stater.nl> | 2023-05-30 17:45:49 +0000 |
|---|---|---|
| committer | Mike Vink <mike.vink@stater.nl> | 2023-05-30 17:45:49 +0000 |
| commit | 7f8f04956ab410a33168fd6ac827e5d362d9a82b (patch) | |
| tree | 8cca7270cdc7cceafe11030c5ab4b9b2038fbd6b /shell-scripts | |
| parent | cf285a41b214137f3651c0aa093fffad6805301b (diff) | |
update editor config
Diffstat (limited to 'shell-scripts')
| -rwxr-xr-x | shell-scripts/kakup | 9 |
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" |
