{"id":162,"date":"2014-06-24T12:01:00","date_gmt":"2014-06-24T12:01:00","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=162"},"modified":"2014-06-24T12:01:00","modified_gmt":"2014-06-24T12:01:00","slug":"bashrc-file","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2014\/06\/24\/bashrc-file\/","title":{"rendered":"bashrc File"},"content":{"rendered":"<p>There is a bashrc with some handy config: <\/p>\n<p>copy code from bashrc.txt to ~\/.bashrc <\/p>\n<p>&#8211; you have to adjust passwords in alias lines &#8211; if you want colorful code formatting in less, you need to install enscript during cygwin setup, and copy code from lessfilter.txt to ~\/.lessfilter make ~\/.lessfilter executable ( chmod 0755 )<\/p>\n<p><code><br \/>\n# base-files version 3.9-3<\/p>\n<p># To pick up the latest recommended .bashrc content,<br \/>\n# look in \/etc\/defaults\/etc\/skel\/.bashrc<\/p>\n<p># Modifying \/etc\/skel\/.bashrc directly will prevent<br \/>\n# setup from updating it.<\/p>\n<p># The copy in your home directory (~\/.bashrc) is yours, please<br \/>\n# feel free to customise it to create a shell<br \/>\n# environment to your liking.  If you feel a change<br \/>\n# would be benificial to all, please feel free to send<br \/>\n# a patch to the cygwin mailing list.<\/p>\n<p># User dependent .bashrc file<\/p>\n<p># Environment Variables<br \/>\n# #####################<\/p>\n<p># TMP and TEMP are defined in the Windows environment.  Leaving<br \/>\n# them set to the default Windows temporary directory can have<br \/>\n# unexpected consequences.<br \/>\nunset TMP<br \/>\nunset TEMP<\/p>\n<p># Alternatively, set them to the Cygwin temporary directory<br \/>\n# or to any other tmp directory of your choice<br \/>\n# export TMP=\/tmp<br \/>\n# export TEMP=\/tmp<\/p>\n<p># Or use TMPDIR instead<br \/>\n# export TMPDIR=\/tmp<\/p>\n<p>export LESSOPEN='|~\/.lessfilter %s 2>&-'<\/p>\n<p>export LESS='-M -i -N -w  -z-4 -g -e -M -X -F -R -P%t?f%f \\<br \/>\n:stdin .?pb%pb\\%:?lbLine %lb:?bbByte %bb:-...'<\/p>\n<p># Shell Options<br \/>\n# #############<\/p>\n<p># See man bash for more options...<\/p>\n<p># Don't wait for job termination notification<br \/>\n# set -o notify<\/p>\n<p># Don't use ^D to exit<br \/>\n# set -o ignoreeof<\/p>\n<p># Use case-insensitive filename globbing<br \/>\n# shopt -s nocaseglob<\/p>\n<p># Make bash append rather than overwrite the history on disk<br \/>\n# shopt -s histappend<\/p>\n<p># When changing directory small typos can be ignored by bash<br \/>\n# for example, cd \/vr\/lgo\/apaache would find \/var\/log\/apache<br \/>\n# shopt -s cdspell<\/p>\n<p># Completion options<br \/>\n# ##################<\/p>\n<p># These completion tuning parameters change the default behavior of bash_completion:<\/p>\n<p># Define to access remotely checked-out files over passwordless ssh for CVS<br \/>\n# COMP_CVS_REMOTE=1<\/p>\n<p># Define to avoid stripping description in --option=description of '.\/configure --help'<br \/>\n# COMP_CONFIGURE_HINTS=1<\/p>\n<p># Define to avoid flattening internal contents of tar files<br \/>\n# COMP_TAR_INTERNAL_PATHS=1<\/p>\n<p># If this shell is interactive, turn on programmable completion enhancements.<br \/>\n# Any completions you add in ~\/.bash_completion are sourced last.<br \/>\n# case $- in<br \/>\n#   *i*) [[ -f \/etc\/bash_completion ]] && . \/etc\/bash_completion ;;<br \/>\n# esac<\/p>\n<p># History Options<br \/>\n# ###############<\/p>\n<p># Don't put duplicate lines in the history.<br \/>\n# export HISTCONTROL=\"ignoredups\"<\/p>\n<p># Ignore some controlling instructions<br \/>\n# HISTIGNORE is a colon-delimited list of patterns which should be excluded.<br \/>\n# The '&' is a special pattern which suppresses duplicate entries.<br \/>\n# export HISTIGNORE=$'[ \\t]*:&:[fb]g:exit'<br \/>\n# export HISTIGNORE=$'[ \\t]*:&:[fb]g:exit:ls' # Ignore the ls command as well<\/p>\n<p># Whenever displaying the prompt, write the previous line to disk<br \/>\n# export PROMPT_COMMAND=\"history -a\"<\/p>\n<p># Aliases<br \/>\n# #######<\/p>\n<p># Some example alias instructions<br \/>\n# If these are enabled they will be used instead of any instructions<br \/>\n# they may mask.  For example, alias rm='rm -i' will mask the rm<br \/>\n# application.  To override the alias instruction use a \\ before, ie<br \/>\n# \\rm will call the real rm not the alias.<\/p>\n<p># Interactive operation...<br \/>\n# alias rm='rm -i'<br \/>\n# alias cp='cp -i'<br \/>\n# alias mv='mv -i'<\/p>\n<p># Default to human readable figures<br \/>\n# alias df='df -h'<br \/>\n# alias du='du -h'<\/p>\n<p># Misc :)<br \/>\n# alias less='less -r'                          # raw control characters<br \/>\n# alias whence='type -a'                        # where, of a sort<br \/>\n# alias grep='grep --color'                     # show differences in colour<\/p>\n<p># Some shortcuts for different directory listings<br \/>\n# alias ls='ls -hF --color=tty'                 # classify files in colour<br \/>\n# alias dir='ls --color=auto --format=vertical'<br \/>\n# alias vdir='ls --color=auto --format=long'<br \/>\n# alias ll='ls -l'                              # long list<br \/>\n# alias la='ls -A'                              # all but . and ..<br \/>\n# alias l='ls -CF'                              #<\/p>\n<p>###########################################<br \/>\n# my aliases<br \/>\n###########################################<br \/>\nalias s=\"cd \/cygdrive\/d\/RolloutToolSVN75\/Shipments\"<br \/>\nalias l=\"ls -ltr\";<br \/>\nalias t1=\"sqlplus sa\/ @tcrm01\"<br \/>\nalias t2=\"sqlplus sa\/ @tcrm02\"<br \/>\nalias d4=\"sqlplus sa\/ @dcrm04\"<br \/>\nalias d5=\"sqlplus sa\/ @dcrm05\"<\/p>\n<p>alias less='\/bin\/less -r'<br \/>\nalias ls='\/bin\/ls -F --color=auto --show-control-chars'<br \/>\nalias grep='grep --color=auto'<\/p>\n<p># Functions<br \/>\n# #########<\/p>\n<p># Some example functions<br \/>\n# function settitle() { echo -ne \"\\e]2;$@\\a\\e]1;$@\\a\"; }<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a bashrc with some handy config: copy code from bashrc.txt to ~\/.bashrc &#8211; you have to adjust passwords in alias lines &#8211; if you want colorful code formatting in less, you need to install enscript during cygwin setup, &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2014\/06\/24\/bashrc-file\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":0,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}