raylu 2 éve
szülő
commit
e77065fb6a
5 módosított fájl, 43 hozzáadás és 21 törlés
  1. 0 3
      gitconfig
  2. 0 1
      npmrc
  3. 1 0
      profile
  4. 5 1
      pystartup.py
  5. 37 16
      zshrc

+ 0 - 3
gitconfig

@@ -113,6 +113,3 @@
 
 [init]
 	defaultBranch = main
-
-[diff-so-fancy]
-	markEmptyLines = false

+ 0 - 1
npmrc

@@ -1 +0,0 @@
-prefix = /home/raylu/npm-packages

+ 1 - 0
profile

@@ -0,0 +1 @@
+test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

+ 5 - 1
pystartup.py

@@ -3,4 +3,8 @@
 import readline
 import rlcompleter
 
-readline.parse_and_bind('tab: complete')
+if 'libedit' in readline.__doc__:
+	readline.parse_and_bind("bind -e")
+	readline.parse_and_bind("bind '\t' rl_complete")
+else:
+	readline.parse_and_bind('tab: complete')

+ 37 - 16
zshrc

@@ -1,5 +1,12 @@
-eval "$(dircolors -b ~/.dircolors)"
+if [ -x /usr/local/bin/gdircolors ]; then
+	eval "$(/usr/local/bin/gdircolors -b ~/.dircolors)"
+else
+	export LSCOLORS=ExGxhxDxCxhxhxhxhxExEx
+fi
 
+if [ -d /opt/homebrew/share/zsh/site-functions ]; then
+	fpath=(/opt/homebrew/share/zsh/site-functions $fpath)
+fi
 autoload -Uz compinit
 compinit
 zmodload -a complist
@@ -49,20 +56,15 @@ zle -N self-insert url-quote-magic
 source $HOME/.zsh_fast_syntax_highlighting/fast-syntax-highlighting.plugin.zsh
 
 export EDITOR=vi
-if builtin which batcat > /dev/null; then
-	export MANPAGER='sh -c "col -bx | batcat --language man --paging always --style plain"'
-	export MANROFFOPT='-c'
-elif builtin which nvim > /dev/null; then
-	export MANPAGER='vim +Man!'
-else
-	export MANPAGER='vim -M +MANPAGER -'
-fi
 export GREP_COLORS='ms=01;36:mc=01;31:sl=:cx=:fn=35:ln=33:bn=33:se=01;34'
 
-if [ -x ~/bin/eza ]; then
+if [ -x /opt/homebrew/bin/eza ]; then
 	export EZA_COLORS=bu=0:cr=0
 	alias ls='eza --group-directories-first --mounts --group --hyperlink --icons=auto'
+elif [ -x /opt/homebrew/bin/gls ]; then
+	alias ls='gls --color=auto -hv --group-directories-first'
 else
+	export CLICOLOR=1
 	alias ls='ls --color=auto -hv --group-directories-first'
 fi
 if [ $TERM = xterm-kitty ]; then
@@ -72,11 +74,9 @@ alias ll='ls -l'
 alias l.='ls -Ad .*'
 alias la='ls -A'
 alias llr='lr -1AGl -ov'
-alias bat=batcat
 alias grep='grep --color -s'
-alias df='df -hx tmpfs'
-alias du='du --max-depth=1'
-alias fd='fdfind'
+alias df='gdf -hx tmpfs'
+alias du='gdu --max-depth=1'
 alias sr='screen -r'
 alias gil='git log --graph --abbrev-commit --stat --summary -C --decorate --date=local'
 alias gime='git short --author raylu'
@@ -93,8 +93,10 @@ alias fx='FX_NO_MOUSE=1 FX_COLLAPSED=1 FX_SHOW_SIZE=1 fx'
 alias tree='tree -AvL 10'
 alias vi='vi -p'
 alias vil='vi *(.om[1])'
+alias find='gfind'
 alias sudovi="sudo vi -N -u $HOME/.vimrc"
-alias shrug="echo -n '¯\\(°_o)/¯' | xclip -selection clipboard"
+alias shrug="echo -n '¯\\(°_o)/¯' | pbcopy"
+alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
 function https() {
 	openssl s_client -connect $1:443 -servername $1 < /dev/null | \
 	openssl x509 -noout -text -certopt no_header,no_version,no_serial,no_signame,no_pubkey,no_sigdump
@@ -116,6 +118,13 @@ if [ -d /usr/lib/cargo/bin ]; then
 		PATH=/usr/lib/cargo/bin/coreutils:$PATH
 	fi
 fi
+PATH=/usr/local/sbin:/usr/local/bin:$PATH
+if [ -d /opt/homebrew/sbin ]; then
+	PATH=/opt/homebrew/sbin:$PATH
+fi
+if [ -d /opt/homebrew/bin ]; then
+	PATH=/opt/homebrew/bin:$PATH
+fi
 
 if [ -d $HOME/.cargo/bin ]; then
 	PATH=$HOME/.cargo/bin:$PATH
@@ -128,6 +137,14 @@ fi
 if [ -d $HOME/bin ]; then
 	PATH=$HOME/bin:$PATH
 fi
+if builtin which bat > /dev/null; then
+	export MANPAGER='sh -c "col -bx | bat --language man --paging always --style plain"'
+	export MANROFFOPT='-c'
+elif builtin which nvim > /dev/null; then
+	export MANPAGER='vim +Man!'
+else
+	export MANPAGER='vim -M +MANPAGER -'
+fi
 
 if builtin which oh-my-posh > /dev/null; then
 	eval "$(oh-my-posh init zsh -c ~/.config/oh-my-posh.toml)"
@@ -170,7 +187,11 @@ fi
 
 if builtin which fzf > /dev/null; then
 	FZF_DEFAULT_OPTS='--no-mouse'
-	source "/usr/share/doc/fzf/examples/key-bindings.zsh"
+	if [ -f /opt/homebrew/opt/fzf/shell/key-bindings.zsh ]; then
+		source /opt/homebrew/opt/fzf/shell/key-bindings.zsh
+	elif [ -f /usr/local/opt/fzf/shell/key-bindings.zsh ]; then
+		source /usr/local/opt/fzf/shell/key-bindings.zsh
+	fi
 
 	__fzf_git_commit_sha() {
 		setopt localoptions pipefail no_aliases 2> /dev/null