Skip to content
EntityQ285142· pop 19· linked from 215 articles

Also known as unalias

commande Unix

Described at

The alias utility shall create or redefine alias definitions or write the values of existing alias definitions to standard output. An alias definition provides a string value that shall replace a command name when it is encountered; see Alias Substitution . An alias definition shall affect the current shell execution environment and the execution environments of the subshells of the current shell. When used as specified by this volume of POSIX.1-2017, the alias definition shall not affect the parent process of the current shell nor any utility environment invoked by the shell; see Shell Execution Environment . Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( One of the name operands specified did not have an alias definition, or an error occurred. The alias description is based on historical KornShell implementations. Known differences exist between that and the C shell. The KornShell version was adopted to be consistent with all the other KornShell features in this volume of POSIX.1-2017, such as command line editing. Since alias affects the current shell execution environment, it is generally provided as a shell regular built-in. Historical versions of the KornShell had not written aliases in a quoted manner suitable for reentry to the shell, but this volume of POSIX.1-2017 has made this a requirement for all similar output. Therefore, consistency was chosen over this detail of historical practice. This utility is marked as part of the User Portability Utilities option. The alias utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an option for interactive utilities.

Excerpt from a page describing this subject · 7,781 chars · not written by Vinony

Wikidata facts

Image
Alias command example.png
Show 2 more facts
Commons category
Alias (command)
Sources (3)

via Wikidata · CC0

Article · Français

La commande alias que proposent de nombreux shells informatiques permet de définir de nouvelles commandes. Elle s'emploie principalement pour abréger une commande avec ses options ou rajouter par défaut des options à une commande régulièrement utilisée. Exemples : Sous sh et ses dérivés, * alias ll='ls -l' crée la commande ll qui exécutera ls -l. * alias ll rappelle la définition de ll. POSIX prévoit le fonctionnement et les options de alias, qui peut aussi afficher les définitions de celles préalablement créées. * L'exécution d'un alias est équivalente à celle de sa définition. * La commande alias sans argument affiche la liste de tous les alias en cours. * Un alias défini en cours de shell sera oublié à la fermeture de ce dernier. * Si un alias redéfinit une commande, celle-ci reste accessible en la préfixant par une barre oblique inverséeExemple : Après alias ls='ls -ls' * ls exécute la commande ls avec les options qui créent une liste détaillée des fichiers par ordre de taille. * \ls exécute la commande ls avec ses options par défaut, qui renvoient une liste alphabétique des noms de fichier. Les alias sont habituellement définis dans le fichier de démarrage du shell (~/.bashrc pour bash). Certaines distributions comme Debian réservent un fichier .bash_aliases, qu'il faudra appeler dans .bashrc

Abstract from DBpedia / Wikipedia · CC BY-SA