Skripte einbinden¶
Code und Skripte können includiert oder direkt eingebunden werden.
Komplett¶
Quelle
.. literalinclude:: files/screenrc
:language: bash
Ergebins
rdstatus on
hardstatus alwayslastline
caption always "%{rw} * %H * | $LOGNAME | %{bw}%c %D |%{-}%-Lw%{rw}%50>%{rW}%n%f* %t %{-}%+Lw%<"
bindkey ^e screen -t projekte cd /projekte/
bindkey ^f screen -t postfix cd /etc/postfix
#hardstatus string "%w%=%m/%d %c"
Ausgewählte Zeilen¶
Quelle
.. literalinclude:: files/screenrc
:language: bash
:lines: 1, 4-5
Ergebins
rdstatus on
bindkey ^e screen -t projekte cd /projekte/
bindkey ^f screen -t postfix cd /etc/postfix
Zeilennummern einblenden¶
Quelle
.. literalinclude:: files/screenrc
:language: bash
:lines: 1, 4-5
:linenos:
Ergebins
1rdstatus on
2bindkey ^e screen -t projekte cd /projekte/
3bindkey ^f screen -t postfix cd /etc/postfix
Zeilennummern einblenden¶
Quelle
.. literalinclude:: files/screenrc
:language: bash
:linenos:
:emphasize-lines: 3,5
Ergebins
1rdstatus on
2hardstatus alwayslastline
3caption always "%{rw} * %H * | $LOGNAME | %{bw}%c %D |%{-}%-Lw%{rw}%50>%{rW}%n%f* %t %{-}%+Lw%<"
4bindkey ^e screen -t projekte cd /projekte/
5bindkey ^f screen -t postfix cd /etc/postfix
6#hardstatus string "%w%=%m/%d %c"
Codeblöcke¶
Statt eine Datei einzubinden, kann der Code auch direkt in den Text integriert werden.
Quelle
.. code-block:: python
:emphasize-lines: 3,5
def some_function():
interesting = False
print('This line is highlighted.')
print('This one is not...')
print('...but this one is.')
Ergebnis
def some_function():
interesting = False
print('This line is highlighted.')
print('This one is not...')
print('...but this one is.')