From 18df41e5e61d814891eab4d6aea64e6b5908c954 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 12 Aug 2022 21:27:42 +0200 Subject: [PATCH] Document ctrl-r harder, add something on set -x --- doc_src/faq.rst | 4 +++- doc_src/fish_for_bash_users.rst | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc_src/faq.rst b/doc_src/faq.rst index eba01abba..b4802782c 100644 --- a/doc_src/faq.rst +++ b/doc_src/faq.rst @@ -154,7 +154,9 @@ in :ref:`config.fish `. How do I run a command from history? ------------------------------------ -Type some part of the command, and then hit the :kbd:`↑` (up) or :kbd:`↓` (down) arrow keys to navigate through history matches. Additional default key bindings include :kbd:`Control`\ +\ :kbd:`P` (up) and :kbd:`Control`\ +\ :kbd:`N` (down). See :ref:`Searchable command history ` for more information. +Type some part of the command, and then hit the :kbd:`↑` (up) or :kbd:`↓` (down) arrow keys to navigate through history matches, or press :kbd:`Control`\ +\ :kbd:`R` to open the history in a searchable pager (and press :kbd:`Control`\ +\ :kbd:`S` to move to older history). + +Additional default key bindings include :kbd:`Control`\ +\ :kbd:`P` (up) and :kbd:`Control`\ +\ :kbd:`N` (down). See :ref:`Searchable command history ` for more information. Why doesn't history substitution ("!$" etc.) work? -------------------------------------------------- diff --git a/doc_src/fish_for_bash_users.rst b/doc_src/fish_for_bash_users.rst index 753d2b38c..47d28e2c6 100644 --- a/doc_src/fish_for_bash_users.rst +++ b/doc_src/fish_for_bash_users.rst @@ -446,3 +446,11 @@ By now it has become apparent that fish puts much more of a focus on its builtin - :ref:`status ` provides information about the shell status, e.g. if it's interactive or what the current linenumber is. This replaces ``$-`` and ``$BASH_LINENO`` and other variables. - ``seq(1)`` can be used as a replacement for ``{1..10}`` range expansion. If your OS doesn't ship a ``seq`` fish includes a replacement function. + +Other facilities +---------------- + +Bash has ``set -x`` or ``set -o xtrace`` to print all commands that are being executed. In fish, this would be enabled by setting :envvar:`fish_trace`. + +Or, if your intention is to *profile* how long each line of a script takes, you can use ``fish --profile`` - see the :ref:`page for the fish command `. +