FreeBSD default Shell renklendirme rehberi

Kaptan Yosun

Discord: kaptanyosun
Premium Üye
Usta Üye
Mesaj
468
Çözümler
16
Beğeni
296
Puan
829
Tek faydası okuma, anlama ve analiz kolaylığıdır. Bu adresten alıntıdır:
Linkleri görebilmek için giriş yap veya kayıt ol.


Oh My ZSH gibi custom sheller daha hoş görünse de herhangi bir tecrübeli UNIX adminine sorarsanız size root üzerinde yalnızca FreeBSD ile gelen default shellerden birini kullanmanızı önerecektir. Sebebi custom shell'ler ile bir hata yaptığınızda root'a su yapmanızın olanağı olmayacağından büyük sorunlarla karşılaşabilirsiniz. Bu rehberde FreeBSD'nin varsayılan shell'i olan CSH'i renklendireceğiz.

Benim tercihim kullanıcı tabanlı CSH özelleştirme dosyasındaki yorum satırları hariç her şeyi silip sistem geneli CSH özelleştirme dosyasını düzenlemek. Bu yüzden /root/.cshrc dosyasını açıp baştaki yorum satırları hariç bütün satırları silin. Sonra /etc/csh.cshrc dosyasını açıp içeriğini bununla değiştirin:

Bash:
# $FreeBSD$
#
# System-wide .cshrc file for csh(1).
#
# Theme by Debloat

umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)

set color

setenv EDITOR ee
setenv PAGER less
setenv BLOCKSIZE K

setenv LSCOLORS ExGxfxcxBxegehbhbgacad
setenv LS_COLORS "di=1;34:ln=1;36:so=35:pi=32:ex=1;31:bd=34;46:cd=34;47:su=31;47:sg=31;46:tw=30;42:ow=30;43"

alias h history 25
alias j jobs -l
alias la ls -aFG
alias lf ls -FAG
alias ll ls -lAFG
alias ls ls -G

set red="%{\033[1;31m%}"
set green="%{\033[1;32m%}"
set yellow="%{\033[1;33m%}"
set blue="%{\033[1;34m%}"
set magenta="%{\033[1;35m%}"
set cyan="%{\033[1;36m%}"
set white="%{\033[1;37m%}"

#This is needed at the end of the prompt
set end="%{\033[0m%}"

if ($?prompt) then
# An interactive shell -- set some stuff up
    set prompt = "${red}%N@%m:${green}%~${white} %# ${end}"
    set promptchars = "%#"

    set filec
    set history = 1000
    set savehist = (1000 merge)
    set autolist = ambiguous
# Use history to aid expansion
    set autoexpand
    set autorehash
    set mail = (/var/mail/$USER)
    if ( $?tcsh ) then
        bindkey "^W" backward-delete-word
        bindkey -k up history-search-backward
        bindkey -k down history-search-forward
    endif
endif

# Clean up after ourselves...
unset red green yellow blue magenta cyan yellow white end

Screenshot_1.png
 
en alttaki programın adı ne powershellse bende böyle açılmıyor neden yav
 
Geri
Üst