diff --git a/sphinx_doc_src/_static/pygments.css b/sphinx_doc_src/_static/pygments.css index 02625b7e8..7ed4401d2 100644 --- a/sphinx_doc_src/_static/pygments.css +++ b/sphinx_doc_src/_static/pygments.css @@ -79,3 +79,6 @@ .highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ .purple { color: #551a8b } .yellow { color: #FFFF00 } +.red { color: #FF0000 } +.gray { color: #555555 } +.underline { text-decoration: underline } diff --git a/sphinx_doc_src/tutorial.rst b/sphinx_doc_src/tutorial.rst index e6af7dcc3..3a0be43d8 100644 --- a/sphinx_doc_src/tutorial.rst +++ b/sphinx_doc_src/tutorial.rst @@ -82,19 +82,23 @@ Getting Help Syntax Highlighting ------------------- -You'll quickly notice that ``fish`` performs syntax highlighting as you type. Invalid commands are colored red by default:: +.. role:: red +.. role:: gray +.. role:: underline - > /bin/mkd +You'll quickly notice that ``fish`` performs syntax highlighting as you type. Invalid commands are colored red by default +> :red:`/bin/mkd` + A command may be invalid because it does not exist, or refers to a file that you cannot execute. When the command becomes valid, it is shown in a different color:: > /bin/mkdir -``fish`` will underline valid file paths as you type them:: +``fish`` will underline valid file paths as you type them - > cat ~/somefi +> cat :underline:`~/somefi` This tells you that there exists a file that starts with '``somefi``', which is useful feedback as you type. @@ -156,19 +160,19 @@ To redirect stdout and stderr into one file, you need to first redirect stdout, Autosuggestions --------------- -``fish`` suggests commands as you type, and shows the suggestion to the right of the cursor, in gray. For example:: +``fish`` suggests commands as you type, and shows the suggestion to the right of the cursor, in gray. For example - > /bin/hostname +> :red:`/bin/h`:gray:`ostname` -It knows about paths and options:: +It knows about paths and options - > grep --ignore-case +`> grep --i`:gray:`gnore-case` -And history too. Type a command once, and you can re-summon it by just typing a few letters:: +And history too. Type a command once, and you can re-summon it by just typing a few letters - > rsync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo +> :red:`r`:gray:`sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo` To accept the autosuggestion, hit :kbd:`→` (right arrow) or :kbd:`Control+F`. To accept a single word of the autosuggestion, :kbd:`Alt+→` (right arrow). If the autosuggestion is not what you want, just ignore it. @@ -178,15 +182,15 @@ Tab Completions ``fish`` comes with a rich set of tab completions, that work "out of the box." -Press :kbd:`Tab`, and ``fish`` will attempt to complete the command, argument, or path:: +Press :kbd:`Tab`, and ``fish`` will attempt to complete the command, argument, or path - > /pri :kbd:`Tab` => /private/ +> :red:`/pri` :kbd:`Tab` => /private/ -If there's more than one possibility, it will list them:: +If there's more than one possibility, it will list them - > ~/stuff/s :kbd:`Tab` - ~/stuff/script.sh (Executable, 4.8kB) ~/stuff/sources/ (Directory) +> :red:`~/stuff/s` :kbd:`Tab` +~/stuff/script.sh (Executable, 4.8kB) ~/stuff/sources/ (Directory) Hit tab again to cycle through the possibilities.