1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-12 05:40:17 +00:00

Add history file and command configuration, and create script for converting URL to markdown link

This commit is contained in:
Luna 2023-04-08 00:49:50 +02:00
parent 68fda2b3f6
commit e99c54d85b
2 changed files with 17 additions and 1 deletions

16
.zshrc
View file

@ -1,3 +1,6 @@
iscmd() {
command -v "$1" > /dev/null
}
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
@ -11,9 +14,19 @@ source $OTHER/powerlevel_settings.sh
plugins=(git docker docker-compose virtualenv)
## History file configuration
HISTFILE="$HOME/.zsh_history"
HISTSIZE=50000000
SAVEHIST=10000000
## History command configuration
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
export EDITOR=nvim
#export JAVA_HOME=
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
for f in $OTHER/*.zsh; do
@ -29,6 +42,7 @@ if [ -d "$HOME/.zsh-custom" ]; then
fi
done
fi
DISABLE_MAGIC_FUNCTIONS=true
source $ZSH/oh-my-zsh.sh
# autoload -Uz compinit && compinit -i

2
bin/mgv Normal file
View file

@ -0,0 +1,2 @@
#!/bin/sh
xclip -o -t text/plain | sed -E 's|.*/(.*)|[`\1`](\0)|' | xclip -selection clipboard