Share your .tcshrc file

history flags (-chrSLMT)
Found it here
Vqz77dh.png
 
Last edited by a moderator:
Also found few very usable ~/.tcshrc options, that are not described in this theme yet.
To notify you when someone logs in or out,
OE8wWxE.png

add
Code:
	set watch = (0 any any)
to ~/tcshrc.

And to add the date to the history command,
LbVsio4.png

add
Code:
	set histfile = "$HOME/.csh_history"
	set savehist = (5000 merge)
	set history = (5000 "%h %D-%W-%Y %T %R\n")
to ~/tcshrc.
 
Last edited by a moderator:
Here is my full ~/.tcshrc, with few examples, may be it will be interesting for someone,
Personally I would be very happy if I found post like this when I started with tcsh.
It's tested and seems to be working fine, few things were taken from shells/tcshrc,
others from tcsh(1) and tcsh.org manuals, or from few some other posts, on the web…

It has some interesting features, for example:
cd is an ailas of pushd,
so every time you 'cd' into directory, directory saves to the directory stack,
so, for example, you can use popd to to return to the previous directory
isojmMA.gif

(to disable printing of the directory stack use set pushdsilent.)
(to clean the directory stack use dirs -c, to add current dir and list — dirs -l [learn more]).
But if you don't need to save directory to directory stack,
just don't use cd, "implicitcd" option is enabled,
so you do not need to use cd to change directories,
just type path
Ftknx0r.png

Also " cd" without arguments takes you to your home dir, because "pushdtohome" option is enabled.


Code:
# update and save history after each command
alias postcmd	'history -S'
It works like "setopt SHARE_HISTORY" in zsh, it should be placed at the end of ~/.tcshrc.


Also I use security/doas with some apps,
so I got few aliases for it,
Code:
# doas alias-es
alias vm	'doas vm'
alias ezjail	'doas ezjail-admin'
So with it I can use sysutils/vm-bhyve and sysutils/ezjail without sudo,
to manipulate bhyve virtual machines and jails. To make it possible you need to install security/doas,
also you need to create /usr/local/etc/doas.conf:
Code:
permit nopass keepenv :wheel cmd vm
permit nopass keepenv :wheel cmd ezjail-admin
your user should be in a wheel group — # pw groupmod wheel -m [i]username[/i]
(relogin after this command, to update your groups),

PO5mr0u.png



"autorehash" option is set to "always", so you don't need to type rehash manually after each package installation,
because the list of available commands will be rebuilt, for each command completion or spelling correction attempt.


"LSCOLORS" environment variable sets colors in cli apps, like /bin/ls,
you can create your own color set here.


"correct" option is set, so spelling-correction works,
you can edit your "correct" message with (it is a default value)
Code:
set prompt3 = "CORRECT>%R (y|n|e|a)?"
QukZfQq.png



"listjobs" option is set, so all active jobs will be listed when your current job is suspended (use ctrl+z to suspend).
GUUghpT.gif


With "listflags" option, you can add flags to "autolist" (ls-F, builtin ls), which is called by TAB key,
for example,
Code:
set listflags  = a

Full ~/.tcshrc:
Code:
# # # .tcshrc - tcsh resource script, read at beginning of execution by each shell # # #

# skip configuration if shell is not an interactive shell
if ( $?prompt3 == 0 ) exit

setenv		EDITOR		'vim'
setenv		PAGER		'less'
setenv		LESS		'-Airs'
setenv		GREP_COLOR	'1;31'
setenv		CLICOLOR	'1'
setenv		LSCOLORS	'cxfxdxbxexeafaachcagbg'

set path = ( $path $HOME/.local/bin )
set prompt = " %{\033[0;32m%}%C%{\033[0m%} %# "
set prompt3 = "	%R ? (y|n|e|a) "
set promptchars = "%#"
set history = (2000 "%h %D.%W %T %R\n")
set savehist = (2000 merge)
set histfile = "$HOME/.history"
set histdup = erase		 # erase duplicate history events
set watch = (0 any any)		 # notify when someone logs in or out
set who = "%n %a %l from %m"	 # format for watch messages
set notify			 # notification when jobs change state
set listjobs			 # all jobs are listed when a job is suspended
set implicitcd			 # change directory without cd
set symlinks = chase		 # symbolic link is expanded to the real name of the directory
set autocorrect			 # spell-word editor command is invoked automatically
set autoexpand			 # run expand-history before each completion attempt
set autolist = ambiguous	 # choices are listed only when completion fails
set autorehash = always		 # update $PATH after each completion or spelling correction attempt
set correct = cmd		 # commands are automatically spelling-corrected
set complete = enhance		 # completion ignores case and considers hyphens and underscores
set matchbeep = nomatch		 # beeps only when there is no match
set color			 # enables colors for the builtin autolist (TAB)
set rmstar			 # user is prompted before `rm *' is executed
set pushdtohome			 # pushd without arguments does `pushd ~'
#set listflags  = a		 # flags for autolist (TAB)
#set colorcat			 # enables color escape sequence for NLS message files (to make it work, you need to define COLORCAT in /usr/src/contrib/tcsh/config_f.h and recompile tcsh (rebuild world))
# format of `time' command
set time=(8 "\
Time spent in user mode       : %Us\
Time spent in kernel mode     : %Ss\
Total time                    : %Es\
CPU utilisation (percentage)  : %P\
Times the process was swapped : %W\
Times of major page faults    : %F\
Times of minor page faults    : %R")

alias cd	'pushd'
alias c		'cat'
alias q		'exit'
alias h		'history 25'
alias j		'jobs -l'
alias f		'psearch'
alias F		'find . -type f'
alias ff    	'find . -name $*'
alias p		'cd /usr/ports && cd'			 # use it like "p www/firefox"
alias grep	'grep --color'
alias gnugrep	'/usr/local/bin/grep --color'
alias g		'grep -i'
alias v		'vim'
alias .		'pwd'
alias ...	'../..'
alias ls	'ls -F'
alias la	'ls -a'
alias ll	'ls -lht'
alias l		'ls'
alias mkdir	'mkdir -p'
alias s		'sudo'
alias ss	'sudo su -'
alias stat	'stat -x'
alias date	'date +"%d-%m-%Y, %H:%M"'
alias tkill	'tmux kill-session -t'
alias cputemp	'sysctl -a | grep "dev.cpu.*.temperature"'
# doas alias-es
alias vm		'doas vm'
alias ezjail-admin	'doas ezjail-admin'

bindkey -k up history-search-backward	 # up
bindkey -k down history-search-forward	 # down
bindkey '\e[1;5A' i-search-back		 # ctrl+up
bindkey '\e[1;5B' i-search-fwd		 # ctrl+down
bindkey '\e[3~' delete-char		 # delete
bindkey '\e[1;5D' backward-word		 # ctrl+left
bindkey '\e[1;5C' forward-word		 # ctrl+right
bindkey '\e[3;3~' delete-word		 # alt+delete
bindkey '\e[1;3C' delete-word		 # alt+right
bindkey '\e[1;3D' backward-delete-word	 # alt+left
bindkey "\e[1~" beginning-of-line	 # home
bindkey "\e[4~" end-of-line		 # end
# rxvt key bindings
bindkey '\eOd' backward-word		 # ctrl+left
bindkey '\eOc' forward-word		 # ctrl+right
bindkey '\e^[[3~' delete-word		 # alt+delete
bindkey '\e^[[C' delete-word		 # alt+right
bindkey '\e^[[D' backward-delete-word	 # alt+left
bindkey "\e[7~" beginning-of-line	 # home
bindkey "\e[8~" end-of-line		 # end

# start tmux with shell
#if (! $?TMUX) exec tmux -l2

# update and save history after each command
alias postcmd	'history -S'
 
Last edited by a moderator:
finally… "csh shell history is puzzled", because of this problem I've even switched to zsh.
But it seems that new version doesn't have this problem anymore.

But I'm really missing one feature,
I want to be able to save my tcsh history after each tcsh command.
"alias precmd 'history -L; history -S'" saves, but it also adds some strange history events
OPIM99k.png


UPD: Solved. It seems
Code:
if ($?prompt3) then
    alias postcmd    'history -S'     # update and save history after each command
endif
do the job, without any issues.

Hello ILUXA!

With csh(1) you cannot remove ~ and @ symbols? And can you change with csh(1) the color of user and root? Sorry I'm very confused about this, give me a hand how to proceed with csh(1), I use csh on UFS files for FreeBSD system of 64-bit.
 
Hello. Add
Code:
set prompt = "%{\033[0;32m%}%C%{\033[0m%} %# "
to ~/.cshrc and
Code:
set prompt = "%{\033[0;31m%}%C%{\033[0m%} %# "
to /root/.cshrc.


But if you want to be able to solve your problems by yourself,
you need to READ (for example links that I provided to you in another topic)
and to analyze that you were reading, without this, you'll never be able to solve any issue.
 
Nothing special: .cshrc

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


alias df   df -H
alias h       history 25
alias j       jobs -l
alias la   ls -aF
alias lf   ls -FA
alias ll   ls -lAF


if ( -X nvim ) then
   setenv   EDITOR   nvim
   alias   vi   nvim
else if (-X vi) then
   setenv   EDITOR   vi
endif


setenv   BLOCKSIZE       M
setenv    CLICOLOR       1
setenv   PAGER           more

setenv   TERMINAL       urxvtc
setenv   PANEL_FIFO       /tmp/panel-fifo
setenv   QT_QPA_PLATFORMTHEME   qt5ct
setenv   XDG_MENU_PREFIX       lxde-


if ($?prompt) then

   set autoexpand
   set color
   set colorcat
   set filec
   set autolist    = ambiguous
   set correct    = cmd
   set history    = 2048
   set histfile    = ~/.csh_history
   set mail    = (/var/mail/$USER)
   set savehist   = (1024 merge)
   
   set autorehash    = always

   set grey    = "%{\033[1;30m%}"
   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%}"

   set end    = "%{\033[0m%}"

       if ($tty =~ ttyv*) then

           if ( $USER == root ) then
               set prompt = "\n${blue}%~ ${red}%N@%m: \n>>>${end} "
           else
               set prompt = "\n${red}%~ ${blue}%m: \n>>>${end} "
           endif

       else

           if ( $USER == root ) then
               set prompt = "\n${blue}%~ ${red}%N@%m: \n❱❱❱${end} "
           else
               set prompt = "\n${red}%~ ${blue}%m: \n❱❱❱${end} "
           endif

       endif

   unset grey red green yellow blue magenta cyan white end
   
   if ( $?tcsh ) then
           bindkey "^[Od"       backward-word       # rxvt
           bindkey "^[Oc"       forward-word       # rxvt
           bindkey   "\e[2~"       overwrite-mode
           bindkey   "\e[3~"       delete-char
           bindkey   "\e[1;5C"   forward-word
           bindkey   "\e[1;5D"   backward-word
           bindkey   "\e[5~"       history-search-backward
           bindkey   "\e[6~"       history-search-forward
           bindkey   "^W"       backward-delete-word
   endif
   
endif
 
~/.cshrc
Code:
alias ls	ls -G
alias ls  ls -G
alias svn /usr/bin/svnlite
alias svnadmin /usr/bin/svnliteadmin
alias svnlook /usr/bin/svnlitelook
alias svnsync /usr/bin/svnlitesync
alias time  /usr/bin/time

setenv CLICOLOR 1
setenv EDITOR vim
setenv LANG hu_HU.UTF-8
setenv LC_ALL hu_HU.UTF-8
setenv LESS "-Ri"
setenv LSCOLORS GefhcxdxgXegedabagacad
setenv PAGER less
setenv PATH /sbin/:/usr/sbin/:/usr/bin:/bin:/usr/local/libexec/ccache:/home/zsolt/bin:/usr/local/bin:/sbin/:/usr/sbin/:/home/zsolt/bin:/usr/local/bin

if ($?prompt) then
  # An interactive shell -- set some stuff up

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

set coredumpsize=0

~/.login
Code:
complete git \
  'p/1/(add commit rm status diff push pull)/' \
  'n@diff@`git status -s | sed -n "/^ M/ s,^ M ,,p"`@' \
  'n@add@`git status -s | sed -n "/^??/ s,^?? ,,p"`@' \
  'n@commit@`git status -s | sed -n "/^[A ]/ s,^...,,p" ; echo .`@' \
  'n@push@`git remote`@'

set mandir="/usr/share/man/man* /usr/local/man/man*"
set pdf="f:*.[pP][dD][fF]"

complete cd \
  'p/1/d/'

complete chown \
  'p/1/u/'

complete complete \
  'p/1/X/'

complete dd \
  'c/[io]f=/f/ n/*/"(if of ibs obs bs skip seek count)"/='

complete doas \
  'p@1@`sed "s,.*cmd *\([^ ]*\).*,\1," /usr/local/etc/doas.conf`@'

complete find \
  'n/-fstype/"(nfs 4.2)"/' 'n/-name/f/' \
  'n/-type/(c b d f p l s)/' \
  'n/-user/u/ n/-group/g/' \
  'n/-exec/c/' 'n/-ok/c/' \
  'n/-cpio/f/' \
  'n/-ncpio/f/' \
  'n/-newer/f/' \
  'c/-/(fstype name perm prune type user nouser group nogroup size inum atime mtime ctime exec \
    ok print ls cpio ncpio newer xdev depth daystart follow maxdepth mindepth noleaf version \
    anewer cnewer amin cmin mmin true false uid gid ilname iname ipath iregex links lname empty path \
    regex used xtype fprint fprint0 fprintf print0 printf not a and o or)/' \
  'n/*/d/'

complete gpart \
  'p/1/(add backup bootcode commit create delete destroy modify recover resize restore set show undo unset)/' \
  'n/add/x:-t type [-a alignment] [-b start] [-s size] [-i index] [-l label] -f flags geom/' \
  'n/backup/x:geom/' \
  'n/bootcode/x:[-b bootcode] [-p partcode -i index] [-f flags] geom/' \
  'n/commit/x:geom/' \
  'n/create/x:-s scheme [-n entries] [-f flags] provider/' \
  'n/delete/x:-i index [-f flags] geom/' \
  'n/destroy/x:[-F] [-f flags] geom/' \
  'n/modify/x:-i index [-l label] [-t type] [-f flags] geom/' \
  'n/recover/x:[-f flags] geom/' \
  'n/resize/x:-i index [-a alignment] [-s size] [-f flags] geom/' \
  'n/restore/x:[-lF] [-f flags] provider [...]/' \
  'n/set/x:-a attrib -i index [-f flags] geom/' \
  'n/show/x:[-l | -r] [-p] [geom ...]/' \
  'n/undo/x:geom/' \
  'n/unset/x:-a attrib -i index [-f flags] geom/'

complete grep \
  'c/-*A/x:<#_lines_after>/' \
  'c/-*B/x:<#_lines_before>/' \
  'c/--/(extended-regexp fixed-regexp basic-regexp regexp file ignore-case word-regexp line-regexp \
    no-messages revert-match version help byte-offset line-number with-filename no-filename quiet silent \
    text directories recursive files-without-match files-with-matches count before-context after-context \
    context binary unix-byte-offsets)/' \
  'c/-/(A a B b C c d E e F f G H h i L l n q r s U u V v w x)/' \
  'p/1/x:<limited_regular_expression>/ N/-*e/f/' \
  'n/-*e/x:<limited_regular_expression>/' \
  'n/-*f/f/' \
  'n/*/f/'

complete herbstclient \
  'p/*/`set cmd="${COMMAND_LINE}x"; \
    set cmd=( ${cmd:s,herbstclient,,} ); \
    set cmd_nr=${#cmd} ; \
    @ cmd_nr-- ; \
    herbstclient complete_shell ${cmd_nr} ${COMMAND_LINE:s,herbstclient,,}`/'

complete ifconfig \
  'p@1@`ifconfig -l`@' \
  'n/*/(range phase link netmask mtu vlandev vlan metric mediaopt down delete broadcast arp debug)/' \
  'c/%/j/' \
  'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/'

complete kill \
  'c/-/S/' \
  'c/%/j/' \
  'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/'

complete killall \
  'c/-/S/' \
  'c/%/j/' \
  'n/*/`ps -ax | awk '"'"'{print $5}'"'"'`/'

complete kldload \
  'n@*@`ls -1 /boot/modules/ /boot/kernel/ | awk -F/ \$NF\ \~\ \".ko\"\ \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\}`@'

complete kldunload \
  'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name`@'

complete localc \
  'p/*/f:*.{xls,xlsx}/'

complete lowriter \
  'p/*/f:*.{doc,docx}/'

complete make \
  'p@1@`make -V.ALLTARGETS`@'

complete man \
  'C@*@`find ${mandir} -type f -name \*.gz | sed "s,.*/,, ; s,\.[^\.]*\.gz,,"`@'

complete mupdf \
  "p/*/${pdf}/"

complete okular \
  "p/*/${pdf}/"

complete pdflatex \
  'p/*/f:*.tex/'

complete service \
  'c/-/(e l r v)/' \
  'p/1/`service -l`/' \
  'n/*/(start stop reload restart status rcvar onestart onestop)/'

complete sysctl \
  'n/*/`sysctl -Na`/'

complete tmux \
  'n/*/(attach detach has kill-server kill-session lsc lscm ls lockc locks new refresh rename showmsgs source start suspendc switchc)/'

set _task_date="modified.after:2016-01-01"
complete task \
  'c/pri:/(L M H)/' \
  'c/project:/`task ${_task_date} _unique project`/' \
  'n/[0-9]*/(annotate edit modify done)/' \
  'p/2-/(project pri due)/:/' \
  'p/1/`echo add list ; task _unique id`/'

complete unrar \
  'p/*/f:*.rar/'

complete unzip \
  'p/*/f:*.zip/'

complete which \
  'C/*/c/'

complete zathura \
  "p/*/${pdf}/"

alias _comp_pkgs 'pkg info -q'
alias _comp_pkg_info '_comp_pkgs | xargs echo --list-files --pkg-message --comment --dependencies --required-by --size'
alias _comp_pkg_install 'sqlite3 /var/db/pkg/repo-FreeBSD.sqlite "select name from packages;"'

complete pkg \
  'p/1/(annotate autoremove delete info install iv rquery ri rv rw query search uv ur which)/' \
  'n/info/`_comp_pkg_info`/' \
  'N/info/`_comp_pkgs`/' \
  'n/delete/`_comp_pkgs`/' \
  'n/install/`_comp_pkg_install`/' \
  'n/rv/`pkg rquery "%n" | uniq`/' \
  'n/ri/`pkg rquery "%n" | uniq`/' \
  'n/rw/`pkg rquery "%n" | uniq`/' \

set _svn_commands=( add blame cat checkout cleanup commit copy delete diff export help import info \
  list ls lock log merge mkdir move propdel propedit propget proplist propset \
  resolved revert status switch unlock update )
set _svnsync_commands=( init sync copy-revprops info help )
set _svnsync_list=( \
  file:///home/storage/svn/server-dotfiles \
  file:///home/storage/svn/uzsolt.hu/ \
  svn+ssh://svn@svn.uzsolt.hu/usr/local/subversion/dokumentumok \
  svn+ssh://svn@svn.uzsolt.hu/usr/local/subversion/homefiles \
  svn+ssh://svn@svn.uzsolt.hu/usr/local/subversion/svnadmin \
  svn+ssh://svn@svn.uzsolt.hu/usr/local/subversion/texmf_own \
  )
set _svn_props=( svn:global-ignores svn:ignore svn:log )
alias _comp_svn_modified 'svn status | sed -n "/^[AM]/ s,^[AM] *,,p"'
alias _comp_svn_new 'svn status | sed -n "/^?/ s,^? *,,p"'

complete svn \
  'p@1@$_svn_commands@' \
  'c@file://@d@' \
  'n@checkout@(file:// svn+ssh:// svn://)@@' \
  'n@help@$_svn_commands@' \
  'n@ls@(file:// svn+ssh:// svn:// ^/)@@' \
  'n@add@`_comp_svn_new`@' \
  'n@commit@`_comp_svn_modified`@' \
  'n@diff@`_comp_svn_modified`@' \
  'n@propedit@$_svn_props@' \
  'n@propget@$_svn_props@' \
  'n@propset@$_svn_props@' \
  'N@propedit@d@' \
  'n@revert@`svn status | sed -n "/^[ADM]/ s,^[ADM] *,,p"`@' \
  'n@status@`svn status | sed -n "/^[ADM?]/ s,^[ADM?] *,,p"`@'

complete svnadmin \
  'p@1@(crashtest create deltify dump freeze help  hotcopy list-dblogs list-unused-dblogs load lock lslocks lstxns pack recover \
    rmlocks rmtxns setlog setrevprop setuuid unlock upgrade verify)@' \
  'n@create@d@' \
  'n@dump@d@'

complete svnsync \
  'p@1@$_svnsync_commands@' \
  'n@help@$_svnsync_commands@' \
  'n@sync@$_svnsync_list@'


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

set HOSTCOLOR="${green}"
set promptchars='$#'
set prompt = "\n${HOSTCOLOR}%M ${white}|${cyan} %T ${white}| ${cyan}%~${end} \n"
set prompt="${prompt}$ ${end}"

alias use-sb 'setenv SANDBOX `mktemp -d /home/zsolt/sandbox/sandbox.XXXXXXXX` ; tcsh -l ; rm -rf ${SANDBOX} ; unsetenv SANDBOX'

setenv XDG_CONFIG_HOME /home/zsolt/.config/
setenv XDG_DATA_HOME ${XDG_CONFIG_HOME}
setenv XDG_CACHE_HOME /home/zsolt/.cache/

setenv WCDHOME ${XDG_CONFIG_HOME}/wcd
alias wcd "/usr/local/bin/wcd \!* ; source ${WCDHOME}/bin/wcd.go"

if ($tty == "ttyv0") then
  setenv _JAVA_AWT_WM_NONREPARENTING 1
  echo Starting Xorg...
  startx #&> /home/users/zsolt/logfiles/startx.log
  echo "Halt (h) Reboot (r) Nothing (n) ?"
  set answer = $<
  if ($answer == "h") then
    /sbin/shutdown -p now
  else if ($answer == "r") then
    /sbin/shutdown -r now
  endif
else
  if (${?SANDBOX} == 1) then
    set prompt = "${green}%n ${white}|${cyan} %T ${white}| ${yellow}%~${end} \n${magenta}<sandbox>${blue} $ ${end} "
    cd ${SANDBOX}
  else if (${?BURN} == 1) then
    cd ${BURN}
    set prompt = "${green}%n ${white}|${cyan} %T ${white}| ${yellow}%~${end} \n${magenta}<burn>${blue} $ ${end} "
    alias precmd du-tmp-burn
  else
    # /usr/games/fortune freebsd-tips | cowsay -n
    if (${?TMUX_PANE} == 1) then
      if (${TMUX_PANE} == "%0") then
        set updatingdate = `date -v-1w +%Y%m%d`
        set tmpfile = `mktemp -t pkgupdating`
        if (`pkg updating -d ${updatingdate} | tee ${tmpfile} | wc -l` > 0) then
          cat ${tmpfile} | cowthink -n -f default | histring -E "^ [-_]*|.*AFFECTS.*|^\( [0-9]{8}:.*" -c green #| cowthink -n
        endif
        rm ${tmpfile}
      endif
    endif
    task list due.before:20d
    task list due.after:20d
  endif
endif

set printexitvalue
 
jexec
Bash:
complete jexec  'p@1@`jls -N | awk \{\ print\ \$1\ \} | grep -v JID`@'
Code:
# jexec
backtunnels mariadb55   murmur      nginx       php54       proxies
devel       messengers  myservices  php52       php71
 
~/.cshrc

From the first line, I assume that it originated in 2018.

Nothing extraordinary. Some of it seems to not work as expected, I'll take this to a separate topic.

Code:
# $FreeBSD: head/share/skel/dot.cshrc 337497 2018-08-08 19:24:20Z asomers $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
# more examples available at /usr/share/examples/csh/
#

alias h         history 25
alias j         jobs -l
alias la        ls -aF
alias lf        ls -FA
alias ll        ls -lAF
alias ft        'cat /usr/share/games/fortune/freebsd-tips | grep '
alias tb        'nc termbin.com 9999'
# <https://wiki.freebsd.org/Phabricator#Install_Command_Line_Client>
alias arc       /usr/local/lib/php/arcanist/bin/arc
# complete ft   'cat /usr/share/games/fortune/freebsd-tips | grep '

# These are normally set through /etc/login.conf.  You may override them here
# if wanted.
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/.local/bin)
setenv  BLOCKSIZE       M
# A righteous umask
# umask 22

# <https://www.freshports.org/x11-themes/classiclooks/#message>
# setenv        QT_QPA_PLATFORMTHEME    gtk2

setenv  EDITOR  /usr/local/bin/nano
setenv  VISUAL  /usr/local/bin/nano
# setenv        MANPAGER        "less -sR"
# <https://unix.stackexchange.com/a/319231/13260>
setenv  MANCOLOR        1
setenv  MANWIDTH        tty
# setenv        PAGER   less
# setenv        PAGER   more
#
# 2021-03-25 ""
# setenv        TERM    xterm1

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

        set filec
        set history = 2000
        set savehist = (2000 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
#               bindkey '\e[1~'         beginning-of-line
#               bindkey '\e[4~'         end-of-line
                bindkey '\e[3~'         delete-char
#               bindkey '\e[5~'         beginning-of-history
#               bindkey '\e[6~'         end-of-history
#               bindkey '\e[2~'         quoted-insert
#               bindkey '\e[5C'         forward-word
#               bindkey '\e[5D'         backward-word
                bindkey '\e[1;5C'       forward-word
                bindkey '\e[1;5D'       backward-word
        endif

endif

# <https://www.freshports.org/textproc/ibus/#message>
setenv XIM ibus
setenv GTK_IM_MODULE ibus
setenv QT_IM_MODULE ibus 
setenv XMODIFIERS @im=ibus   
setenv XIM_PROGRAM ibus-daemon
setenv XIM_ARGS "--daemonize --xim"

# <https://www.freebsd.org/cgi/man.cgi?query=gpg-agent&sektion=1&manpath=FreeBSD-Ports>
# <https://opensource.com/article/19/4/gpg-subkeys-ssh>
# <https://old.reddit.com/r/freebsd/comments/v5a0wx/-/>
# setenv        GPG_TTY         tty
# setenv        SSH_AUTH_SOCK   `gpgconf --list-dirs agent-ssh-socket`
 
Code:
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
# more examples available at /usr/share/examples/csh/
#

setenv  EDITOR  nvim
setenv  PAGER   less

setenv LSCOLORS "exfxcxdxbxegedabagacad"
setenv CLICOLOR
setenv JAVA_VERSION 17

# User specific configs
alias x "xinit ~/.xinitrc > /dev/null"
alias editconfig "chezmoi edit \!:1 && chezmoi apply"
alias gitpush "git add . && git commit -m 'update' && git push"
alias edit "$EDITOR \!:1"
alias fastboot "/usr/local/bin/fastboot"
alias eject "camcontrol eject \!:1"
alias msync     "sync && sync && sync && sync"

alias h        history 25
alias j        jobs -l
alias la    ls -aF
alias lf    ls -FA
alias ll    ls -lAF

# These are normally set through /etc/login.conf.  You may override them here
# if wanted.
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/.local/bin /usr/local/nim/bin)
# A righteous umask
umask 22

# Colors!
set     red="%{\033[1;31m%}"
set   green="%{\033[0;32m%}"
set  yellow="%{\033[1;33m%}"
set    blue="%{\033[1;34m%}"
set magenta="%{\033[1;35m%}"
set    cyan="%{\033[1;36m%}"
set   white="%{\033[0;37m%}"
set     end="%{\033[0m%}" # This is needed at the end... :(

if ($?prompt) then
    # An interactive shell -- set some stuff up
    # set prompt = "%N@%m:%~ %# "
    if ($uid == 1001) then
        set prompt="${green}%n${red}@${blue}%m ${yellow}%~ ${white}%%${end} "
    else
        set prompt="${red}%n${green}@${blue}%m ${yellow}%~ ${white}%#${end} "
    endif
    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
 
Back
Top