環境
- Windows10
- WSL
わからないこと
bashのパス表示やls
コマンドを使った時のフォルダの色分けを変えたい。
現状
bashのパス表示が薄灰色で見づらい。また、ls
コマンドでフォルダの中身を見たときに黄色のマーカーがついてしまって見づらい。
解決のために、ホームディレクトリに.dircolors
というフォルダを作ってeval ` dircolors ~/.dircolors`
というコマンドを打ちましたが、エラーも出ず、表示にも何も変化なしといった感じです。.dircolors
は下のような内容です。
bash
1COLOR tty 2# Extra command line options for ls go here. 3# Basically these ones are: 4#-F = show '/' for dirs, '*' for executables, etc. 5#-T 0 = don't trust tab spacing when formatting ls output. 6OPTIONS -F -T 0 7 8# Below, there should be one TERM entry for each termtype that is colorizable 9TERM linux 10TERM console 11TERM con132x25 12TERM con132x30 13TERM con132x43 14TERM con132x60 15TERM con80x25 16TERM con80x28 17TERM con80x30 18TERM con80x43 19TERM con80x50 20TERM con80x60 21TERM cons25 22TERM xterm 23TERM rxvt 24TERM xterm-color 25TERM color-xterm 26TERM vt100 27TERM dtterm 28TERM color_xterm 29 30# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) 31EIGHTBIT 1 32 33# Below are the color init strings for the basic file types. A color init 34# string consists of one or more of the following numeric codes: 35# Attribute codes: 36# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 37# Text color codes: 38# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 39# Background color codes: 40# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 41NORMAL 00 # global default, although everything should be something. 42FILE 00 # normal file 43#DIR 04;34 # directory 44OTHER_WRITABLE 00;33 45LINK 01;36# symbolic link 46FIFO 40;33# pipe 47SOCK 01;35# socket 48BLK 40;33;01# block device driver 49CHR 40;33;01# character device driver 50ORPHAN 01;05;37;41# orphaned syminks 51MISSING 01;05;37;41 # ... and the files they point to 52 53# This is for files with execute permission: 54EXEC 01;32 55 56# List any file extensions like '.gz' or '.tar' that you would like ls 57# to colorize below. Put the extension, a space, and the color init string. 58# (and any comments you want to add after a '#') 59.cmd 01;32 # executables (bright green) 60.exe 01;32 61.com 01;32 62.btm 01;32 63.bat 01;32 64.sh 01;32 65.csh 01;32 66.tar 01;31 # archives or compressed (bright red) 67.tgz 01;31 68.arj 01;31 69.taz 01;31 70.lzh 01;31 71.zip 01;31 72.z 01;31 73.Z 01;31 74.gz 01;31 75.bz2 01;31 76.bz 01;31 77.tz 01;31 78.rpm 01;31 79.cpio 01;31 80.jpg 01;35 # image formats 81.gif 01;35 82.bmp 01;35 83.xbm 01;35 .xpm 01;35 84.png 01;35 85.tif 01;35
どこが間違っているかわかる方がいたらお教え願います。
追記:
bash上で
bash
1dircolors ~/.dircolors
と入力すると、次のようなものが出てきました。
bash
1LS_COLORS='' 2export LS_COLORS
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/05 14:08
2018/08/05 14:26
2018/08/08 08:26
2018/08/08 13:02
2018/08/08 15:29
2018/08/11 12:22