Advertisement
Yunga

shell_options.sh

May 25th, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.43 KB | None | 0 0
  1. #!/bin/bash
  2. # ~/.bash/shell_options.sh configuration file -- yunga.palatino@gmail.com
  3. # Try `shopt -p` to see the current config, or see $BASHOPTS
  4. # ! marks a setting changed from defaults
  5.  
  6. shopt -s autocd                     #! automatically change to dir, without cd
  7. shopt -u cdable_vars                #  'cd here' is not the same as 'cd $here'
  8. shopt -s cdspell                    #! correct minor typing errors in cd commands
  9. shopt -s checkhash                  #! check if the command is in the hash, then perform path search
  10. shopt -s checkjobs                  #! check and list jobs before exiting interactive shells
  11. shopt -s checkwinsize               #! check if the terminal changed size !after! each command
  12. shopt -s cmdhist                    #  save multi-line commands into onliners
  13. shopt -u compat31                   #  < > [[ locales, =~ operator behaviour
  14. shopt -u compat32                   #  < > [[ locales, =~ operator behaviour
  15. shopt -u compat40                   #  < > [[ locales, =~ operator behaviour, a; b; c; interrupt
  16. #shopt -u completion_strip_exe       #  cygwin
  17. shopt -s dirspell                   #! spelling correction on directory names during word completion
  18. shopt -s dotglob                    #! find .bashrc with ls *
  19. shopt -u execfail                   #  interactive shell does not exit if exec fails.
  20. shopt -s expand_aliases             #  expand aliases (to use in non-interactive mode)
  21. shopt -u extdebug                   #  modify behaviour for external debuggers
  22. shopt -s extglob                    #! enable extended pattern matching (!, *, ?, @,  etc)
  23. shopt -s extquote                   #  expand ${} in ""
  24. shopt -u failglob                   #  don't fail completion if pattern fail
  25. shopt -u force_fignore              #! don't ignore if $FIGNORE is the only possible completion
  26. shopt -s globstar                   #! '**' match subdirs, **/ dirs only
  27. shopt -u gnu_errfmt                 #   gnu error message format
  28. shopt -s histappend                 #! do not overwrite history (i dig it!)
  29. shopt -u histreedit                 #  re-edit failed history substitution
  30. shopt -u histverify                 #  allow to edit history substitution
  31. shopt -u hostcomplete               #! no hostnames completion (complete function already makes this better)
  32. shopt -u huponexit                  #  SIGHUP to all jobs when exiting shell
  33. shopt -s interactive_comments       #  allow comments in interactive shells (easy if you which to grep your history)
  34. shopt -u lithist                    #  ??? multi-line commands saved with newlines instead of semicolon
  35. #shopt -u login_shell                #  login shell? read-only
  36. shopt -s mailwarn                   #! warn about new mail
  37. shopt -s nocaseglob                 #! globs are case insensitive for me
  38. shopt -s nocasematch                #! case match are insentive too [[glob]]
  39. shopt -u no_empty_cmd_completion    #  show completion even if cmd line is empty
  40. shopt -u nullglob                   #  pattern not match expands to null string
  41. shopt -s progcomp                   #  enable programmable completion
  42. shopt -s promptvars                 #  prompt vars are expanded
  43. #shopt -u restricted_shell           #  restricted shell? read-only
  44. shopt -u shift_verbose              #  print error message if shifts exceed parameters
  45. shopt -s sourcepath                 #  "source xxx" is searched in $PATH
  46. shopt -u xpg_echo                   #  echo don't expands backslash-escape
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement