From e9c8cc0e27eca7aefd5522bd3b044797a1ec9a77 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Mon, 4 Nov 2024 23:45:09 +0900 Subject: Indent using tabs --- .zshrc | 4 ++-- early/powerlevel10k.zsh | 2 +- halfway/functions.zsh | 54 ++++++++++++++++++++++++------------------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.zshrc b/.zshrc index d13796a..0acd1f1 100644 --- a/.zshrc +++ b/.zshrc @@ -6,7 +6,7 @@ source "$ZDOTDIR/zi.init.zsh" && zzinit function { local config_file for config_file ("$ZDOTDIR"/early/*.zsh(N)); do - source "$config_file" + source "$config_file" done } @@ -27,7 +27,7 @@ zi snippet "$ZDOTDIR/resources/completion/_man" function { local config_file for config_file ("$ZDOTDIR"/halfway/*.zsh(N)); do - source "$config_file" + source "$config_file" done } diff --git a/early/powerlevel10k.zsh b/early/powerlevel10k.zsh index d657c48..c96d2b0 100644 --- a/early/powerlevel10k.zsh +++ b/early/powerlevel10k.zsh @@ -2,5 +2,5 @@ # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi diff --git a/halfway/functions.zsh b/halfway/functions.zsh index 9aae54a..9bc295c 100644 --- a/halfway/functions.zsh +++ b/halfway/functions.zsh @@ -1,53 +1,53 @@ # Creates the given directories and then moves to the first one. mkcd() { - mkdir -p "$@"; - cd "$1"; + mkdir -p "$@"; + cd "$1"; } # Create python directories with __init__.py. mkdirpython() { - mkdir -p "$@"; - local directory - for directory in "$@"; - do touch "$directory/__init__.py"; - done; + mkdir -p "$@"; + local directory + for directory in "$@"; + do touch "$directory/__init__.py"; + done; } # Switch from the current directory to the equivalent directory on another drive. sd() { - local wd="$(pwd)"; - wd="${wd/"$1"/"$2"}"; - printf %s\\n "$wd"; - cd "$wd"; + local wd="$(pwd)"; + wd="${wd/"$1"/"$2"}"; + printf %s\\n "$wd"; + cd "$wd"; } # Copy the current directory to the clipboard. pcopy() { - printf %s "$(pwd)" | cclip - pwd + printf %s "$(pwd)" | cclip + pwd } vinfo() { - INFOPATH="$XDG_DATA_HOME/info:$INFOPATH" ${EDITOR:-nvim} -R -M -c "Info $@" +only + INFOPATH="$XDG_DATA_HOME/info:$INFOPATH" ${EDITOR:-nvim} -R -M -c "Info $@" +only } vn3() { - if [ "$#" -gt 0 ]; then - local direc="$(printf %q "$1")" - shift - ${EDITOR:-nvim} -c "NnnExplorer $direc" "$@" - else - ${EDITOR:-nvim} -c NnnExplorer - fi + if [ "$#" -gt 0 ]; then + local direc="$(printf %q "$1")" + shift + ${EDITOR:-nvim} -c "NnnExplorer $direc" "$@" + else + ${EDITOR:-nvim} -c NnnExplorer + fi } # https://github.com/ohmyzsh/ohmyzsh/blob/8487a55/lib/cli.zsh#L625 src () { - # Delete current completion cache - command rm -f $_comp_dumpfile $ZSH_COMPDUMP + # Delete current completion cache + command rm -f $_comp_dumpfile $ZSH_COMPDUMP - # Old zsh versions don't have ZSH_ARGZERO - local zsh="${ZSH_ARGZERO:-${functrace[-1]%:*}}" - # Check whether to run a login shell - [[ "$zsh" = -* || -o login ]] && exec -l "${zsh#-}" || exec "$zsh" + # Old zsh versions don't have ZSH_ARGZERO + local zsh="${ZSH_ARGZERO:-${functrace[-1]%:*}}" + # Check whether to run a login shell + [[ "$zsh" = -* || -o login ]] && exec -l "${zsh#-}" || exec "$zsh" } -- cgit v1.2.3-70-g09d2