Tcsh

TENEX C Shell
Developer(s)Ken Greer, Paul Placeway, Christos Zoulas, et al.
Stable release
6.24.14[1] Edit this on Wikidata / 26 November 2024; 23 days ago (26 November 2024)
Repository
Written inC
Operating systemCross-platform
TypeUnix shell
License2002: BSD-3-Clause[2][3]
1991: BSD-4-Clause[4]
Websitewww.tcsh.org

tcsh (/ˌtˈsʃɛl/ “tee-see-shell”, /ˈtʃɛl/ “tee-shell”, or as “tee see ess aitch”, tcsh) is a Unix shell based on and backward compatible with the C shell (csh).

Shell

It is essentially the C shell with programmable command-line completion, command-line editing, and a few other features. Unlike the other common shells, functions cannot be defined in a tcsh script and the user must use aliases instead (as in csh). It is the native root shell for some BSD-based systems, including FreeBSD 13 and earlier. (FreeBSD 14 changed the default root shell to sh to match the default user shell[5] whereas OpenBSD uses the Korn shell ksh for both root and regular users.[6])

tcsh added filename and command completion and command line editing concepts borrowed from the TENEX operating system, which is the source of the “t”.[7] Because it only added functionality and did not change what was there, tcsh remained backward compatible[8] with the original C shell. Though it started as a side branch from the original csh source tree that Bill Joy had created, tcsh is now the main branch for ongoing development.

tcsh is very stable but new releases continue to appear roughly once a year, consisting mostly of minor bug fixes.[9]

On many systems, such as macOS and Red Hat Linux, csh is actually tcsh. Often one of the two files is either a hard link or a symbolic link to the other, so that either name refers to the same improved version of the C shell (although behavior may be altered depending on which name is used).

On Debian and some derivatives (including Ubuntu), there are two different packages: csh and tcsh. The former is based on the original BSD version of csh[10][11] and the latter is the improved tcsh.[12][13]

History

The “t” in tcsh comes from the “T” in TENEX, an operating system which inspired Ken Greer at Carnegie Mellon University, the author of tcsh, with its command-completion feature.[14] Greer began working on his code to implement Tenex-style file name completion in September 1975, finally merging it into the C shell in December 1981.[7] Mike Ellis at Fairchild A.I. Labs added command completion in September 1983.[7] On October 3, 1983, Greer posted source to the net.sources newsgroup.[7]

Significant features

  • Command history
    • The built-in history command displays the previously entered commands
    • Use of / at the command line to allow the user to select a command from the history to edit/execute
    • Invoking previous commands using command history
      • !! executes the previous command
      • !n executes the nth command that was previously executed
      • !-n executes the command that was executed n commands ago
      • !string executes the most recently executed command that starts with string
      • !?string executes the most recently executed command that contains string
    • Using history in new commands
      • !* - refers to all of the arguments from the previous command
      • !$ - refers to the last argument from the previous command
      • !^ - refers to the first argument from the previous command
      • !:n - refers to the nth argument from the previous command
      • !:m-n - refers to the mth through nth arguments from the previous command
      • !:n-$ - refers to the nth through the last argument from the previous command
  • Command line editing
  • Auto-completion of file names and variables as well as programmable completion at the command line
  • Alias argument selectors; the ability to define an alias to take arguments supplied to it and apply them to the commands that it refers to. Tcsh is the only shell that provides this feature (in lieu of functions).
    • \!# - argument selector for all arguments, including the alias/command itself; arguments need not be supplied.
    • \!* - argument selector for all arguments, excluding the alias/command; arguments need not be supplied.
    • \!$ - argument selector for the last argument; argument need not be supplied, but if none is supplied, the alias name is considered to be the last argument.
    • \!^ - argument selector for first argument; argument MUST be supplied.
    • \!:n - argument selector for the nth argument; argument MUST be supplied; n=0 refers to the alias/command name.
    • \!:m-n - argument selector for the arguments from the mth to the nth; arguments MUST be supplied.
    • \!:n-$ - argument selector for the arguments from the nth to the last; at least argument n MUST be supplied.
    • \!:n* - argument selector for the arguments from the nth to the last; sufficient arguments need not be supplied.
      #Alias the cd command so that when you change directories, the contents are immediately displayed.
      alias cd 'cd \!* && ls'
      
  • Wildcard matching
    if ( "$input" =~ [0-9]* ) then
      echo "the input starts with an integer"
    else
      echo "the input does NOT start with an integer"
    endif
    
  • Job control
  • The built-in where command. Works like the which command but shows all locations of the target command in the directories specified in $PATH rather than only the one that will be used.

Deployment

Early versions of Mac OS X shipped with tcsh as the default shell, but the default for new accounts became bash as of 10.3, then zsh as of 10.15. (tcsh is still provided, and upgrading the OS does not change the shell of any existing accounts). tcsh was the default root shell of FreeBSD prior to 14.0 (the current shell and default user shell in older versions, is POSIX-based)[15][16][17] and its descendants like DragonFly BSD and DesktopBSD.

See also

References

  1. ^ "Release 6.24.14". 26 November 2024. Retrieved 1 December 2024.
  2. ^ "remove clause 3 of the copyright". GitHub. 2002-03-08.
  3. ^ "Remove clause 3 of the copyright (changed in other files 2002-03-08)". GitHub. 2014-07-14.
  4. ^ "Tcsh-6.00 release". GitHub. 1991-07-04.
  5. ^ "FreeBSD Quickstart Guide for Linux Users".
  6. ^ "OpenBSD for Linux Users".
  7. ^ a b c d Ken Greer (3 Oct 1983). "C shell with command and filename recognition/completion". Newsgroupnet.sources. Retrieved 29 December 2010.
  8. ^ tcsh(1) man page. tcsh.
  9. ^ Fixes file in tcsh-17 June 2000.
  10. ^ Ubuntu - Details of package csh. Packages.ubuntu.com.
  11. ^ Debian - Details of package csh. Packages.debian.org.
  12. ^ Ubuntu - Details of package tcsh. Packages.ubuntu.com.
  13. ^ Debian - Details of package tcsh. Packages.debian.org.
  14. ^ "The T in tcsh". Archived from the original on 14 April 2012. Retrieved 31 October 2013.
  15. ^ Michael Urban; Brian Tiemann (2002). Sams teach yourself FreeBSD in 24 hours. Sams Publishing. p. 56. ISBN 978-0-672-32424-6.
  16. ^ POSIX 2008 Shell Command Language "The System V shell was selected as the starting point for the Shell and Utilities volume of POSIX.1-2008. The BSD C shell was excluded from consideration"
  17. ^ "FreeBSD Quickstart Guide for Linux Users". FreeBSD Documentation Portal. Retrieved 2024-02-04.

Read other articles:

Captain America: Civil WarPosterSutradaraAnthony RussoJoe RussoProduserKevin FeigeSkenarioChristopher MarkusStephen McFeelyBerdasarkanCaptain Americaoleh Joe SimonJack KirbyPemeran Chris Evans Robert Downey Jr Scarlett Johansson Sebastian Stan Anthony Mackie Elizabeth Olsen Frank Grillo Chadwick Boseman Jeremy Renner Don Cheadle Tom Holland Paul Rudd Daniel Brühl Don Ceadle Paul Bettany Emily VanCamp Martin Freeman William Hurt Penata musikHenry JackmanSinematograferTrent OpalochPerusa...

 

Dreggers Letak Dreggers di Segeberg NegaraJermanNegara bagianSchleswig-HolsteinKreisSegeberg Municipal assoc.Trave-LandPemerintahan • MayorKarin DavidLuas • Total2,79 km2 (108 sq mi)Ketinggian40 m (130 ft)Populasi (2013-12-31)[1] • Total59 • Kepadatan0,21/km2 (0,55/sq mi)Zona waktuWET/WMPET (UTC+1/+2)Kode pos23845Kode area telepon04550Pelat kendaraanSESitus webwww.amt-trave-land.de Dreggers adalah kota ...

 

Protected wilderness area in California, United States Matilija WildernessIUCN category Ib (wilderness area)LocationVentura/ Santa Barbara counties, California, United StatesNearest cityOjai, CaliforniaCoordinates34°49′0″N 119°10′0″W / 34.81667°N 119.16667°W / 34.81667; -119.16667[1]Area29,207 acres (118.20 km2)Established1992Governing bodyU.S. Forest Service The Matilija Wilderness is a 29,207-acre (11,820 ha) wilderness area in...

County in Michigan, United States County in MichiganLenawee CountyCountyLenawee County Courthouse in AdrianLocation within the U.S. state of MichiganMichigan's location within the U.S.Coordinates: 41°53′N 84°04′W / 41.89°N 84.07°W / 41.89; -84.07Country United StatesState MichiganFounded1822 (created)September 10, 1826 (organized)[1]SeatAdrianLargest cityAdrianArea • Total761 sq mi (1,970 km2) • Land750&#...

 

Shopping mall in Florida, United StatesSawgrass MillsA welcome sign at the Green Toad Road entrance to Sawgrass Mills in February 2022.LocationSunrise, Florida, United StatesCoordinates26°09′05″N 80°19′15″W / 26.151353°N 80.320778°W / 26.151353; -80.320778Opening dateOctober 4, 1990; 33 years ago (1990-10-04)DeveloperMills CorporationOwnerSimon Property GroupArchitectArquitectonicaNo. of stores and services400No. of anchor tenants30 (29 op...

 

LoverAlbum studio karya Taylor SwiftDirilis23 Agustus 2019 (2019-08-23)DirekamNovember 2018 – 24 Februari 2019StudioElectric Lady Studios (New York City)GenrePop rock[1]Durasi61:48Label Republic Taylor Swift Productions Produser Taylor Swift (prod. eksekutif) Jack Antonoff Louis Bell Frank Dukes Joel Little Sounwave Kronologi Taylor Swift Reputation Stadium Tour Surprise Song Playlist(2018) Lover(2019) Kronologi Album studio Taylor Swift Reputation(2017) Lover(2019) Folklor...

Rosford Street ReserveA seating area which lies on the edges of Prospect Creek.TypeUrban park, sports ground, nature reserve, urban forestLocationSmithfield, Smithfield WestCoordinates33°50′37″S 150°55′43″E / 33.8436°S 150.9286°E / -33.8436; 150.9286Area20.7 hectares (51.15 acres)Opened1974Operated byFairfield City CouncilStatusOpen all year Rosford Street Reserve, or Rosford Reserve, is an urban park and nature reserve situated in the western suburbs...

 

Questa voce sull'argomento contee dell'Illinois è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Contea di LakeconteaLocalizzazioneStato Stati Uniti Stato federato Illinois AmministrazioneCapoluogoWaukegan Data di istituzione1839 TerritorioCoordinatedel capoluogo42°25′48″N 87°46′48″W / 42.43°N 87.78°W42.43; -87.78 (Contea di Lake)Coordinate: 42°25′48″N 87°46′48″W / 42.43°N 87.78°W42.43...

 

Pour les articles homonymes, voir Pôle et Euler (homonymie). Cet article est une ébauche concernant la géométrie. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Dans le cas d'une sphère, chaque point de la surface B qui se déplace à la surface de la sphère décrit un arc de cercle qui ont en commun leur centre de rotation représenté par le pôle eulérien E situé sur la surface A. Un pôle eulérien ...

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: 2½ Years – news · newspapers · books · scholar · JSTOR (March 2012) (Learn how and when to remove this message) 1993 box set by Elvis Costello2+1⁄2 YearsBox set by Elvis CostelloReleased12 October 1993Recorded1977–1979GenrePunk rock, pub rock,...

 

Gornja KoznicaDesaNegara SerbiaDistrikDistrik PčinjaKotamadyaSurdulicaPopulasi (2002) • Total77Zona waktuUTC+1 (CET) • Musim panas (DST)UTC+2 (CEST) Gornja Koznica adalah desa di kotamadya Surdulica, Serbia. Menurut sensus 2002, desa berpenduduk 77 orang.[1] Referensi ^ Popis stanovništva, domaćinstava i Stanova 2002. Knjiga 1: Nacionalna ili etnička pripadnost po naseljima. Republika Srbija, Republički zavod za statistiku Beograd 2003. ISBN 86-8...

 

Rodong SinmunTipeSurat kabar harianFormatLembar lebarPemilikPartai Buruh KoreaPenerbitBadan Berita RodongPemimpin redaksiKim Pyong-hoDidirikan1945Pandangan politikJuche, SongunPusatPyongyang, Korea UtaraSirkulasi surat kabar600.000 (sejak 2015)[1]Situs webwww.rodong.rep.kp/en/ Rodong SinmunJosŏn-gŭl로동신문 Hanja勞動新聞 Alih AksaraRodong SinmunMcCune–ReischauerRodong Sinmun Kantor Rodong Sinmun di Pyongyang Rodong Sinmun (IPA: [ɾo.doŋ ɕin.mun]; Hangul:...

Lower house of legislature in Maharashtra, India Maharashtra Legislative AssemblyMahārāṣhṭra Vidhāna Sabhā14th Maharashtra AssemblyTypeTypeLower house of the Maharashtra Legislature Term limits5 yearsLeadershipGovernor of MaharashtraRamesh Bais since 18 February 2023 Speaker of the HouseRahul Narwekar, BJP since 3 July 2022 Deputy Speaker of the HouseNarhari Sitaram Zirwal, NCP since 14 March 2020 Chief MinisterEknath Shinde, SHS since 02 July 2022 Minister of Parliamentar...

 

Stasium Puerto Deseado Puerto Deseado adalah kota dengan 15.000 penduduk dan pelabuhan perikanan di Patagonia, Provinsi Santa Cruz, Argentina, di muara Sungai Deseado. Pelabuhan ini dinamai Pelabuhan Hasrat oleh Thomas Cavendish tahun 1586 dari nama kapalnya. Kota ini memiliki pelabuhan sepanjang 32 km (20 mi) dan pernah digunakan oleh Magellan dan navigator awal lainnya. Pranala luar Official website Diarsipkan 2008-07-06 di Wayback Machine. Templat:Ar-mi-muni Port Desire and the D...

 

Stade Ecopa de Shizuoka (ja)静岡スタジアム・エコパGénéralitésAdresse 2300-1, Aino Fukuroi, Préfecture de Shizuoka, JaponConstruction et ouvertureOuverture 26 mars 2001Coût de construction 30 milliards ¥JPYUtilisationClubs résidents Júbilo Iwata Shimizu S-PulsePropriétaire Préfecture de ShizuokaAdministration Association de football de la préfecture de ShizuokaÉquipementSurface Pelouse naturelleCapacité 50 889Dimensions 107 m × 72 mLocalisationCoordonnées 34°...

千葉セントラルタワーChiba Central Tower 施設情報所在地 千葉県千葉市中央区中央三丁目17-1座標 北緯35度36分28.5秒 東経140度07分16.4秒 / 北緯35.607917度 東経140.121222度 / 35.607917; 140.121222座標: 北緯35度36分28.5秒 東経140度07分16.4秒 / 北緯35.607917度 東経140.121222度 / 35.607917; 140.121222状態 完成着工 2006年3月1日竣工 2009年2月用途 共同住宅・店舗地上高...

 

1996 studio album by Charlie HadenNow Is the HourStudio album by Charlie HadenReleasedApril 1996RecordedJuly 18–20, 1995GenreJazzLength59:38LabelVerveProducerCharlie Haden and Ruth CameronCharlie Haden chronology Steal Away(1995) Now Is the Hour(1996) Beyond the Missouri Sky(1997) Quartet West chronology Always Say Goodbye(1994) Now Is the Hour(1996) The Art of the Song(1999) Now Is the Hour is an album by the American jazz bassist Charlie Haden's Quartet West, released in 1996 on t...

 

Les premières traces de la présence de Juifs et du judaïsme en Europe remontent à plus de 2 000 ans avec le développement d'une communauté juive dans la capitale de la Rome antique puis, venant probablement du Proche-Orient, les Juifs s'installent pendant les deux premiers siècles après J-C dans différentes provinces de l'Empire romain, sur le territoire de l'Italie contemporaine puis en Croatie, en Espagne, en Gaule. La présence des Juifs en Europe est caractérisée par ...

Historic house in Massachusetts, United States United States historic placeNewman–Fiske–Dodge HouseU.S. National Register of Historic Places Newman-Fiske-Dodge HouseShow map of MassachusettsShow map of the United StatesLocation162 Cherry Street,Wenham, MassachusettsCoordinates42°36′13″N 70°54′54″W / 42.60361°N 70.91500°W / 42.60361; -70.91500Built1658Architectural styleColonialMPSFirst Period Buildings of Eastern Massachusetts TRNRHP reference...

 

Verne Orr14th United States Secretary of the Air ForceIn officeFebruary 9, 1981 – November 30, 1985PresidentRonald ReaganPreceded byHans MarkSucceeded byRussell A. RourkeDirector of the California Department of FinanceIn officeJanuary 1, 1970 – January 5, 1975GovernorRonald ReaganPreceded byCaspar WeinbergerSucceeded byRoy M. Bell Personal detailsBornGeorge Vernon Orr Jr.(1916-11-12)November 12, 1916Des Moines, Iowa, U.S.DiedNovember 27, 2008(2008-11-27) (aged 92)Pa...