Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
C shell
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Improvements for interactive use === The second objective was that the C shell should be better for interactive use. It introduced numerous new features that made it easier, faster and more [[User-friendly|friendly]] to use by typing commands at a terminal. Users could get things done with a lot fewer keystrokes and it ran faster. The most significant of these new features were the history and editing mechanisms, aliases, directory stacks, tilde notation, cdpath, job control, and path hashing. These new features proved very popular, and many of them have since been copied by other Unix shells. ==== History ==== History allows users to recall previous commands and rerun them by typing only a few quick keystrokes. For example, typing two exclamation marks ("<code>!!</code>")<ref>Pronounced ''"bang, bang"''</ref> as a command causes the immediately preceding command to be run. Other short keystroke combinations, e.g., "<code>!$</code>" (meaning "the final argument of the previous command"), allow bits and pieces of previous commands to be pasted together and edited to form a new command. ==== Editing operators ==== Editing can be done not only on the text of a previous command, but also on variable substitutions. Operators range from simple string search/replace to parsing a pathname to extract a specific segment. ====Aliases==== Aliases allow the user to type the name of an alias and have the C shell expand it internally into whatever set of words the user has defined. For many simple situations, aliases run faster and are more convenient than scripts. ==== Directory stack ==== The directory [[Stack (data structure)|stack]] allows the user to [[pushd and popd|push or pop]] the [[current working directory]], making it easier to jump back and forth between different places in the filesystem. ==== Tilde notation ==== Tilde notation offers a shorthand way of specifying pathnames relative to the [[home directory]] using the "<code>~</code>" character. ==== Filename completion ==== The [[esc key|escape key]] can be used interactively to show possible completions of a filename at the end of the current command line. ==== Cdpath ==== Cdpath extends the notion of a [[PATH (variable)|search path]] to the <code>cd</code> (change directory) command: If the specified directory is not in the [[current directory]], csh will try to find it in the cdpath directories. ==== Job control ==== Well into the 1980s, most users only had simple character-mode terminals that precluded multiple windows, so they could only work on one task at a time. The C shell's job control allowed the user to suspend the current activity and create a new instance of the C shell, called a job, by typing <code>[[Control-Z|^Z]]</code>. The user could then switch back and forth between jobs using the <kbd>fg</kbd> command. The active job was said to be in the foreground. Other jobs were said to be either suspended (stopped) or running in the [[Background process|background]]. ==== Path hashing ==== Path hashing speeds up the C shell's search for executable files. Rather than performing a filesystem call in each path directory, one at a time, until it either finds the file or runs out of possibilities, the C shell consults an internal [[hash table]] built by scanning the path directories. That table can usually tell the C shell where to find the file (if it exists) without having to search and can be refreshed with the <code>rehash</code> command.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
C shell
(section)
Add topic