chore: refactor scripts

This commit is contained in:
Tri Vo Khac committed 2023-05-24 14:12:02 +07:00
1 parent 33a944135e
commit fa032ec43e
5 files changed
+18 -13

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
# Set PATH, MANPATH, etc., for Homebrew.
[ -f /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
command -v fnm > /dev/null 2>&1 && eval "$(fnm env --use-on-cd)"
command -v zoxide > /dev/null 2>&1 && eval "$(zoxide init zsh)"
+7 -8
View File
@@ -1,7 +1,4 @@
#!/bin/sh
export ZDOTDIR=$HOME/.config/zsh
HISTFILE=~/.zsh_history
setopt appendhistory
# some useful options (man zshoptions)
setopt autocd extendedglob nomatch menucomplete
@@ -9,6 +6,13 @@ setopt interactive_comments
stty stop undef # Disable ctrl-s to freeze terminal.
zle_highlight=('paste:none')
# history
setopt appendhistory
setopt INC_APPEND_HISTORY # Immediately append commands to history file.
setopt HIST_IGNORE_ALL_DUPS # Never add duplicate entries.
setopt HIST_IGNORE_SPACE # Ignore commands that start with a space.
setopt HIST_REDUCE_BLANKS # Remove unnecessary blank lines.
# beeping is annoying
unsetopt BEEP
unsetopt PROMPT_SP
@@ -61,8 +65,3 @@ compinit
# Edit line in vim with ctrl-e:
autoload edit-command-line; zle -N edit-command-line
# bindkey '^e' edit-command-line
# Environment variables set everywhere
export EDITOR="micro"
export PAGE="bat"
export VISUAL="micro"
+6 -3
View File
@@ -1,8 +1,11 @@
#!/bin/sh
# HISTFILE="$XDG_DATA_HOME"/zsh/history
HISTSIZE=1000000
SAVEHIST=1000000
export PATH="$HOME/.local/bin":$PATH
export MANWIDTH=999
export HISTFILE="$ZDOTDIR"/.zsh_history
eval "$(zoxide init zsh)"
export EDITOR="micro"
export PAGE="bat"
export VISUAL="micro"
+1 -1
View File
@@ -4,6 +4,6 @@ STARSHIP_HOME=$HOME/.config/starship
[ ! -d "$STARSHIP_HOME" ] && mkdir -p "$STARSHIP_HOME"
[ ! -f "$STARSHIP_HOME/starship.toml" ] && touch "$STARSHIP_HOME/starship.toml"
export STARSHIP_CONFIG=$STARSHIP_HOME/starship.toml
export STARSHIP_CONFIG="$STARSHIP_HOME"/starship.toml
eval "$(starship init zsh)"