Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should command line examples be "cut and paste" ready? #4883

Closed
dbkinder opened this issue Nov 10, 2017 · 2 comments
Closed

Should command line examples be "cut and paste" ready? #4883

dbkinder opened this issue Nov 10, 2017 · 2 comments

Comments

@dbkinder
Copy link
Contributor

With multi-line command line (bash) examples, it's convenient for users to just cut and paste them into a terminal window. Our examples (mostly) start with a $ on each line, making it inconvenient to cut and paste examples such as:

$ cd $ZEPHYR_BASE/tests/booting/stub

# Make a build directory, and use cmake to configure a Make-based build system:
$ mkdir build && cd build
$ cmake -DBOARD=arduino_101 ..

# Now run make on the generated build system:
$ make flash

vs.

cd $ZEPHYR_BASE/tests/booting/stub

# Make a build directory, and use cmake to configure a Make-based build system:
mkdir build && cd build
cmake -DBOARD=arduino_101 ..

# Now run make on the generated build system:
make flash

For examples that mix command and their output, I'm personally in favor of putting the $ in, but for multi-line examples (without output) not using the $ makes more sense.

Your thoughts?

@andrewboie
Copy link
Contributor

For examples that mix command and their output, I'm personally in favor of putting the $ in, but for multi-line examples (without output) not using the $ makes more sense.

+1

@nashif
Copy link
Member

nashif commented Aug 14, 2018

Samples are mostly c/p ready, it depends on how complex the sample is, but for most part, you can just copy and paste them.

@nashif nashif closed this as completed Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants