For example, di=1 4 33 44 would give you bold, underlined yellow text on a blue background. You can also combine a background color code, a foreground color code, and as many attributes as you like.
DEFINE STARTING DIRECTORY XSHELL 5 CODE
Here’s the list of background color codes:įor example, since a blue background is color code 44, you’d use di=44 to use a blue background for directories. For example, you could use di=1 4 33 to make directories bold, underlined yellow. You can also specify more than one attribute. You don’t need to specify 0 for normal text, as normal text is used when you don’t specify an attribute here.įor example, since bold text is color code 1 and yellow text is color code 33, you’d use di=1 33 to make directories bold yellow. When specifying an attribute or more than one color code, separate the list of codes with a semicolon ( ) character. Reversed Text: 7 (This inverts the foreground and background colors, so you’ll see black text on a white background if the current text is white text on a black background.).Blinking Text: 5 (This does not work in most terminal emulators.).Bold or Light Text: 1 (It depends on the terminal emulator.).Here’s the list of text color attributes: Here’s the list of color codes for foreground text:įor example, since yellow text is color code 33, you’d use di=33 to make directories yellow. This uses the same numerical color codes you use when changing the color in your Bash prompt. To assemble your own list, you’ll just need to know the list of color codes and file type codes.
DEFINE STARTING DIRECTORY XSHELL 5 HOW TO
RELATED: How to Customize (and Colorize) Your Bash Prompt Specify as many as you like in the form filetype=color, separating each with a colon (:) character. This is the process for assembling your list of file types and colors. desktop ( *.desktop) is ( =) underlined ( 4 ) cyan ( 36). This tells ls that directories ( di) are ( =) bold ( 1 ) red ( 31) and ( :) any file ending in. We can run the following command to do so: LS_COLORS="di=1:31:*.desktop=4 36" desktop file extension an underlined cyan color, as well. Let’s say we want to make files with the. However, this is just a very simple LS_COLORS variable that defines directories as one color and leaves every other type of file as the default color. The di=1 31 bit tells ls that directories ( di) are ( =) bold ( 1 ) red ( 31).
We can run the following command to do so: LS_COLORS="di=1 31" Let’s say we want to change the color of directories from the default bold blue to bold red. Let’s start a basic example to demonstrate how this works. The default list is long because it specifies different colors for a number of different file types. The LS_COLORS variable contains a list of file types along with associated color codes. However, this makes it easy to do so with a single, quick command. You can always sign out and sign back in or close and reopen a terminal window to restore the colors to their default setting. Your changes are always temporary until you edit a file to make them your new defaults.