Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@7of9

Qiita > syntax-highlighting > bashとshell-sessionの違い

比較1

shell-session

$ ls -lrt
$ history
 2052  cd 170722_learn_realm_imagm/
 2053  ls
 2054  python3 learn_mr_mi_170819.py 

bash

$ ls -lrt
$ history
 2052  cd 170722_learn_realm_imagm/
 2053  ls
 2054  python3 learn_mr_mi_170819.py 

どちらを使うか?

プレビュー画面では下図のように違いが分かりやすい。

qiita.png

記事になった時点で見やすさが低下しているように思われる。

  • コマンドの色がなくなる
  • 実行結果の薄色表示がなくなる (shell-session)
  • オプションに色がつく
    • -lrtに目がもってかれる

読者の読みやすい書き方:未調査

比較2

keep_env_180106_exec
#!/usr/bin/env bash

addacfg="-grid 32 -eq_rad 4.24478229"

echo $addacfg

上記を実行した場合。

shell-session
$ bash -x keep_env_180106_exec 
+ addacfg='-grid 32 -eq_rad 4.24478229'
+ echo -grid 32 -eq_rad 4.24478229
-grid 32 -eq_rad 4.24478229
bash
$ bash -x keep_env_180106_exec 
+ addacfg='-grid 32 -eq_rad 4.24478229'
+ echo -grid 32 -eq_rad 4.24478229
-grid 32 -eq_rad 4.24478229
txt
$ bash -x keep_env_180106_exec 
+ addacfg='-grid 32 -eq_rad 4.24478229'
+ echo -grid 32 -eq_rad 4.24478229
-grid 32 -eq_rad 4.24478229
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
3
Help us understand the problem. What are the problem?