Skip to content

Commit

Permalink
kamp-buffers: fix unbound variable with -s opt
Browse files Browse the repository at this point in the history
kamp-buffers -s session should not trigger KAKOUNE_SESSION: unbound
variable
  • Loading branch information
vbauerster committed Nov 15, 2024
1 parent 25b0332 commit bf3a095
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/kamp-buffers
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ usage() {
exit 2
}

session="$KAKOUNE_SESSION"
while getopts 's:h' OPTION; do
case $OPTION in
s)
@@ -26,6 +25,8 @@ while getopts 's:h' OPTION; do
done
shift $(($OPTIND - 1))

: ${session:=$KAKOUNE_SESSION}

exec_cmd=
if kamp ctx -c >/dev/null 2>/dev/null; then
exec_cmd="kamp -s $session send buffer {}"

0 comments on commit bf3a095

Please sign in to comment.