Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Comparison of command shells
(section)
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!
==Interactive features== {{sticky header}} {{sort-under}} {| class="wikitable sortable sort-under sticky-header" style="width: auto; text-align: center; font-size: smaller;" |- !Shell !{{small|[[#Completions|Command<br>name<br>completion]]}} !{{small|[[#Completions|Path<br>completion]]}} !{{small|[[#Completions|Command<br>argument<br>completion]]}} !{{small|[[#Completions|Wildcard<br>completion]]}} !{{small|[[#Command history|Command<br>history]]}} !{{small|[[#Mandatory argument prompt|Mandatory<br>argument<br>prompt]]}} !{{small|[[#Automatic suggestions|Automatic<br>suggestions]]}} !{{small|[[#Colored directory listings|Colored<br>directory<br>listings]]}} !{{small|[[#Text highlighting|Text<br>highlighting]]}} !{{small|[[#Syntax highlighting|Syntax<br>highlighting]]}} !{{small|[[#Directory history, stack or similar features|Directory history, stack or similar features]]}} !{{small|[[#Implicit directory change|Implicit<br>directory<br>change]]}} !{{small|[[#Autocorrection|Auto­correction]]}} !{{small|Integrated<br>environment}} !{{small|Snippets}} !{{small|Value<br>prompt}} !{{small|Menu/options<br>prompt}} !{{small|[[#Progress indicator|Progress<br>indicator]]}} !{{small|[[#Context sensitive help|Context<br>sensitive<br>help]]}} |- ![[Thompson shell]] |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[Bourne shell]] 1977 version |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[Bourne shell]] current version |{{no}} |{{yes}}<ref group="nb" name="ReferenceB">current versions from JΓΆrg Schilling.</ref> |{{no}} |{{no}} |{{yes}}<ref group="nb" name="ReferenceB"/> |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}} (CDPATH, pushd, popd, dirs), CDPATH since SVr4 |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[POSIX]] shell |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|CDPATH}})}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[Bash (Unix shell)|bash]] (v4.0) |{{yes}} |{{yes}} |{{yes}} |{{yes}}<ref group="nb">Alt-Shift-8 or Alt-* will expand to the full matching list of filenames.</ref> |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|CDPATH}}, {{mono|pushd}}, {{mono|popd}})}} |{{yes|optional}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{partial|External}} |{{no}} |- ![[C shell|csh]] |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|cdpath}}, {{mono|pushd}}, {{mono|popd}})}} |{{yes|optional}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[tcsh]] |{{yes}} |{{yes}} |{{yes2|when defined}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|cdpath}}, {{mono|pushd}}, {{mono|popd}})}} |{{yes|optional}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[Hamilton C shell]] |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|cdpath}}, {{mono|pushd}}, {{mono|popd}})}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[Scsh]] |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{partial|External}} |{{no}} |- ![[Korn Shell|ksh]] (ksh93t+) |{{yes}}<br>{{small|(extendable)}} |{{yes}}<br>{{small|(extendable)}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}}<br>{{small|({{mono|cdpath}} builtin, {{mono|pushd}}, {{mono|popd}} implemented as functions)}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{partial|External}} |{{no}} |- ![[pdksh]] |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{partial|External}} |{{no}} |- ![[zsh]] |{{yes}} |{{yes}} |{{yes}} |{{yes}}<ref>{{cite web |title=[Z Shell] Completion System |url=https://zsh.sourceforge.io/Doc/Release/Completion-System.html |publisher=Zsh.sourceforge.io |access-date=2015-02-24}}</ref> |{{yes}} |{{yes}}<ref>This applies only on reserved words and other syntactic features.</ref> |{{yes}}<br>{{small|(via {{mono|predict-on}} or user-defined<ref>e.g. via 3rd party such as [https://github.com/tarruda/zsh-autosuggestions zsh-autosuggestions]</ref>)}} |{{yes}} |{{yes}} |{{partial|Third-party extension}}<ref>zsh does not feature syntax highlighting, but a 3rd party project exists which offers this capability as an add-on: [https://github.com/zsh-users/zsh-syntax-highlighting zsh-syntax-highlighting]</ref> |{{yes}} |{{yes|optional}} |{{yes}} |{{no}} |{{yes2|when defined (as ZLE widgets)}} |{{yes}} |{{yes}} |{{partial|External}} |{{yes}} |- ![[Almquist shell|ash]] |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{partial|External}} |{{no}} |- ![[CP/M#Console_Command_Processor|CCP]] |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[COMMAND.COM]] |{{no}} |{{no}} |{{no}} |{{no}} |{{no}}<ref group="nb" name="doskey">Available through the {{mono|[[DOSKEY]]}} add-on.</ref><ref group="nb" name="drdos">Available in DR-DOS through {{mono|[[HISTORY (CONFIG.SYS directive)|HISTORY]]}}.</ref> |{{no}} |{{no}} |{{no}} |{{no}} (only in DR-DOS through [[%$ON%]], [[%$OFF%]], [[%$HEADER%]], [[%$FOOTER%]]) |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} (only single-stepping with COMMAND /Y<ref name="Paul_1997_OD-A3"/>) |{{no}} |{{no}} |{{no}} (only via external {{mono|CHOICE}} command, in DR-DOS also via {{mono|SWITCH}} / {{mono|DRSWITCH}} internal commands) |{{no}} |{{no}} |- !OS/2<br>[[CMD.EXE]] |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- !Windows<br>[[CMD.EXE]] |{{yes2|partial}} |{{yes2|partial}} |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|F8}})}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|PUSHD}}, {{mono|POPD}})}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} (via {{mono|SET /P}} command) |{{no}} |{{no}} |{{no}} |- ![[4DOS]] |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{yes}}<ref group="nb" name="doskey_4dos">Alternatively available through the {{mono|[[DOSKEY]]}} add-on as well.</ref><ref group="nb" name="drdos_4dos">Alternatively available in DR-DOS through {{mono|[[HISTORY (CONFIG.SYS directive)|HISTORY]]}} as well.</ref> |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes| (via popup, extended directory searches, {{mono|CDPATH}}, {{mono|PUSHD}}, {{mono|POPD}}, {{mono|DIRHISTORY}}, {{mono|DIRS}}, {{mono|CDD}}, {{mono|CD -}} commands and {{mono|%@DIRSTACK[]}} function)}} |{{yes}} |{{no}} |{{yes}} |{{no}} |{{yes}} (via {{mono|INPUT}}, {{mono|INKEY}} and {{mono|ESET}} commands) |{{yes}} (via {{mono|@SELECT[]}} function, and indirectly via a combination of {{mono|INKEY}}, {{mono|INPUT}}, {{mono|SWITCH}} commands) |{{no}} |{{yes}} |- ![[4OS2]] |? |? |? |? |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |? |{{no}} |? |? |{{no}} |{{yes}} |- ![[Take Command Console|TCC]] (formerly 4NT) |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{yes}} |{{yes| (via popup, extended directory searches, {{mono|CDPATH}}, {{mono|PUSHD}}, {{mono|POPD}}, {{mono|DIRHISTORY}}, {{mono|DIRS}}, {{mono|CDD}}, {{mono|CD -}} commands and {{mono|%@DIRSTACK[]}} function)}} |{{yes}} |{{no}} |{{yes}} |{{no}} |{{yes}} (via {{mono|INPUT}}, {{mono|INKEY}}, {{mono|ESET}} and {{mono|SET /P}} commands) |{{yes}} (via {{mono|@SELECT[]}} function, and indirectly via a combination of {{mono|INKEY}}, {{mono|INPUT}}, {{mono|SWITCH}} commands)<ref group="nb">TCC has special prompt functions for Yes, No, Cancel, Close, Retry.</ref> |{{no}} |{{yes}} |- ![[Windows PowerShell|PowerShell]] |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{yes}}<br>{{small|({{mono|F8}})}} |{{yes}} |{{yes|Yes; via PSReadLine<ref name="PSReadLine">{{cite web |url=https://github.com/lzybkr/PSReadLine|title=PSReadLine: A bash inspired readline implementation for PowerShell|first=Jason|last=Shirk|date=15 February 2018|via=GitHub}}</ref> module (bundled in v5.0<ref>{{Cite web |url=https://msdn.microsoft.com/en-us/powershell/scripting/core-powershell/core-modules/windows-powershell-5.0 |title=Windows PowerShell 5.0 |access-date=8 September 2016 |archive-url=https://web.archive.org/web/20160917093943/https://msdn.microsoft.com/en-us/powershell/scripting/core-powershell/core-modules/windows-powershell-5.0 |archive-date=17 September 2016 |url-status=dead |df=dmy-all }}</ref>) or in ISE<ref name="powershell_ise"/>}} |{{partial|Third-party extension}}<ref>{{Cite web|url=https://github.com/joonro/Get-ChildItemColor|title = Get-ChildItemColor|website = [[GitHub]]|date = 18 March 2022}}</ref> |{{yes}}<ref>{{Cite web | title = Write-Host (Microsoft.PowerShell.Utility) - PowerShell | author = sdwheeler | work = docs.microsoft.com | date = | access-date = 18 January 2022 | url = https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-host | quote = }}</ref> |{{yes|Yes; via PSReadLine<ref name="PSReadLine"/> module (bundled in v5.0) or in ISE<ref name="powershell_ise"/>}} |{{yes}}<br>{{small|(multiple stacks; multiple location types;<ref>[https://technet.microsoft.com/en-us/library/hh849855.aspx Push-Location] (with alias <code>pushd</code>) and [https://technet.microsoft.com/en-us/library/hh849842.aspx Pop-Location] (with alias <code>popd</code>) allows multiple location types (directories of file systems, organizational units of [[Active Directory]], nodes of [[Windows Registry]] etc) to be pushed onto and popped from location stacks.</ref> {{mono|Push-Location}}, {{mono|Pop-Location}})}} |{{yes2}}Yes, in PSReadLine<ref name="PSReadLine"/> module |{{yes2}}Yes, in ISE<ref name="powershell_ise">{{cite web |title=Windows PowerShell Integrated Scripting Environment (ISE) |url=https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396 |publisher=Microsoft Technet |access-date=2015-09-12}}</ref> |{{yes2}}Yes, in ISE<ref name="powershell_ise"/> |{{yes}} |{{yes}}<ref>The [https://technet.microsoft.com/en-us/library/ff730939.aspx $host.ui.PromptForChoice] function allows for a menu-style prompt for choices. The prompt works from background jobs as well as from remote sessions, displaying the menu prompt on the console of the controlling session.</ref> |{{yes}}<ref>The [https://technet.microsoft.com/en-us/library/hh849902.aspx {{mono|Write-Progress}}] cmdlet writes a progress bar which can indicate percentage, remaining seconds etc. The progress bar messages work from background jobs or remote sessions in addition to interactive scripts, i.e. the progress bar is displayed on the console of the controlling session, not as part of the regular output.</ref> |{{yes}}, in ISE<ref name="powershell_ise"/> |{{yes|popup window}}<ref>The [https://technet.microsoft.com/en-us/library/hh849915.aspx {{mono|Show-Command}}] cmdlet inspects the command definition and opens an interactive windows with a named input field for each parameter/switch</ref> |- ![[Rc (Unix shell)|rc]] |{{yes}}<ref group="nb" name="rio">Handled by [[Rio (program)|rio]], [[GNU readline]], [[editline]] or [[vrl]].</ref> |{{yes}}<ref group="nb" name="rio"/> |{{no}} |{{no}} |{{yes}}<ref group="nb" name="rio"/> |{{no}} |{{no}} |{{no}} |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |? |{{no}} |{{no}} |{{no}} |- ![[BeanShell]] |{{yes}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[DIGITAL Command Language|VMS DCL]] |{{yes|Minimum uniqueness scheme}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{no}} |- ![[Friendly interactive shell|fish]] |{{yes}} |{{yes}} |{{yes}}<ref name="fishcompletion">{{cite web |url=http://fishshell.com/docs/current/index.html#completion |title=fish: Documentation |at=Section ''Tab completion'' |access-date=2016-01-10}}</ref> |{{yes}}<ref name="fishcompletion"/> |{{yes}} |{{no}} |{{yes}} |{{yes}} |{{yes}}<br>{{small|(built-in helper available<ref>{{Cite web|title=set_color - set the terminal color β fish-shell 3.1.2 documentation|url=https://fishshell.com/docs/current/cmds/set_color.html|url-status=live|access-date=2021-02-23|website=fishshell.com|archive-url=https://web.archive.org/web/20200217185759/http://fishshell.com:80/docs/current/cmds/set_color.html |archive-date=17 February 2020 }}</ref>)}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{yes}}<ref group="nb">The fish shell is an interactive character based input/output surface.</ref> |{{yes| Yes, using {{mono|abbr}} command}} |{{yes}} |{{yes| (via {{mono|fish_config}} command<ref>{{Cite web|title=abbr - manage fish abbreviations β fish-shell 3.1.2 documentation|url=https://fishshell.com/docs/current/cmds/abbr.html|access-date=2021-02-23|website=fishshell.com}}</ref>)}} |{{no}} |{{no}} |- !Shell ![[#Completions|Command<br>name<br>completion]] ![[#Completions|Path<br>completion]] ![[#Completions|Command<br>argument<br>completion]] ![[#Completions|Wildcard<br>completion]] ![[#Command history|Command<br>history]] ![[#Mandatory argument prompt|Mandatory<br>argument<br>prompt]] ![[#Automatic suggestions|Automatic<br>suggestions]] ![[#Colored directory listings|Colored<br>directory<br>listings]] ![[#Text highlighting|Text<br>highlighting]] ![[#Syntax highlighting|Syntax<br>highlighting]] ![[#Directory history, stack or similar features|Directory history, stack or similar features]] ![[#Implicit directory change|Implicit<br>directory<br>change]] ![[#Autocorrection|Auto­correction]] !Integrated<br>environment !Snippets !Value<br>prompt !Menu/options<br>prompt ![[#Progress indicator|Progress<br>indicator]] ![[#Context sensitive help|Context<br>sensitive<br>help]] |} === Background execution === Background execution allows a shell to run a command without user interaction in the terminal, freeing the command line for additional work with the shell. POSIX shells and other Unix shells allow background execution by using the ''&'' character at the end of command. === Completions === {{main article|Command-line completion}} [[Image:Command-line-completion-example.gif|right|thumb|402px|Command-line completion in [[Bash (Unix shell)|Bash]].]]Completion features assist the user in typing commands at the command line, by looking for and suggesting matching words for incomplete ones. Completion is generally requested by pressing the completion key (often the {{keypress|TAB}} key). ''Command name completion'' is the completion of the name of a command. In most shells, a command can be a program in the command path (usually <code>$PATH</code>), a builtin command, a function or alias. ''Path completion'' is the completion of the path to a file, relative or absolute. ''Wildcard completion'' is a generalization of path completion, where an expression matches any number of files, using any supported syntax for [[#String processing and filename matching|file matching]]. ''Variable completion'' is the completion of the name of a variable name ([[environment variable]] or shell variable). Bash, zsh, and fish have completion for all variable names. PowerShell has completions for environment variable names, shell variable names and β from within user-defined functions β parameter names. ''Command argument completion'' is the completion of a specific command's arguments. There are two types of arguments, [[Named parameter|named]] and positional: Named arguments, often called ''options'', are identified by their name or letter preceding a value, whereas positional arguments consist only of the value. Some shells allow completion of argument names, but few support completing values. Bash, zsh and fish offer parameter name completion through a definition external to the command, distributed in a separate completion definition file. For command parameter name/value completions, these shells assume path/filename completion if no completion is defined for the command. Completion can be set up to dynamically suggest completions by calling a shell function.<ref>{{cite web |url=https://zsh.sourceforge.io/Doc/Release/Completion-System.html |title=zsh: 20. Completion System |publisher=Zsh.sourceforge.io |date=2013-03-06 |access-date=2013-08-18}}</ref> The fish shell additionally supports parsing of [[man page]]s to extract parameter information that can be used to improve completions/suggestions. In PowerShell, all types of commands (cmdlets, functions, script files) inherently expose data about the names, types and valid value ranges/lists for each argument. This metadata is used by PowerShell to automatically support argument name and value completion for built-in commands/functions, user-defined commands/functions as well as for script files. Individual cmdlets can also define dynamic completion of argument values where the completion values are computed dynamically on the running system. === Command history === {{main article|Command history}} Users of a shell may find themselves typing something similar to what they have typed before. Support for ''command history'' means that a user can recall a previous command into the command-line editor and edit it before issuing the potentially modified command. Shells that support completion may also be able to directly complete the command from the command history given a partial/initial part of the previous command. Most modern shells support command history. Shells which support command history in general also support completion from history rather than just recalling commands from the history. In addition to the plain command text, PowerShell also records execution start- and end time and execution status in the command history. === Mandatory argument prompt === {{further|Named parameter#Optional parameters}} Mandatory arguments/parameters are arguments/parameters which must be assigned a value upon invocation of the command, function or script file. A shell that can determine ahead of invocation that there are missing mandatory values, can assist the interactive user by prompting for those values instead of letting the command fail. Having the shell prompt for missing values will allow the author of a script, command or function to mark a parameter as mandatory instead of creating script code to either prompt for the missing values (after determining that it is being run interactively) or fail with a message. === Automatic suggestions === {{main article|Autocomplete}} [[Image:Powershell Intellisense example for the Get-Process cmdlet.gif|right|thumb|upright=2|Command-line completion in [[PowerShell]].]]Shells featuring automatic suggestions display optional command-line completions as the user types. The [[PowerShell]] and [[Fish (Unix shell)|fish]] shells natively support this feature; pressing the {{keypress|tab}} key inserts the completion. Implementations of this feature can differ between shells; for example, PowerShell<ref>{{Cite web|last=sdwheeler|title=What's New in the PowerShell 5.0 ISE - PowerShell|url=https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/whats-new/what-s-new-in-the-powershell-50-ise|access-date=2021-07-25|website=docs.microsoft.com|language=en-us}}</ref> and [[Z shell|zsh]]<ref>{{Cite web|title=GitHub - marlonrichert/zsh-autocomplete: π€ Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.|url=https://github.com/marlonrichert/zsh-autocomplete|access-date=2021-07-25|website=GitHub|language=en}}</ref> use an external module to provide completions, and fish derives its completions from the user's command history.<ref>{{Cite web|title=Interactive use β fish-shell 3.3.1 documentation|url=https://fishshell.com/docs/current/interactive.html#autosuggestions|access-date=2021-07-25|website=fishshell.com}}</ref> === Directory history, stack or similar features === {{Further|pushd and popd}} Shells may record a history of directories the user has been in and allow for fast switching to any recorded location. This is referred to as a "directory stack". The concept had been realized as early as 1978<ref>{{Cite book|last=Hahn|first=Harley|url=https://www.worldcat.org/oclc/184828059|title=Harley Hahn's guide to Unix and Linux|date=2009|publisher=McGraw-Hill Higher Education|isbn=978-0-07-313361-4|location=Boston|oclc=184828059}}</ref> in the release of [[C shell|the C shell]] (csh). Command line interpreters [[4DOS]] and its graphical successor [[Take Command Console]] also feature a directory stack. === Implicit directory change === A directory name can be used directly as a command which implicitly changes the current location to the directory. This must be distinguished from an unrelated [[load drive]] feature supported by [[Concurrent DOS]], [[Multiuser DOS]], [[Datapac System Manager|System Manager]] and [[REAL/32]], where the drive letter L: will be implicitly updated to point to the load path of a loaded application, thereby allowing applications to refer to files residing in their load directory under a standardized drive letter instead of under an absolute path.<ref name="DRI_1987_CDOS_User">{{cite book |title=Concurrent DOS 386 - Multiuser/Multitasking Operating System - User Guide |publisher=[[Digital Research]] |url=http://bitsavers.org/pdf/digitalResearch/concurrent/1126-2004-001_Concurrent_DOS_386_Users_Guide_Nov87.pdf}}</ref> === Autocorrection === [[File:Zsh autocompletion and autocorrection demo.gif|thumb|upright=2.0|Zsh autocompletion and autocorrection demo for a [[telnet]] program.]] When a command line does not match a command or arguments directly, spell checking can automatically correct common typing mistakes (such as [[case sensitivity]], missing letters). There are two approaches to this; the shell can either suggest probable corrections upon command invocation, or this can happen earlier as part of a completion or autosuggestion. The [[tcsh]] and [[zsh]] shells feature optional spell checking/correction, upon command invocation. Fish does the autocorrection upon completion and autosuggestion. The feature is therefore not in the way when typing out the whole command and pressing enter, whereas extensive use of the tab and right-arrow keys makes the shell mostly case insensitive. The PSReadLine<ref name="PSReadLine"/> PowerShell module (which is shipped with version 5.0) provides the option to specify a CommandValidationHandler ScriptBlock which runs before submitting the command. This allows for custom correcting of commonly mistyped commands, and verification before actually running the command. === Progress indicator === A shell script (or job) can report progress of long running tasks to the interactive user. Unix/Linux systems may offer other tools support using progress indicators from scripts or as standalone-commands, such as the program "pv".<ref>{{cite web |url=http://linux.die.net/man/1/pv |title=pv(1): monitor progress of data through pipe - Linux man page |publisher=Linux.die.net |access-date=2015-02-24}}</ref> These are not integrated features of the shells, however. === Colored directory listings === [[JP Software]] command-line processors provide user-configurable colorization of file and directory names in directory listings based on their file extension and/or attributes through an optionally defined {{code|%COLORDIR%}} environment variable. <!-- To be added: Other command line processors provide similar features, but COMMAND.COM does not. --> For the Unix/Linux shells, this is a feature of the {{mono|ls}} command and the terminal. === Text highlighting === The command line processors in [[DOS Plus]]<!-- COMMAND.COM/DOSPLUS.COM -->, <!-- TBD: possibly also some versions of Concurrent DOS -->[[Multiuser DOS]]<!-- TMP.EXE -->, [[REAL/32]] and in all versions of [[DR-DOS]]<!-- COMMAND.COM/DRDOS.COM --> support a number of optional environment variables to define escape sequences allowing to control text highlighting, reversion or colorization for display or print purposes in commands like [[TYPE (DOS command)|TYPE]]. All mentioned command line processors support <code>[[%$ON%]]</code> and <code>[[%$OFF%]]</code>. If defined, these sequences will be emitted before and after filenames. A typical sequence for {{code|%$ON%}} would be {{code|\033[1m}} in conjunction with [[ANSI.SYS]], {{code|\033p}} for an [[ASCII]] terminal or {{code|\016}} for an IBM or [[ESC/P]] printer. Likewise, typical sequences for {{code|%$OFF%}} would be {{code|\033[0m}}, {{code|\033q}}, {{code|\024}}, respectively. The variables <code>[[%$HEADER%]]</code> and <code>[[%$FOOTER%]]</code> are only supported by COMMAND.COM in DR-DOS 7.02 and higher to define sequences emitted before and after text blocks in order to control text highlighting, pagination or other formatting options. <!-- TBD. Other command-line processors may provide similar features. --> For the Unix/Linux shells, this is a feature of the terminal. === Syntax highlighting === {{main article|Syntax highlighting}} A defining feature of the fish shell is built-in syntax highlighting, As the user types, text is colored to represent whether the input is a valid command or not (the executable exists and the user has permissions to run it), and valid file paths are underlined.<ref>{{Cite web |title=fish: Tutorial |url=https://fishshell.com/docs/3.0/tutorial.html#tut_syntax_highlighting |access-date=2022-10-21 |website=fishshell.com}}</ref> An independent project offers syntax highlighting as an add-on to the Z Shell (zsh).<ref>{{cite web |url=https://github.com/zsh-users/zsh-syntax-highlighting |title=zsh-users/zsh-syntax-highlighting: Fish shell like syntax highlighting for Zsh |website=GitHub |access-date=2013-08-18}}</ref> This is not part of the shell, however. PowerShell provides customizable syntax highlighting on the command line through the PSReadLine<ref name="PSReadLine"/> module. This module can be used with PowerShell v3.0+, and is bundled with v5.0 onwards. It is loaded by default in the command line host "powershell.exe" since v5.0.<ref>{{Cite web |last=sdwheeler |title=PSReadLine Module - PowerShell |url=https://learn.microsoft.com/en-us/powershell/module/psreadline/ |access-date=2023-04-26 |website=learn.microsoft.com |language=en-us}}</ref> Take Command Console (TCC) offers syntax highlighting in the integrated environment. ===Context sensitive help=== {{main article|Context-sensitive help}} 4DOS, 4OS2, 4NT / Take Command Console and PowerShell (in PowerShell ISE) looks up context-sensitive help information when {{keypress|F1}} is pressed. Zsh provides various forms of configurable context-sensitive help as part of its {{mono|run-help}} widget, {{mono|_complete_help}} command, or in the completion of options for some commands. The fish shell provides brief descriptions of a command's flags during tab completion.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)