chore: add shebangs

This commit is contained in:
Tri Vo Khac committed 2023-05-24 15:26:21 +07:00
1 parent b4b81baae5
commit 37573e8cc9
2 files changed
+13 -7

No files matched your search

+10 -6
View File
@@ -1,3 +1,5 @@
#!/usr/bin/env zsh
# some useful options (man zshoptions)
setopt autocd extendedglob nomatch menucomplete
setopt interactive_comments
@@ -6,14 +8,16 @@ 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.
setopt incappendhistory # Immediately append commands to history file.
setopt histignoredups # Never add duplicate entries.
setopt histignorespace # Ignore commands that start with a space.
setopt histreduceblanks # Remove unnecessary blank lines.
# beeping is annoying
unsetopt BEEP
unsetopt PROMPT_SP
unsetopt beep
# remove % symbol on prompt
unsetopt promptsp
# completions
+3 -1
View File
@@ -1,3 +1,5 @@
#!/usr/bin/env zsh
# Function to source files if they exist
function zsh_add_file() {
[ -f "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1"
@@ -43,7 +45,7 @@ function plugin-load {
fi
if [[ ! -e $initfile ]]; then
local -a initfiles=($plugdir/*.plugin.{z,}sh(N) $plugdir/*.{z,}sh{-theme,}(N))
(( $#initfiles )) || { echo >&2 "No init file found '$repo'." && continue }
(( $#initfiles )) || { echo >&2 "No init file found '$repo'." && continue; }
ln -sf "${initfiles[1]}" "$initfile"
fi
fpath+=$plugdir