## General shell options # See https://zsh-manual.netlify.app/options # This is a multiple move based on zsh pattern matching (like "mmv"). # Read ``less ${^fpath}/zmv(N)'' for more details. autoload zmv # A builtin that can clone a running shell onto another terminal. zmodload -e zsh/clone # When listing options (by 'setopt', 'unsetopt', 'set -o', or 'set +o'), # those turned on by default appear in the list prefixed with 'no'. # Hence (unless KSH_OPTION_PRINT is set), 'setopt' shows all options whose # settings are changed from default. # # Report the status of background jobs immediately, rather than waiting until # just before printing a prompt. setopt notify # Allow comments even in interactive shells. setopt interactivecomments # Send *not* a HUP signal to running jobs when the shell exits. setopt nohup # If a pattern for filename generation has no matches, delete the pattern from # the argument list instead of reporting an error. # Overrides NOMATCH setopt nullglob # Perform =filename access # $ setopt EQUALS # $ echo =ls # /bin/ls # $ unsetopt EQUALS # $ echo =ls # =ls # NOTE: It's not really needed because zsh sets the per default. setopt equals # Try to make completion list smaller by printing the matches in columns with # different widths. setopt list_packed # Expands single letters and ranges of letters between braces # $ print 1{abw-z}2 # $ 1a2 1b2 1w2 1y2 1z2 setopt braceccl # If the argument to a cd command (or an implied cd with the AUTO_CD option # set) is not a directory, and does not begin with a slash, try to expand the # expression as if it were preceded by a '~' (See section 14.7 Filename # Expansion). setopt cdablevars # Report the status of background and suspended jobs before exiting a shell # with job control; a second attempt to exit the shell will succeed. setopt checkjobs # Make cd push the old directory onto the directory stack. setopt autopushd # Change to directory without cd setopt autocd # Query the user before executing 'rm *' or 'rm path/*' setopt normstarsilent setopt no_rm_star_wait # Shaddapa you face setopt nobeep # When writing out the history file, older commands that duplicate newer ones # are omitted. set histsavenodups # When searching for history entries in the line editor, do not display # duplicates of a line previously found, even if the duplicates are not # contiguous. setopt histfindnodups # If the internal history needs to be trimmed to add the current command line, # setting this option will cause the oldest history event that has a duplicate # to be lost before losing a unique event from the list. setopt hist_expire_dups_first # If a new command line being added to the history list duplicates an older # one, the older command is removed from the list (even if it is not the # previous event). setopt hist_ignore_all_dups # Do not enter command lines into the history list if they are duplicates of # the previous event. setopt hist_ignore_dups # Remove superfluous blanks from each command line being added to history. setopt hist_reduce_blanks # Whenever the user enters a line with history expansion, don't execute the # line directly; instead, perform history expansion and reload the line into # the editing buffer. setopt hist_verify # Do not remove function definitions from the history list. unsetopt hist_no_functions # Remove the history (fc -l) command from the history list when invoked. # Note that the command lingers in the internal history until the next command # is entered before it vanishes, allowing you to briefly reuse or edit the # line. setopt hist_no_store # If this is set, zsh sessions will append their history list to the history # file, rather than overwrite it. Thus, multiple parallel zsh sessions will all # have their history lists added to the history file, in the order they are # killed. setopt appendhistory # If unset, the cursor is set to the end of the word if completion is started. # Otherwise, it stays there and completion is done from both ends. unsetopt completeinword # When listing files that are possible completions, show the type of each file # with a trailing identifying mark. setopt listtypes # Do not require a leading '.' in a filename to be matched explicitly. setopt globdots # List jobs in long format by default setopt longlistjobs # Don't push multiple copies of the same directory onto the directory staack. setopt pushdignoredups # This option both imports new commands from the history file, and also causes # your typed commands to be appended to the history file (the latter is like # specifying INC_APPEND_HISTORY). # The history lines are also output with timestamps ala EXTENDED_HISTORY # (which makes it easier to find the spot where we left off reading the file # after it gets re-written). setopt sharehistory # Save each command's beginning timestamp (in seconds since the epoch) # and the duration (in seconds) to the history file. The format of this # prefixed data is: # '::;' setopt extendedhistory # Do *not* run all background jobs at a lower nice priority unsetopt bgnice