Shell scripting

Bruno Heridet edited this page Oct 30, 2018 · 2 revisions

How to get the process id of the current kakoune client?

if you run this in the kakoune command line:

echo %sh{ echo $$ }

You'll get a random number, corresponding to the PID of the temp subshell used to run the command. You need the PID of the parent, which translates to :

echo %sh{ echo $PPID }

Why should printf be favored over echo?

https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.