config/shell: script adjustments
This commit is contained in:
parent
738458c5f2
commit
978a1fbd85
|
@ -19,7 +19,7 @@ Plug 'bkad/CamelCaseMotion' " move through camel case words
|
|||
" commands
|
||||
Plug 'inkarkat/vim-ReplaceWithRegister' " gr to replace with register
|
||||
Plug 'tpope/vim-commentary' " gc to comment out (gcap for paragraph)
|
||||
Plug 'junegunn/vim-easy-align' " ga to align stuff
|
||||
Plug 'junegunn/vim-easy-align' " gaip*= - align in paragraph all equal signs
|
||||
xmap ga <Plug>(EasyAlign)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
" libs
|
||||
|
|
|
@ -10,6 +10,7 @@ alias -g L="--color=always | ${PAGER:-less}"
|
|||
fi
|
||||
|
||||
alias h='help'
|
||||
compdef help=which
|
||||
alias info='info --vi-keys'
|
||||
|
||||
d() { cd $(zf "$@") }
|
||||
|
@ -30,7 +31,6 @@ ulimit -c unlimited # Enable core dumps
|
|||
|
||||
which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2) || true
|
||||
|
||||
compdef help=info
|
||||
unalias rd 2>/dev/null
|
||||
rd() {
|
||||
for f in "$@"
|
||||
|
@ -58,14 +58,14 @@ wh() {
|
|||
compdef wh=which
|
||||
|
||||
alias calc='rlwrap -a bc -l'
|
||||
alias logoff="loginctl terminate-user $USER"
|
||||
blues() { bluedevil-sendfile $(echo "$@" | xargs -n 1 realpath | xargs -n 1 echo -n " --files") }
|
||||
|
||||
alias j='jrnl'
|
||||
jn() { jrnl -to today "$@" | bat --style=plain --pager="less +G" }
|
||||
compdef jn=jrnl
|
||||
alias jnc='jn -contains'
|
||||
|
||||
alias logoff="loginctl terminate-user $USER"
|
||||
|
||||
# Some aliases
|
||||
alias edgrub='sudoedit /etc/default/grub && sudo update-grub'
|
||||
alias edenv='sudoedit /etc/environment'
|
||||
|
|
|
@ -22,5 +22,5 @@ if test "$#" -gt 0
|
|||
fi
|
||||
else
|
||||
find "$DATA/2-standards/notes/journal" -name "intentions*sync-conflict*" -exec sh -c 'basename {} | cut -d. -f1 | xargs -i% jrnl % --import --file {}' \; -delete
|
||||
find -name '*sync-conflict*' -exec st-diff $quick '{}' \;
|
||||
find -name '.stfolder' -prune -o -name '*sync-conflict*' -exec st-diff $quick '{}' \;
|
||||
fi
|
||||
|
|
|
@ -7,7 +7,7 @@ set -o noglob
|
|||
query=$(zoxide query -sl "$@")
|
||||
# First find out whether there is an obvious match (score at least ten times that of runner-up)
|
||||
# If not select with fzf, using locate to find extra options
|
||||
( expr $(echo "$query" | sed 'N;s|/.*\n|> 10 *|;q' | sed 's| */.*||') >/dev/null &&
|
||||
( expr $(echo "$query" | sed 'N;s|/.*\n|> 10 *|;q' | sed 's| */.*||') >/dev/null 2>&1 &&
|
||||
echo "$query" | head -1 ||
|
||||
( echo "$query"; locate --basename --existing "$@" | while read -r file; do test -d "$file" && echo "$file"; done | sed 's/^/ 0 /' ) |
|
||||
fzf -0 -1 -n2.. --tiebreak=index --preview="ls -a --color --human-readable --group-directories-first --file-type {2..}" --preview-window=20% ) | tr -s ' ' | cut -d' ' -f3-
|
||||
|
|
Loading…
Reference in New Issue