use -shell-params in rc files

This commit is contained in:
Maxime Coste 2012-09-09 17:14:08 +02:00
parent ae76b7dddc
commit a37b14785f
3 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
def -env-params \ def -shell-params \
-shell-completion %{ global -c ${kak_param0} } \ -shell-completion %{ global -c $1 } \
tag %{ %sh{ tag %{ %sh{
if [[ ${kak_param0} != "" ]]; then if [[ $1 != "" ]]; then
tagname=${kak_param0} tagname=$1
else else
tagname=${kak_selection} tagname=${kak_selection}
fi fi

View File

@ -1,6 +1,6 @@
def -env-params grep %{ echo grep in progress, please wait...; %sh{ def -shell-params grep %{ echo grep in progress, please wait...; %sh{
output=$(mktemp -t kak-grep.XXXXXXXX) output=$(mktemp -t kak-grep.XXXXXXXX)
grep -PHn $kak_param0 $kak_param1 $kak_param2 $kak_param3 $kak_param4 >& ${output} < /dev/null & grep -PHn $@ >& ${output} < /dev/null &
echo "echo echo "echo
try %{ db *grep* } catch %{ } try %{ db *grep* } catch %{ }
edit -fifo ${output} *grep* edit -fifo ${output} *grep*

View File

@ -1,6 +1,6 @@
def -env-params make %{ echo make in progress, please wait...; %sh{ def -shell-params make %{ echo make in progress, please wait...; %sh{
output=$(mktemp -t kak-make.XXXXXXXX) output=$(mktemp -t kak-make.XXXXXXXX)
make $kak_param0 $kak_param1 $kak_param2 $kak_param3 $kak_param4 >& ${output} < /dev/null & make $@ >& ${output} < /dev/null &
echo "echo echo "echo
try %{ db *make* } catch %{ } try %{ db *make* } catch %{ }
edit -fifo ${output} *make* edit -fifo ${output} *make*