MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Readline_(Italiano)",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "12578": {
                "pageid": 12578,
                "ns": 0,
                "title": "Readline",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "[[Category:Command-line]]\n[[Category:GNU]]\n[[es:Readline]]\n[[it:Readline]]\n[[ja:Readline]]\n[[ru:Readline]]\n[[zh-hans:Readline]]\n{{Expansion|Recommend bracketed paste mode.}}\n[https://www.gnu.org/software/readline/ Readline] is a library by the [[GNU Project]], used by [[Bash]] and other CLI-interface programs to edit and interact with the command line. See {{man|3|readline}} for more information.\n\n== Installation ==\n\nThe {{Pkg|readline}} package is most likely already installed as a dependency of [[Bash]].\n\n== Editing mode ==\n\nBy default Readline uses [[Emacs]] style shortcuts for interacting with command line. However, [[vi]] style editing interface is also supported by adding the following to {{ic|~/.inputrc}}:\n\n{{hc|~/.inputrc|\n set editing-mode vi}}\n\nAlternatively, to set it only for [[Bash]] by adding the following line to {{ic|~/.bashrc}}:\n\n{{hc|~/.bashrc|\n set -o vi}}\n\n=== Mode indicator in prompt ===\n\nVi-style editing has two modes: command and insert. You can display which one is currently active by adding the following option:\n\n{{hc|~/.inputrc|\nset show-mode-in-prompt on\n}}\n\nThis will print a string in your prompt ({{ic|(cmd)}}/{{ic|(ins)}} by default) that can be customized with the {{ic|vi-ins-mode-string}} and {{ic|vi-cmd-mode-string}} variables.\n\n=== Different cursor shapes for each mode ===\n\nYou can set a different cursor shape for each mode by using [https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html#index-vi_002dcmd_002dmode_002dstring \"\\1 .. \\2\" escapes]:\n\n{{hc|~/.inputrc|\nset vi-ins-mode-string \\1\\e[6 q\\2\nset vi-cmd-mode-string \\1\\e[2 q\\2\n}}\n\nThis will set a block shaped cursor when in command mode and a pipe cursor when in insert mode. Note that you must have the mode indicator enabled for this to work (see [[#Mode indicator in prompt]].\n\nThe Virtual Console uses different escape codes, so you should check first which term is being used:\n\n{{hc|~/.inputrc|2=\n$if term=linux\n\tset vi-ins-mode-string \\1\\e[?0c\\2\n\tset vi-cmd-mode-string \\1\\e[?8c\\2\n$else\n\tset vi-ins-mode-string \\1\\e[6 q\\2\n\tset vi-cmd-mode-string \\1\\e[2 q\\2\n$endif\n}}\n\nSee [https://www.kernel.org/doc/Documentation/admin-guide/vga-softcursor.rst software cursor for VGA] for further details.\n\n== Fast word movement ==\n\n[[Xterm]] supports moving between words with {{ic|Ctrl+Left}} and {{ic|Ctrl+Right}} [http://stackoverflow.com/a/7783928 by default]. To achieve this effect with other terminal emulators, find the correct [http://wiki.bash-hackers.org/scripting/terminalcodes terminal codes], and bind them to {{ic|backward-word}} and {{ic|forward-word}} in {{ic|~/.inputrc}}.\n\nFor example, for [[urxvt]]:\n\n{{hc|~/.inputrc|\n\"\\e[1;5D\": backward-word\n\"\\e[1;5C\": forward-word}}\n\n== History ==\n\nUsually, pressing the up arrow key will cause the last command to be shown regardless of the command that has been typed so far. However, users may find it more practical to list only past commands that match the current input.\n\nFor example, if the user has typed the following commands:\n\n* {{Ic|ls /usr/src/linux-2.6.15-ARCH/kernel/power/Kconfig}}\n* {{Ic|who}}\n* {{Ic|mount}}\n* {{Ic|man mount}}\n\nIn this situation, when typing {{Ic|ls}} and pressing the up arrow key, current input will be replaced with {{Ic|man mount}}, the last performed command. If the history search has been enabled, only past commands beginning with {{Ic|ls}} (the current input) will be shown, in this case {{Ic|ls /usr/src/linux-2.6.15-ARCH/kernel/power/Kconfig}}.\n\nYou can enable the history search mode by adding the following lines to {{Ic|/etc/inputrc}} or {{Ic|~/.inputrc}}:\n\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n\nIf you are using vi mode, you can add the following lines to {{Ic|~/.inputrc}} (from [https://bbs.archlinux.org/viewtopic.php?pid=428760#p428760 this post]):\n\n set editing-mode vi\n $if mode=vi\n set keymap vi-command\n # these are for vi-command mode\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n j: history-search-forward\n k: history-search-backward\n set keymap vi-insert\n # these are for vi-insert mode\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n $endif\n\nIf you chose to add these lines to {{Ic|~/.inputrc}}, it is recommended that you also add the following line at the beginning of this file to avoid strange things like [https://bbs.archlinux.org/viewtopic.php?id=112537 this]:\n\n $include /etc/inputrc\n\nAlternatively, one can use reverse-search-history (incremental search) by pressing {{ic|Ctrl+R}}, which does not search based on previous input but instead jumps backwards in the history buffer as commands are typed in a search term. Pressing {{ic|Ctrl+R}} again during this mode will display the previous line in the buffer that matches the current search term, while pressing {{ic|Ctrl+G}} (abort) will cancel the search and restore the current input line. So in order to search through all previous {{Ic|mount}} commands, press {{ic|Ctrl+R}}, type 'mount' and keep pressing {{ic|Ctrl+R}} until the desired line is found.\n\nThe forward equivalent to this mode is called forward-search-history and is bound to {{ic|Ctrl+S}} by default. Beware that most terminals override {{ic|Ctrl+S}} to suspend execution until {{ic|Ctrl+Q}} is entered. (This is called XON/XOFF flow control). For activating forward-search-history, either disable flow control by issuing:\n\n $ stty -ixon\n\nor use a different key in {{Ic|inputrc}}. For example, to use {{ic|Alt+S}} which is not bound by default:\n\n \"\\es\": forward-search-history\n\n== Faster completion ==\n\nWhen performing tab completion, a single tab attempts to partially complete the current word. If no partial completions are possible, a double tab shows all possible completions.\n\nThe double tab can be changed to a single tab by setting:\n\n{{hc|~/.inputrc|\nset show-all-if-unmodified on\n}}\n\nOr you can set it such that a single tab will perform both steps: partially complete the word ''and'' show all possible completions if it is still ambiguous:\n\n{{hc|~/.inputrc|\nset show-all-if-ambiguous on\n}}\n\n== Colorized completion ==\n\nYou can enable coloring of completion of filenames with the {{ic|colored-stats}} option. You can also color the identical prefix of completion-lists with {{ic|colored-completion-prefix}}. For example:\n\n{{hc|~/.inputrc|\n# Color files by types\nset colored-stats On\n# Append char to indicate type\nset visible-stats On\n# Mark symlinked directories\nset mark-symlinked-directories On\n# Color the common prefix\nset colored-completion-prefix On\n# Color the common prefix in menu-complete\nset menu-complete-display-prefix On\n}}\n\n== Macros ==\n\nReadline also supports binding keys to keyboard macros. For simple example, run this command in Bash:\n bind '\"\\ew\": \"\\C-e # macro\"'\n\nor add the part within single quotes to inputrc:\n \"\\ew\": \"\\C-e # macro\"\n\nNow type a line and press {{ic|Alt}}+{{ic|W}}. Readline will act as though {{ic|Ctrl+E}} (end-of-line) had been pressed, appended with '{{Ic| # macro}}'.\n\nUse any of the existing keybindings within a readline macro, which can be quite useful to automate frequently used idioms. For example, this one makes {{ic|Ctrl+Alt+L}} append \"| less\" to the line and run it ({{ic|Ctrl+M}} is equivalent to {{ic|Enter}}):\n \"\\e\\C-l\": \"\\C-e | less\\C-m\"\n\nThe next one prefixes the line with 'yes |' when pressing {{ic|Ctrl+Alt+Y}}, confirming any yes/no question the command might ask:\n \"\\e\\C-y\": \"\\C-ayes | \\C-m\"\n\nThis example wraps the line in {{Ic|su -c &#39;&#39;}}, if {{ic|Alt+S}} is pressed:\n \"\\es\": \"\\C-a su -c '\\C-e'\\C-m\"\n\nThis example prefixes the line with {{Ic|sudo }}, if {{ic|Alt+S}} is pressed.  It's safer because it won't input the {{ic|Enter}} key.\n \"\\es\": \"\\C-asudo \\C-e\"\n\nAs a last example, quickly send a command in the background with {{ic|Ctrl+Alt+B}}, discarding all of its output:\n \"\\e\\C-b\": \"\\C-e > /dev/null 2>&1 &\\C-m\"\n\n== Disabling control echo ==\n\nReadline causes the terminal to echo {{Ic|^C}} after {{ic|Ctrl+C}} is pressed. For users who wish to disable this, simply add the following to {{Ic|~/.inputrc}}:\n\n set echo-control-characters off\n\n== See also ==\n\n* [http://www.catonmat.net/download/bash-vi-editing-mode-cheat-sheet.pdf vi readline editing cheat sheat]\n* [http://www.catonmat.net/download/readline-emacs-editing-mode-cheat-sheet.pdf emacs readline editing cheat sheet]"
                    }
                ]
            },
            "27808": {
                "pageid": 27808,
                "ns": 0,
                "title": "Readline (Espa\u00f1ol)",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "[[Category:Command-line (Espa\u00f1ol)]]\n[[Category:GNU (Espa\u00f1ol)]]\n[[en:Readline]]\n[[it:Readline]]\n[[ja:Readline]]\n[[zh-hans:Readline]]\n[[ru:Readline]]\n{{TranslationStatus (Espa\u00f1ol)|Readline|2019-03-08|567006}}\n[https://www.gnu.org/software/readline/ Readline] es una biblioteca del [[GNU Project (Espa\u00f1ol)|Proyecto GNU]], utilizada por [[Bash (Espa\u00f1ol)|Bash]] y otros programas con interfaz CLI para editar e interactuar con la l\u00ednea de \u00f3rdenes. V\u00e9ase {{man|3|readline}} para m\u00e1s informaci\u00f3n.\n\n== Instalaci\u00f3n ==\n\nEs probable que el paquete {{Pkg|readline}} ya est\u00e9 instalado como una dependencia de [[Bash (Espa\u00f1ol)|Bash]].\n\n== Modo de edici\u00f3n ==\n\nDe manera predeterminada, Readline utiliza los atajos de estilo [[Emacs (Espa\u00f1ol)|Emacs]] para interactuar con la l\u00ednea de \u00f3rdenes. Sin embargo, la interfaz de edici\u00f3n de estilo [[vi (Espa\u00f1ol)|vi]] tambi\u00e9n est\u00e1n soportados a\u00f1adiendo lo siguiente a {{ic|~/.inputrc}}:\n\n{{hc|~/.inputrc|\n set editing-mode vi}}\n\nAlternativamente, para configurarlo solo para [[Bash (Espa\u00f1ol)|Bash]], a\u00f1ada la siguiente l\u00ednea a {{ic|~/.bashrc}}:\n\n{{hc|~/.bashrc|\n set -o vi}}\n\n=== Indicador de modo en el prompt ===\n\nLa edici\u00f3n de estilo vi tiene dos modos: comando e insertar. Puede visualizar cu\u00e1l est\u00e1 activo actualmente a\u00f1adiendo la siguiente opci\u00f3n:\n\n{{hc|~/.inputrc|\nset show-mode-in-prompt on\n}}\n\nEsto imprimir\u00e1 una cadena en su prompt ({{ic|(cmd)}}/{{ic|(ins)}} por defecto) que se puede personalizar con las variables {{ic|vi-ins-mode-string}} y {{ic|vi-cmd-mode-string}}.\n\n=== Diferentes formas de cursor para cada modo ===\n\nPuede configurar una forma de cursor diferente para cada modo utilizando [https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html#index-vi_002dcmd_002dmode_002dstring \"\\1 .. \\2\" escapes]:\n\n{{hc|~/.inputrc|\nset vi-ins-mode-string \\1\\e[6 q\\2\nset vi-cmd-mode-string \\1\\e[2 q\\2\n}}\n\nEsto establecer\u00e1 un cursor en forma de bloque cuando est\u00e9 en el modo de comando y un cursor de tuber\u00eda cuando est\u00e9 en el modo de inserci\u00f3n. Tenga en cuenta que debe tener activado el indicador de modo para que esto funcione (v\u00e9ase [[#Indicador de modo en el prompt]].\n\nLa consola virtual utiliza diferentes c\u00f3digos de escape, por lo que antes debe verificar qu\u00e9 terminal se est\u00e1 utilizando:\n\n{{hc|~/.inputrc|2=\n$if term=linux\n\tset vi-ins-mode-string \\1\\e[?0c\\2\n\tset vi-cmd-mode-string \\1\\e[?8c\\2\n$else\n\tset vi-ins-mode-string \\1\\e[6 q\\2\n\tset vi-cmd-mode-string \\1\\e[2 q\\2\n$endif\n}}\n\nV\u00e9ase [https://www.kernel.org/doc/Documentation/admin-guide/vga-softcursor.rst Cursor software para VGA] para mas detalles.\n\n== Movimiento r\u00e1pido entre palabras ==\n\n[[Xterm]] permite moverse entre palabras con {{ic|Control+Izquierda}} y {{ic|Control+Derecha}} [http://stackoverflow.com/a/7783928 de forma predeterminada]. Para lograr este efecto con otros emuladores de terminal, encuentre los c\u00f3digos de terminal correctos [http://wiki.bash-hackers.org/scripting/terminalcodes], y con\u00e9ctelos a {{ic|backward-word}} y {{ic|forward-word}} en {{ic|~/.inputrc}}.\n\nPor ejemplo, para [[urxvt (Espa\u00f1ol)|urxvt]]:\n\n{{hc|~/.inputrc|\n\"\\e[1;5D\": backward-word\n\"\\e[1;5C\": forward-word}}\n\n== Historial ==\n\nPor lo general, presionar la tecla de flecha hacia arriba har\u00e1 que se muestre la \u00faltima orden, independientemente de la orden que se haya escrito hasta el momento. Sin embargo, a los usuarios les puede resultar m\u00e1s pr\u00e1ctico listar solo las \u00f3rdenes anteriores \u200b\u200bque coincidan con la entrada actual.\n\nPor ejemplo, si el usuario ha escrito las siguientes \u00f3rdenes:\n\n* {{Ic|ls /usr/src/linux-2.6.15-ARCH/kernel/power/Kconfig}}\n* {{Ic|who}}\n* {{Ic|mount}}\n* {{Ic|man mount}}\n\nEn esta situaci\u00f3n, al escribir {{Ic|ls}} y presionar la tecla de flecha hacia arriba, la entrada actual se reemplazar\u00e1 con {{Ic|man mount}}, la \u00faltima orden ejecutada. Si se ha habilitado la b\u00fasqueda de historial, solo se mostrar\u00e1n las \u00f3rdenes anteriores que comiencen con {{Ic|ls}} (la entrada actual), en este caso {{Ic|ls /usr/src/linux-2.6.15-ARCH/kernel/power/Kconfig}}.\n\nPuede habilitar el modo de b\u00fasqueda de historial a\u00f1adiendo las siguientes l\u00edneas a {{Ic|/etc/inputrc}} o {{Ic|~/.inputrc}}:\n\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n\nSi est\u00e1 utilizando el modo vi, puede a\u00f1adir las siguientes l\u00edneas a {{Ic|~/.inputrc}} (de [https://bbs.archlinux.org/viewtopic.php?pid=428760#p428760 esta publicaci\u00f3n]):\n\n set editing-mode vi\n $if mode=vi\n set keymap vi-command\n # these are for vi-command mode\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n j: history-search-forward\n k: history-search-backward\n set keymap vi-insert\n # these are for vi-insert mode\n \"\\e[A\": history-search-backward\n \"\\e[B\": history-search-forward\n $endif\n\nSi eligi\u00f3 a\u00f1adir estas l\u00edneas a {{Ic|~/.inputrc}}, se recomienda que tambi\u00e9n a\u00f1ada la siguiente l\u00ednea al principio de este archivo para evitar cosas extra\u00f1as como [https://bbs.archlinux.org/viewtopic.php?id=112537 esta]:\n\n $include /etc/inputrc\n\nAlternativamente, se puede utilizar el historial de b\u00fasqueda inversa (b\u00fasqueda incremental) presionando {{ic|Control+R}}, que no busca en base a la entrada anterior, sino que salta hacia atr\u00e1s en el b\u00fafer del historial a medida que se escriben las \u00f3rdenes en la b\u00fasqueda de t\u00e9rminos. Al presionar nuevamente {{ic|Control+R}} durante este modo, se mostrar\u00e1 la l\u00ednea anterior en el b\u00fafer que coincide con el t\u00e9rmino de b\u00fasqueda actual, mientras que al presionar {{ic|Control+G}} (abortar) se cancelar\u00e1 la b\u00fasqueda y se restaurar\u00e1 la l\u00ednea de entrada actual. Entonces, para buscar en todos las \u00f3rdenes {{Ic|mount}} anteriores, presione {{ic|Control+R}}, escriba 'mount' y siga presionando {{ic|Control+R}} hasta que se encuentre la l\u00ednea deseada.\n\nEl equivalente directo de este modo se denomina historial de b\u00fasqueda avanzada y est\u00e1 vinculado a {{ic|Control+S}} de forma predeterminada. Tenga en cuenta que la mayor\u00eda de los terminales anulan {{ic|Control+S}} para suspender la ejecuci\u00f3n hasta que se presione {{ic|Control+Q}}. (A esto se le llama control de flujo XON/XOFF). Para activar el historial de b\u00fasqueda avanzada, deshabilite el control de flujo de esta forma:\n\n $ stty -ixon\n\no utilice una tecla diferente en {{Ic|inputrc}}. Por ejemplo, para utilizar {{ic|Alt+S}} que no est\u00e1 enlazado por defecto:\n\n \"\\es\": forward-search-history\n\n== Completado m\u00e1s r\u00e1pido ==\n\nAl realizar el completado mediante tabulador, una sola pulsaci\u00f3n intenta completar parcialmente la palabra actual. Si no son posibles los completados parciales, una doble pulsaci\u00f3n muestra todas los completados posibles.\n\nLa doble pulsaci\u00f3n de tabulador se puede cambiar a una sola pulsaci\u00f3n con la configuraci\u00f3n siguiente:\n\n{{hc|~/.inputrc|\nset show-all-if-unmodified on\n}}\n\nO puede configurarlo de modo que una sola pulsaci\u00f3n de tabulador realice ambos pasos: que complete parcialmente la palabra ''y'' que muestre todas los completados posibles si a\u00fan es ambigua:\n\n{{hc|~/.inputrc|\nset show-all-if-ambiguous on\n}}\n\n== Colores en el completado ==\n\nPuede habilitar el coloreado del completado de los nombres de archivo con la opci\u00f3n {{ic|colored-stats}}. Tambi\u00e9n puede colorear el prefijo id\u00e9ntico de las listas de completado con {{ic|colored-completed-prefix}}. Por ejemplo:\n\n{{hc|~/.inputrc|\n# Archivos de color por tipos\nset colored-stats On\n# A\u00f1adir un car\u00e1cter para indicar el tipo\nset visible-stats On\n# Marcar directorios enlazados\nset mark-symlinked-directories On\n# Colorea el prefijo com\u00fan\nset colored-completion-prefix On\n# Colorea el prefijo com\u00fan en completado por men\u00fa\nset menu-complete-display-prefix On\n}}\n\n== Macros ==\n\nReadline tambi\u00e9n admite teclas enlazadas para macros de teclado. Para un ejemplo simple, ejecute esta orden en Bash:\n bind '\"\\ew\": \"\\C-e # macro\"'\n\no a\u00f1ada la parte entre comillas simples a inputrc:\n \"\\ew\": \"\\C-e # macro\"\n\nAhora escriba una l\u00ednea y presione {{ic|Alt+W}}. Readline actuar\u00e1 como si se hubiera presionado {{ic|Control+E}} (final de l\u00ednea), a\u00f1adido con '{{Ic| # macro}}'.\n\nUtilice cualquiera de las combinaciones de teclas existentes dentro de una macro de readline, lo que puede ser bastante \u00fatil para automatizar los t\u00e9rminos de uso frecuente. Por ejemplo, este hace que {{ic|Control+Alt+L}} a\u00f1ada \"| less\" a la l\u00ednea y la ejecute ({{ic|Control+M}} es equivalente a {{ic|Intro}}):\n \"\\e\\C-l\": \"\\C-e | less\\C-m\"\n\nEl siguiente prefija la l\u00ednea con 'yes |' al presionar {{ic|Control+Alt+Y}}, confirmando cualquier pregunta de s\u00ed/no que la orden pudiera preguntar:\n \"\\e\\C-y\": \"\\C-ayes | \\C-m\"\n\nEste ejemplo ajusta la l\u00ednea en {{Ic|su -c &#39;&#39;}}, si se presiona {{ic|Alt+S}}:\n \"\\es\": \"\\C-a su -c '\\C-e'\\C-m\"\n\nEste ejemplo prefija la l\u00ednea con {{Ic|sudo }}, si se presiona {{ic|Alt+S}}. Es m\u00e1s seguro porque no introduce la tecla {{ic|Intro}}.\n \"\\es\": \"\\C-asudo \\C-e\"\n\nComo \u00faltimo ejemplo, env\u00ede r\u00e1pidamente una orden en segundo plano con {{ic|Control+Alt+B}}, descartando toda su salida:\n \"\\e\\C-b\": \"\\C-e > /dev/null 2>&1 &\\C-m\"\n\n== Desactivando el control de eco ==\n\nReadline hace que el terminal se haga eco de {{Ic|^C}} despu\u00e9s de presionar {{ic|Control+C}}. Para los usuarios que deseen deshabilitar esto, simplemente a\u00f1ada lo siguiente a {{Ic|~/.inputrc}}:\n\n set echo-control-characters off\n\n== V\u00e9ase tambi\u00e9n ==\n\n* [http://www.catonmat.net/download/bash-vi-editing-mode-cheat-sheet.pdf vi readline editing cheat sheat]\n* [http://www.catonmat.net/download/readline-emacs-editing-mode-cheat-sheet.pdf emacs readline editing cheat sheet]"
                    }
                ]
            }
        }
    }
}