Skip to content

Commit 348db38

Browse files
committed
refactor(zsh): remove history options
1 parent 86e728c commit 348db38

6 files changed

Lines changed: 11 additions & 20 deletions

File tree

home/dot_config/exact_zsh/dot_zshrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ foreach file (
1010
) {
1111
source $ZDOTDIR/config/$file
1212
}
13+
1314
unset file

home/dot_config/exact_zsh/exact_config/aliases.zsh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ alias mkdir='mkdir -p' # Make missing parent directories when creating folders.
66
alias grep="grep --color='auto'" # Grep with colors.
77
alias du='du -d 1 --si' # Display size of files and folders under current directory.
88
alias df='df -a --si' # Display all disk usage statistics with SI units and FS types.
9-
alias ls='ls -AFG' # List name of nodes.
9+
alias ls='ls -AF --color=auto' # List name of nodes.
1010
alias la='ls -lAh' # List nodes with their details.
1111
alias clear='echo "Use \`^L\`." && false' # Prevent accidental clearing of the scrollback buffer.
1212
alias uuidgen='print -n ${$(command uuidgen):l} | pbcopy' # Generate a UUID and copy it to the clipboard.
@@ -21,9 +21,11 @@ alias cz='chezmoi'
2121

2222
# macOS-only Aliases
2323
if [[ $OSTYPE =~ 'darwin*' ]] {
24+
alias ls='ls -AFG' # List name of nodes.
2425
alias bb='brew bundle --global --verbose'
2526
}
2627

28+
# Git Aliases
2729
typeset -A git_aliases=(
2830
a add
2931
b branch
@@ -43,10 +45,10 @@ typeset -A git_aliases=(
4345
sw switch
4446
)
4547

46-
# Loop through each alias, create the alias, and set the compdef.
4748
for key (${(k)git_aliases}) {
4849
alias g$key="git $key"
4950
compdef _git "g$key=git-${git_aliases[$key]}"
5051
}
52+
5153
unset git_aliases
5254
unset key

home/dot_config/exact_zsh/exact_config/environment.zsh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# man
22
export MANWIDTH='100'
3-
export MANPAGER='nvim +Man!'
3+
if (command -v nvim &> /dev/null) {
4+
export MANPAGER='nvim +Man!'
5+
}
46

57
# GnuPG
68
export GPG_TTY="$(tty)"

home/dot_config/exact_zsh/exact_config/functions.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `cd` into the last directory upon exit using `yazi`.
22
function y() {
3-
local temp_file="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
3+
local temp_file="$(mktemp -t "yazi-cwd.XXXXXX")"
44

55
command yazi "$@" --cwd-file="$temp_file"
66
local cwd="$(command cat -- "$temp_file")"

home/dot_config/exact_zsh/exact_config/modules.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Define functions to load them on execution.
2-
foreach function (
2+
foreach fn (
33
compinit
44
promptinit
55
surround
66
select-bracketed
77
select-quoted
88
) {
9-
autoload -U $function
9+
autoload -U $fn
1010
}
1111

1212
# Load binary modules.

home/dot_config/exact_zsh/exact_config/options.zsh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ setopt NO_NOMATCH # If a pattern has no matches, don't print an error, leave it
3939
typeset -g SAVEHIST=0 # Disable saving history.
4040
unset HISTFILE # Don't use a history file.
4141

42-
# History Settings
43-
setopt BANG_HIST # Treat the '!' character specially during expansion.
44-
setopt EXTENDED_HISTORY # Save each command's epoch timestamps and the duration in seconds.
45-
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
46-
setopt HIST_FIND_NO_DUPS # Don't display a line previously found.
47-
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
48-
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
49-
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
50-
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording an entry.
51-
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
52-
setopt HIST_VERIFY # Don't execute the line directly instead perform history expansion.
53-
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
54-
setopt SHARE_HISTORY # Share history between all sessions.
55-
5642
# Input/Output
5743
typeset -g KEYTIMEOUT=10 # The time the shell waits, for another key to be pressed in milliseconds.
5844
setopt NO_CLOBBER # Don't allow `>` redirection to override existing files. Use `>!` instead.

0 commit comments

Comments
 (0)