Usage of GNU Emacs by non-programmers ...... How to exit from the shell mode 12th set

Source: Internet
Author: User

Why should I quit? Why should I quit? Why can't I exit with exit? Why... yes, shell does exit with exit, but, however, what we're talking about is not that cheap...

 

In our daily work environment, there is such a characteristic. We will first log on to a central machine, and then log on to our target machine from here. Why? Because of the password and the annoying password. In this environment, a password is required only when you log on to the central machine. Then, no password is required. This is a very important thing. In particular, when dealing with a large number of machines and a large number of people, it is a pleasure not to remember those endless passwords.

 

This method also brings trouble, that is, how to exit elegantly from the nested shell after the work is finished?

 

Of course, you can ignore him and cut off the network directly so that those login shells can be hung there, but this is very simple and rude. Behave elegantly. So we have to go back and forth again and again. Return one set of machines, and then another set of machines ...... One day you will feel intolerable.

Many people have such a habit: At least it is written in the book-when you think you can't endure it, you will think of writing a script... The problem is, can this problem be solved through a script? At least I don't see any hope. I don't doubt the ability to write scripts, but I don't know where I can put the scripts? On which machine should the script be placed? Is it a central machine? Target machine? My own machine? Or every machine? You need to know that there are countless target machines in the hands of different employees... Maintenance is impossible.

Therefore, I chose to start with the shell mode of Emacs. On my own machine, I wrote such a function,

This function will automatically help me exit elegantly from the shell session. This command is bound to the C-c e key combination. When I need to exit a multi-layer nested shell session, just add a prefix, such as C-U 3 c-c E or a simpler C-3 c-c e, you can exit a layer-3 nested shell session at a time.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.