Jadam
Jadam

Reputation: 1775

Can't pause nano in terminal

Trying to learn how to use terminal here.

So I can use ctrl-z to pause other processes, but for some reason it does not work in nano. Why that would be?

Upvotes: 13

Views: 5032

Answers (5)

Quolonel Questions
Quolonel Questions

Reputation: 6978

In newer versions of nano, the -z and --suspendable options have been removed. Suspension is now enabled by default, but only via CTRL+T, CTRL+Z. To get back the familiar CTRL+Z behaviour, the following may be added to the .nanorc file in the home directory, to re-enable this feature for that user: bind ^Z suspend main. This can be achieved using the following command.

>>~/.nanorc echo 'bind ^Z suspend main'

The change can also be applied for all users by editing /etc/nanorc instead.

Upvotes: 7

Vijay Krishna
Vijay Krishna

Reputation: 1

if ctrl doesn't work then try using ctrl + x.

Upvotes: -3

piokuc
piokuc

Reputation: 26194

This can be easily done by masking the SIGTSTP signal:

#include <signal.h>

signal(SIGTSTP,SIG_IGN); /* disable ctrl-Z */

That's what nano is doing, apparently.

If you want nano to allow you for suspending it with ctrl-z you can put the line:

set suspend

into your $HOME/.nanorc.

Upvotes: 5

Jessica Guerard
Jessica Guerard

Reputation: 384

If you enter nano -z it works as well.

Upvotes: 4

E. Sundin
E. Sundin

Reputation: 4180

I was looking for a solution to this and the accepted answer didn't help me.

Setting set suspend in ~/.nanorc works!

http://www.nano-editor.org/dist/v2.2/nanorc.5.html

Upvotes: 8

Related Questions