Add changes from sgen
This commit is contained in:
parent
19971c6298
commit
12ea7ea83b
@ -43,6 +43,9 @@ set sort_alias = alias
|
||||
set reverse_alias = yes
|
||||
source $alias_file
|
||||
|
||||
# Pipe like a sane person
|
||||
set pipe_decode = yes
|
||||
|
||||
# Sort reverse order
|
||||
set sort_aux=reverse-date-received
|
||||
set sort=threads
|
||||
@ -59,6 +62,8 @@ auto_view text/html
|
||||
# macro pager \cb <pipe-entry>'tr -d "\n" | w3m'<enter> 'Follow links in w3m'
|
||||
# macro pager \cb <pipe-entry>'w3m'<enter> 'Follow links in w3m'
|
||||
# macro pager \cb <pipe-entry>'pandoc -f html -t markdown | vim -'<enter> 'Open as markdown'
|
||||
# macro pager P <pipe-entry>'docker run pandoc pandoc -f html -t markdown' 'Open as markdown'
|
||||
macro pager P <pipe-entry>'cat >>/tmp/eeee' 'Open as markdown'
|
||||
|
||||
set wait_key = no
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
export PATH="$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
|
||||
export PATH="${HOME}/go/bin:${PATH}"
|
||||
[[ -d "${HOME}/.local/bin" ]] && export PATH="${HOME}/.local/bin:${PATH}"
|
||||
#prompt_cmd() {
|
||||
# PS1="$(~/git/cesium/cesium --mode ps1 --rc "$?" --shell bash)"
|
||||
# unset CESIUM_LAST_COMMAND_TIME
|
||||
#}
|
||||
#trap 'export CESIUM_LAST_COMMAND_TIME="$(date +%s)"' DEBUG
|
||||
#PROMPT_COMMAND=prompt_cmd
|
||||
export EDITOR=kak
|
||||
|
36
shell/.zshrc
36
shell/.zshrc
@ -1,6 +1,8 @@
|
||||
#zmodload zsh/zprof
|
||||
echo -ne '[ ]\r'
|
||||
for CONFIG (~/.zsh/*.zsh) source "$CONFIG"
|
||||
for i in ~/.zsh/*.zsh; do
|
||||
source "$i"
|
||||
done
|
||||
autoload -U compinit
|
||||
compinit
|
||||
setopt always_to_end # When completing from the middle of a word, move the cursor to the end of the word
|
||||
@ -51,15 +53,14 @@ dsl() {
|
||||
dedir() {
|
||||
# Try removing the directory if it's empty, fail silently if you can't
|
||||
rmdir "$1" 2>/dev/null && return
|
||||
# Make a uuid to avoid name conflicts
|
||||
# Avoid name conflicts
|
||||
# Ex: dediring sage when sage/sage fails because sage/sage is moved to .
|
||||
# but since sage/ exists, it can't be moved
|
||||
local name=$(uuidgen)
|
||||
# Move the directory to the uuid
|
||||
mv -n "$1" "$name" || return 1
|
||||
local TMP_DIR="$(mktemp -d --tmpdir=.)"
|
||||
mv -n "$1" "$TMP_DIR" || return 1
|
||||
# Move all files, use (N) in case there is no * or .* matches
|
||||
mv -n "$name"/{.,}*(N) . || return 2
|
||||
rmdir "$name" || return 3
|
||||
mv -n "$TMP_DIR/$1"/{.,}*(N) . || return 2
|
||||
rmdir "$TMP_DIR" || return 3
|
||||
}
|
||||
# Run multitail on logs
|
||||
mt() {
|
||||
@ -132,18 +133,18 @@ if test -f /etc/gentoo-release; then
|
||||
# Sudo echo so we have immediate results on weather sudo worked
|
||||
sudo echo "Args: $*"
|
||||
# Beep, verbose, ask
|
||||
sudo emerge --autounmask-write -Ava $*
|
||||
sudo emerge --autounmask-write -Ava "$@"
|
||||
tput bel
|
||||
}
|
||||
if ex eix-sync; then
|
||||
alias update="sudo eix-sync; tput bel"
|
||||
elif eix emaint; then
|
||||
elif ex emaint; then
|
||||
alias update="sudo emaint sync -A; tput bel"
|
||||
fi
|
||||
upgrade() {
|
||||
# Sudo echo so we have immediate results on weather sudo worked
|
||||
sudo echo "Args: $*"
|
||||
sudo emerge --update --newuse --deep --verbose --tree --keep-going=y --verbose-conflicts --alert --ask --binpkg-respect-use=y --binpkg-changed-deps=y --backtrack=30 $* @world
|
||||
sudo emerge --update --newuse --deep --verbose --tree --keep-going=y --verbose-conflicts --alert --ask --binpkg-respect-use=y --binpkg-changed-deps=y --backtrack=30 "$@" @world
|
||||
tput bel
|
||||
}
|
||||
elif test -f /etc/lsb-release; then
|
||||
@ -187,9 +188,9 @@ if ex sudo; then
|
||||
fi
|
||||
alias -g PA='2>&1 | paste'
|
||||
if ex rsync; then
|
||||
alias -g c='rsync --no-inc-recursive --partial -ha --info=progress2 "$@"'
|
||||
alias -g cfat='rsync --no-inc-recursive --partial -hrlc --info=progress2 "$@"'
|
||||
alias cp='rsync --no-inc-recursive --partial -ha --info=progress2 "$@"'
|
||||
alias -g c='rsync --no-inc-recursive --partial-dir=.rsync-partial -ha --info=progress2 "$@"'
|
||||
alias -g cfat='rsync --no-inc-recursive --partial-dir=.rsync-partial -hrlc --info=progress2 "$@"'
|
||||
alias cp='rsync --no-inc-recursive --partial-dir=.rsync-partial -ha --info=progress2 "$@"'
|
||||
fi
|
||||
alias -g nify=" > /dev/null 2>&1 &"
|
||||
alias -g nifyd=" > /dev/null 2>&1 & disown"
|
||||
@ -337,18 +338,17 @@ if [[ -f ~/.zsh-git/custom-config/zshrc ]]; then
|
||||
fi
|
||||
|
||||
function prompt_pre() {
|
||||
export CESIUM_LAST_COMMAND_TIME="$(date +%s)"
|
||||
CESIUM_LAST_COMMAND_TIME="$(date +%s)"
|
||||
}
|
||||
function prompt_cmd() {
|
||||
PS1="$(cesium --mode ps1 --rc "$?" --shell zsh)"
|
||||
RPS1="$(cesium --mode rps1 --rc "$?" --shell zsh)"
|
||||
PS1="$(CESIUM_LAST_COMMAND_TIME="$CESIUM_LAST_COMMAND_TIME" RC=$? cesium --mode ps1 --shell zsh)"
|
||||
RPS1="$(CESIUM_LAST_COMMAND_TIME="$CESIUM_LAST_COMMAND_TIME" RC=$? cesium --mode rps1 --shell zsh)"
|
||||
unset CESIUM_LAST_COMMAND_TIME
|
||||
}
|
||||
autoload -Uz add-zsh-hook
|
||||
precmd_functions+=(prompt_cmd)
|
||||
autoload -Uz add-zsh-hook
|
||||
add-zsh-hook preexec prompt_pre
|
||||
|
||||
|
||||
#function prompt_pre() {
|
||||
# CESIUM_LAST_COMMAND_TIME="$(date +%s)"
|
||||
#}
|
||||
|
@ -298,7 +298,7 @@ endif
|
||||
"The amazing Flappy Bird game | https://github.com/mattn/flappyvird-vim
|
||||
"Plug 'https://gitea.austenwares.com/vim/vim-gnupg'
|
||||
"GPG support | https://github.com/jamessan/vim-gnupg
|
||||
Plug 'https://gitea.austenwares.com/vim/vim-bracketed-paste'
|
||||
"Plug 'https://gitea.austenwares.com/vim/vim-bracketed-paste'
|
||||
"Automatic :set paste funcationality | https://github.com/ConradIrwin/vim-bracketed-paste
|
||||
"Plug 'https://gitea.austenwares.com/vim/HiCursorWords'
|
||||
"Highlight word under cursor automatically | http://www.vim.org/scripts/script.php?script_id=4306
|
||||
|
Loading…
Reference in New Issue
Block a user