# $FreeBSD: releng/11.1/share/skel/dot.cshrc 278616 2015-02-12 05:35:00Z cperciva $ # # .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/ # # If we're in an interactive shell, set up some things not needed elsewhere if ($?prompt) then set prompt = "%N@%m:%~ %# " set promptchars = "%#" set filec set history = 100000 set savehist = (100000 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 # Set some aliases alias h history 25 alias j jobs -l alias la ls -aF alias lf ls -FA alias ll ls -lAF alias swapstat swapinfo alias mutt neomutt alias nano nano -AKipwz -r 80 -T8 alias psa "ps -auxdww | grep -v 'grep'" alias mutt "ssh-add && neomutt" alias peek "tmux split-window -p 33 /usr/bin/less $*" alias pkg_checkupdates "curl -sI https://pkg.freebsd.org/FreeBSD:14:amd64/latest/packagesite.txz | grep -i last-modified: | sed -e 's/Last-modified: //i'" alias sugar "dc -e "$*" -e '1k [dn [ mmol/l ] P 18 * n [ mg/dl] P] sa [dn [ mg/dl ] P 18 / n [ mmol/l] P] sb d 40 /' \ '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:/ N/-*e/f/' \ 'n/-*e/x:/' \ 'n/-*f/f/' \ 'n/*/f/' complete ifconfig 'p@1@`ifconfig -l`@' \ 'n/*/(range phase link netmask mtu vlandev vlan metric mediaopt down delete broadcast arp debug)/' 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 kldreload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name`@' complete kill 'c/-/S/' \ 'c/%/j/' \ 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/' complete killall 'c/-/S/' \ 'c/%/j/' \ 'n/*/`ps -axc | awk '"'"'{print $5}'"'"'`/' complete netstat 'n/-I/`ifconfig -l`/' complete ping 'p/1/$hosts/' set pkgcmds=(help add annotate audit autoremove backup check clean convert create delete fetch info install lock plugins \ query register repo rquery search set shell shlib stats unlock update updating upgrade version which) complete pkg 'p/1/$pkgcmds/' \ 'n/check/`__pkg-check-opts`/' \ 'N/check/`__pkgs`/' \ 'n/delete/`__pkg-del-opts`/' \ 'N/delete/`__pkgs`/' \ 'n/help/$pkgcmds/' \ 'n/info/`__pkg-info-opts`/' \ 'N/info/`__pkgs`/' \ 'n/which/`__pkg-which-opts`/' \ 'N/which/`__pkgs`/' complete pkg_libchk 'c/-/(achmnoqrRv)/' \ 'p/2/`__pkgs`/' complete pkill 'c/-/S/' \ 'n@*@`ps -axc -o command="" | sort | uniq`@' complete rsync "c,*:/,F:/," \ "c,*:,F:$HOME," \ 'c/*@/$hosts/:/' complete scp "c,*:/,F:/," \ "c,*:,F:$HOME," \ 'c/*@/$hosts/:/' #complete service 'c/-/(e l r v)/' \ # 'p/1/`service -l`/' \ # 'n/*/(start stop reload restart status rcvar onestart onestop)/' complete ssh 'p/1/$hosts/' \ 'c/-/(l n)/' \ 'n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/' set svncmds=(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) # the p/*/f/ at the end makes the last parameter a filename completion # matches complete in order, so the nonspecific * must be the last pattern in the list complete svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ 'n@ls@(file:/// svn+ssh:// svn://)@@' \ 'n/help/$svncmds/' \ 'p/1/$svncmds/' \ 'n/patch/(--dry-run --ignore-whitespace -q --quiet --reverse-diff --strip)/' \ 'p/*/f/' complete tmux 'n/*/(attach detach has kill-server kill-session lsc lscm ls lockc locks new refresh rename showmsgs source start suspendc switchc)/' complete zfs 'p/1/(clone create destroy get inherit list mount promote receive rename rollback send set share snapshot unmount unshare)/' \ 'n/clone/x:[-p] [-o property=value] ... snapshot filesystem|volume/' \ 'n/create/x:[-p] [-o property=value] ... filesystem \ [-ps] [-b blocksize] [-o property=value] ... -V size volume/' \ 'n/destroy/x:[-fnpRrv] filesystem|volume \ [-dnpRrv] snapshot[%snapname][,...]/' \ 'n/get/x:[-r|-d depth] [-Hp] [-o all | field[,...]] [-t type[,...]] [-s source[,...]] all | property[,...] filesystem|volume|snapshot/' \ 'n/inherit/x:[-rS] property filesystem|volume|snapshot/' \ 'n/list/x:[-r|-d depth] [-H] [-o property[,...]] [-t type[,...]] [-s property] ... [-S property] ... filesystem|volume|snapshot/' \ 'n/mount/x:[-vO] [-o property[,...]] -a | filesystem/' \ 'n/promote/x:clone-filesystem/' \ 'n/receive/x:[-vnFu] filesystem|volume|snapshot \ [-vnFu] [-d | -e] filesystem/' \ 'n/rename/x:-r snapshot snapshot \ -u [-p] filesystem filesystem/' \ 'n/rollback/x:[-rRf] snapshot/' \ 'n/send/x:[-DnPpRv] [-i snapshot | -I snapshot] snapshot/' \ 'n/set/x:property=value filesystem|volume|snapshot/' \ 'n/share/x:-a | filesystem/' \ 'n/snapshot/x:[-r] [-o property=value] ... filesystem@snapname|volume@snapname/' \ 'n/unmount/x:[-f] -a | filesystem|mountpoint/' \ 'n/unshare/x:-a | filesystem|mountpoint/' complete camcontrol 'p/1/(cmd debug defects devlist eject inquiry \ modepage negotiate periphlist rescan reset \ start stop tags tur)/' complete ipfw 'p/1/(flush add delete list show zero)/' \ 'n/add/(allow permit accept pass deny drop reject \ reset count skipto num divert port tee port)/' complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hosts/' complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' \ 'n/*/(start stop reload restart \ status rcvar onestart onestop)/' complete gpg 'c/--/(sign clearsign encrypt decrypt verify verify-files encrypt-files decrypt-files list-keys \ list-public-keys list-secret-keys delete-key fingerprint check-sigs delete-secret-key export send-keys recv-keys \ search-keys fetch-keys gen-key edit-key sign-key keyserver armor)/' complete dd 'c/if=/f/' 'c/of=/f/' \ 'c/conv=*,/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \ 'c/conv=/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \ 'p/*/(bs cbs count files fillcahr ibs if iseek obs of oseek seek skip conv)/=' complete jail 'c/-rc/x:-rc : Restart an existing jail./' \ 'c/-r/x:-r : Remove the jail specified by jid or name./' \ 'c/-cm/x:-cm : Create a jail if it does not exist, or modify the jail if it does exist./' \ 'c/-m/x:-m : Modify an existing jail./' \ 'c/-c/x:-c : Create a new jail./' \ 'c/-d/x:-d : Allow making changes to a dying jail./' \ 'c/-f/x:-f conf_file : Use configuration file conf_file instead of the default./' \ 'c/-J/x:-J jid_file : Write a jid_file file, containing all parameters./' \ 'c/-l/x:-l : Run commands in a clean environment./' \ 'c/-s/x:-s securelevel : Set the kern.securelevel./' \ 'c/-u/x:-u username : The user name from host environment as whom jailed commands should run./' \ 'c/-/( c m r rc cm d f J l s u)/' \ 'p/*/x:Synopsis: [-J jid_file] [-u username] [-U username] [-f conf_file] [-p limit] [-s securelevel]/' complete geli 'c/-a/x:-a aalgo : Enable data integrity verification using the given algorithm./' \ 'c/-b/x:-b : Ask for the passphrase on boot./' \ 'c/-B/x:-B backupfile : File name to use for metadata backup./' \ 'c/-e/x:-e ealgo : Encryption algorithm to use./' \ 'c/-J/x:-J newpassfile : Specifies a file which contains the passphrase or its part./' \ 'c/-K/x:-K newkeyfile : Specifies a file which contains part of the key./' \ 'c/-l/x:-l keylen : Key length to use with the given cryptographic algorithm./' \ 'c/-P/x:-P : Do not use passphrase as the key component./' \ "c/-s/x:-s sectorsize : Change decrypted provider's sector size./" \ 'c/-k/x:-k keyfile : Specifies a file which contains part of the key./' \ 'c/-r/x:-r : Attach read-only provider./' \ 'c/-j/x:-j passfile : Specifies a file which contains the passphrase or its part./' \ 'c/-f/x:-f : Force detach./' \ 'c/-/( a b B e J K l P s k r j f)/' \ 'p/1/( init label attach detach stop onetime configure setkey delkey kill backup restore suspend resume \ resize clear dump list status load unload )/' \ complete zpool 'c/*,/(all alloc capacity comment dedupratio free freeing expandsize guid health \ size unsupported used altroot readonly autoexpand autoreplace bootfs cachefile \ comment dedupditto delegation failmode feature listsnaps version)/,' \ 'n/get/(all alloc capacity comment dedupratio free freeing expandsize guid health \ size unsupported used altroot readonly autoexpand autoreplace bootfs cachefile \ comment dedupditto delegation failmode feature listsnaps version)/,' \ 'n/set/(all alloc capacity comment dedupratio free freeing expandsize guid health \ size unsupported used altroot readonly autoexpand autoreplace bootfs cachefile \ comment dedupditto delegation failmode feature listsnaps version)/=' \ 'n/-o/(all alloc capacity comment dedupratio free freeing expandsize guid health \ size unsupported used altroot readonly autoexpand autoreplace bootfs cachefile \ comment dedupditto delegation failmode feature listsnaps version)/' \ 'c/-s/x:-s : Stop scrubbing./' \ 'c/-R/x:-R : Equivalent to "-o cachefile=none,altroot=root"/' \ 'c/-c/x:-c cachefile : Use given cachefile./' \ 'c/-d/x:-d dir : Searches for devices or files in dir./' \ 'c/-D/x:-D : Lists destroyed pools only./' \ 'c/-v/x:-v : Be verbose./' \ 'c/-/( s R c d D v )/' \ 'p/1/( add attach clear create destroy detach export get history \ import import iostat labelclear list offline online reguid remove replace \ scrub set split status upgrade )/' \ 'p/*/`zpool list -H -o name`/' source ~/.git-completion.tcsh #source /usr/share/examples/tcsh/complete.tcsh