-
Recently when I use $ which color-diff
color-diff () {
color-diff --color $@
} It's a weird recursive call. Eventually I found out that the cause was my $ omz reload
start
end
start
end If I add $ omz reload
color-diff () {
diff --color $@
}
color-diff () {
color-diff --color $@
} Below is my # If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/nihil/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="bira-plus"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
adb
autoupdate
colored-man-pages
colorize
encode64
extract
rust
sudo
zsh-autosuggestions
zsh-syntax-highlighting
zsh-z
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
n_inner ()
{
# Block nesting of nnn in subshells
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
ff ()
{
case $# in
1)
case $1 in
"all")
fastboot flash abl abl.elf
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash persist persist.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash vbmeta vbmeta.img
fastboot flash userdata userdata.img
;;
"superall")
fastboot flash abl abl.elf
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash persist persist.img
fastboot flash super super.img
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
;;
*)
fastboot flash $1 $1.img
;;
esac
;;
2)
fastboot flash $1 $1.$2
;;
*)
echo "ff - fastboot flash"
echo "Usage:"
echo " -- ff boot -> fastboot flash boot boot.img"
echo " -- ff devcfg mbn -> fastboot flash devcfg devcfg.mbn"
;;
esac
}
flash()
{
adb wait-for-device
adb reboot bootloader
case $# in
0)
ff all
;;
1)
ff $1
;;
2)
ff $1 $2
;;
*)
echo "Invliad arguments"
;;
esac
fastboot reboot
}
# Disable Ctrl+s aka suspend terminal
stty -ixon
export VISUAL=vim
export EDITOR=vim
export ZSH_COLORIZE_CHROMA_FORMATTER=terminal256
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#757575'
export PATH=${PATH}:/home/nihil/bin:/home/nihil/bin/platform-tools:/home/nihil/bitbake-1.17.0/bin
export PYTHONSTARTUP=~/.pyrc
export RSYNC_SERVER="192.168.40.39"
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
alias adbdev='adb devices'
alias adbdis='adb root && adb disable-verity'
alias adbrb='adb reboot'
alias adbrbb='adb reboot bootloader'
alias adbrr='adb root && adb remount'
alias adbrrs='adb root && adb remount && adb shell'
alias adbrs='adb root && adb shell'
alias adbs='adb shell'
alias adbwfd='adb wait-for-device'
alias ag='ag -i'
alias bashrc='vim ~/.bashrc'
alias en="trans -x 127.0.0.1:8889 :en"
alias fbterm='LANG=en_US.UTF-8 fbterm'
alias fbtermrc='vim ~/.fbtermrc'
alias fdev='fastboot devices'
alias frb='fastboot reboot'
alias fxxk='fuck'
alias hid='cd /home/nihil/HID_Descriptor_Tool; wine /home/nihil/HID_Descriptor_Tool/Dt.exe; cd -'
alias ja="trans -x 127.0.0.1:8889 :ja"
alias k=kwrite
alias n='n_inner -Hde'
alias nohup='nohup '
alias sudo='sudo '
alias tr="trans -x 127.0.0.1:8889"
alias vimrc='vim ~/.vimrc'
alias xargs='xargs '
alias zh='trans -x 127.0.0.1:8889 :zh'
alias zshrc='vim ~/.zshrc'
. "$HOME/.cargo/env"
eval $(thefuck --alias)
if [[ "$TERM" = linux ]] && [[ "$(ps otty= $$)" =~ tty ]] && type fbterm &>/dev/null; then
fbterm
exit
fi
[ -f "/home/nihil/.ghcup/env" ] && source "/home/nihil/.ghcup/env" # ghcup-env |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
We do not define color-diff like that. Please try to reset omz repo following the instructions here and see if it fixes your issue. |
Beta Was this translation helpful? Give feedback.
We do not define color-diff like that. Please try to reset omz repo following the instructions here and see if it fixes your issue.