In a markdown document I'd like my root prompt in a bash's code block doesn't look like a comment line like this :
root#docker:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bash latest f72dd207f6f4 2 weeks ago 13.6MB
I have tried the usual escaping methods whitch do not work because is code block :
\\#
\#
##
#
Is there a way to achieve an hash sign for making a root prompt without making a comment line ?
Thanks.
Related
I am coding HTML & CSS in VS Code IDE. I have installed & enabled the prettier extension for better readability of the code & auto-indentation. but my content of tags is not going beyond that certain point on the screen & it is getting added to the next line whenever I save my code by Ctrl +S (example: see the last paragraph tag). How to get that content on the same line?
You shouldn't use Prettier if you don't need this behavior. That's what Prettier does: splits lines that are too long. See here https://prettier.io/docs/en/index.html
I'm working with a shell script in VSCode,
I'd like to be able to collapse the function.
In order for me to do that, the 'EOF' word has to have some whitespace before it.
But if I put whitespace before it, the entire coloring of the file is ruined (including all the functions appearing thereafter)
Is there a setting / or another way to do it so it will not behave like this?
Thanks
With EOF word at the beginning of the line
With some whitespace before the EOF
I try to use a proper macro like .Bl with its .It to render list in mandoc (or per say man page) with the following syntax (as seen in mdoc.7)
The arguments are as follows:
.Bl -tag -width Ds
.It Fl v
Print verbose information.
.El
Tried both on macOS and Ubuntu 16.04 by putting into .SH DESCRIPTION, and it doesn't render expected output. All I see is
The arguments are as follows: Print verbose information.
The steps I do this is
Edit mandoc file
Symlink it to target file at /usr/local/share/man/man3/
See result by man <filename>
PS. I didn't go any gzip.
What did I miss? How can I properly render list in mandoc?
Instead, I look at mandoc's code of /usr/share/man/man1/bash.1 in which I view such man page via man /usr/share/man/man1/bash.1 for safety to ensure I view the right file.
It uses the following syntax
.TP 10
.BI Item Name
Item description
.TP
.BI Item Name 2
Item 2 description
This will properly renders those two items in which the first column has 10 character in width. The second item will use the same column width as defined before. Much cleaner and simpler than what I tried but with not success in the question.
You will see the following output using above syntax
I would like to ask for your help! There is a text file (target.txt) and I would like to crop some lines from it. I thought it would be a good approach to add these lines to a separate file (to_crop.txt) and write a script which parse the target.txt file for the exact content in the to_crop.txt and when it finds and crops it the result file would be overwritten back to the target.txt (make it smaller).
(Why I need this? During a command line installs script I had to append a config file with some parameter lines (#starthere command #finishere) like:
star there
command xyx,bla bla
finish here
I need to create an uninstall script which removes these lines from this config file.) I would like to use a cmd file in command prompt to do it. Thanks for your ideas in advance!
Use sed, the stream editor: sed.
I am trying to use the doxygen to generate a user help, when I use the command \tableofcontents in the mainpage, nothing shows in the html output.I just don't know why, does anyone know how to use the command of tableofcontents? Some examples will be better, thanks!
Note that the browser is OK.
The solution key is to add a label to your headlines:
This is a level 1 header {#labelid_H1}
========================
This is a level 2 header {#labelid_H2}
------------------------
# This is a level 1 header # {#labelidH1}
## This is level 2 header ## {#labelidH2}
Then table of contents [TOC]
[TOC]
as well as headline links
[Link to first headline](#ref labelid_H1)
[Link to second headline](#labelid_H2)
are working.
Another point to mention is that Doxygen eats up the first line in the file that's used as mainpage (look for "Eat my shorts, Doxygen!" in: Use the README.md file as main page in Doxygen)