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