z_mirror/dotfiles
git clone https://git.raiguard.me/z_mirror/dotfiles
80db373
trunk
1#!/bin/sh 2# Invokes NNN to pick a file and opens the chosen file in kakoune. 3 4start_location =" $ 1 " kak_client =" $ 2 " kak_session =" $ 3 " 5if ! [ -f" $ start_location " ];then 6start_location =" $( dirname '$start_location' ) " 7fi 8 9tmp =" ${ TMPDIR :-/tmp} /nnn_pick_ $ $" 10nnn -p " $ tmp " " $ start_location " 11filename =$( cat " $ tmp " | sed "s/'/\\'/g" ) 12rm " $ tmp " 13 14if [ -n" $ filename " ];then 15echo "evaluate-commands -client ' $ kak_client ' %{edit \" $ filename \"}" | kak -p " $ kak_session " 16fi