aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tmux/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'tmux/.local/bin')
-rwxr-xr-xtmux/.local/bin/mksession (renamed from tmux/.local/bin/tmux-projectr)12
1 files changed, 6 insertions, 6 deletions
diff --git a/tmux/.local/bin/tmux-projectr b/tmux/.local/bin/mksession
index 4f0fc8a..8ca6f7a 100755
--- a/tmux/.local/bin/tmux-projectr
+++ b/tmux/.local/bin/mksession
@@ -1,11 +1,11 @@
#!/bin/sh
-if [ "$#" -eq 0 ]; then
- set -- "$(
- find ~/.local/src/* -prune ! -path "$(pwd)" -printf "%T+\t%p\n" | sort | cut -f2 |
- fzf --tmux --tac --exit-0 -d/ --with-nth=-1 --preview='lesspipe.sh {}'
- )"
- test -n "$1" || exit 0
+if [ "$1" = '-' ]; then
+ session="$(cat -)"
+ if [ -z "$session" ]; then
+ exit 0
+ fi
+ set -- "$session"
fi
if [ ! -d "$1" ]; then