SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ctrl-h m will bring up documentation on Shell-script mode. Notice the entry for Ctrl-c >
Code:
Shell-script mode defined in `sh-script.el':
Major mode for editing shell scripts.
This mode works for many shells, since they all have roughly the same syntax,
as far as commands, arguments, variables, pipes, comments etc. are concerned.
Unless the file's magic number indicates the shell, your usual shell is
assumed. Since filenames rarely give a clue, they are not further analyzed.
This mode adapts to the variations between shells (see `sh-set-shell') by
means of an inheritance based feature lookup (see `sh-feature'). This
mechanism applies to all variables (including skeletons) that pertain to
shell-specific features.
The default style of this mode is that of Rosenblatt's Korn shell book.
The syntax of the statements varies with the shell being used. The
following commands are available, based on the current shell's syntax:
C-c C-c case statement
C-c C-f for loop
C-c ( function definition
C-c TAB if statement
C-c C-l indexed loop from 1 to n
C-c C-o while getopts loop
C-c C-r repeat loop
C-c C-s select loop
C-c C-u until loop
C-c C-w while loop
For sh and rc shells indentation commands are:
C-c ? Show the variable controlling this line's indentation.
C-c = Set then variable controlling this line's indentation.
C-c < Change the indentation variable so this line
would indent to the way it currently is.
C-c > Set the indentation variables so the
buffer indents as it currently is indented.
DEL Delete backward one position, even if it was a tab.
M-e Go to end of successive commands.
M-a Go to beginning of successive commands.
C-c : Set this buffer's shell, and maybe its magic number.
C-M-x Have optional header and region be executed in a subshell.
`sh-electric-here-document-mode' controls whether insertion of two
unquoted < insert a here document.
If you generally program a shell different from your login shell you can
set `sh-shell-file' accordingly. If your shell's file name doesn't correctly
indicate what shell it is use `sh-alias-alist' to translate.
If your shell gives error messages with line numbers, you can use C-c C-x
with your script for an edit-interpret-debug cycle.
In addition to any hooks its parent mode `prog-mode' might have run,
this mode runs the hook `sh-mode-hook', as the final step
during initialization.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by Richard Cranium
There were various code changes in the sh-script elisp file.
I thought about diffing the two packages version (between 14.1 and current) but didn't yet took the time to do it. It's not a blocking problem for now so I was just asking if a "quick info" was available, eventually I might just dig into the package diff...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.