]> Sergey Matveev's repositories - mmc.git/blob - cmd/dlpane
Quick file download
[mmc.git] / cmd / dlpane
1 #!/bin/sh -e
2
3 fileId=$(tmux show-buffer |
4     sed -n 's/^.*\[FILE\] \(.*\) (\(.*\))$/\1 \2/p' |
5     fzf |
6     cut -d" " -f1)
7 [ -n "$fileId" ]
8 tmux delete-buffer
9 cmd="$(dirname "$(realpath -- "$0")")"
10 state="$PWD"
11 cd /tmp
12 $cmd/dl "$state" $fileId
13 echo extracted
14 read foo