ACHIEVING IT IN LINUX
Add to your prompt an identifier (for example add in the bottom of your .bashrc):
promptCount=0
PROMPT_COMMAND=promptCount=$((promptCount+1))
PS1="/\$promptCount\\ $PS1"
Now use the search funcionality of the terminal, perhaps
Ctrl + Shift + F, for the prompt line
you wish.
Making it more handy:
Install xdotool
(command-line X11 automation tool)
Create a function that will press the exact keys that you would press
when finding the N
prompt line through the searching functionality
(add in the bottom of your .bashrc):
gp () { xdotool key ctrl+shift+F; xdotool type /$1\\ ; xdotool key KP_Enter;sleep 0,2; xdotool key Alt+F4; }
(At least these are the exact keys that I would press to do it in
Manjaro Xfce)
Now:
There is a little frame not shown in the gif where the little search window appears, the identifier for N
is written, key Enter is pressed and then the windows is closed. You can try to make this faster changing the value of the argument given to the sleep command. In my case it works well until 0,11 or so.