Some fish functions

This commit is contained in:
2019-01-30 03:30:41 -05:00
parent 1e69a014f3
commit e5456c8f52
10 changed files with 45 additions and 13 deletions

View File

@@ -5,15 +5,15 @@ if status is-login
exec startx -- -keeptty
end
end
set -x GPG_TTY=$(tty)
set -x GPG_TTY (tty)
# }}} login to X #
# input
xset r rate 200 60
fish_vi_key_bindings
set -x EDITOR /usr/bin/nvim
set -x VISUAL /usr/bin/nvim
set -x EDITOR nvim
set -x VISUAL nvim
builtin cd $last_dir
@@ -30,3 +30,10 @@ source $spv_dir/src/api-keys.sh
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
set -x PATH $PATH /home/kevin/linux-config/scripts
set -x PASSWORD_STORE_CLIP_TIME 120
# fxn abbr's
abbr ag "grep-aliases"
abbr gcamp "git-amend-push"
abbr hs "scan-history"
abbr ut "unix-timestamp"
abbr z "zathura-silent"

View File

@@ -0,0 +1,5 @@
function git-amend-push
git add -A .
and git commit --amend --no-edit -S
and git push --force
end

View File

@@ -1,4 +1,4 @@
function gx
function grep-aliases
set key_aliases /home/kevin/linux-config/aliases/key_aliases
grep $argv[1] $key_aliases
end

View File

@@ -0,0 +1,5 @@
function scan-history
sudo systemctl start postgresql.service
and $spv_dir/src/update-history.sh
and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1
end

View File

@@ -0,0 +1,4 @@
# convert unix timestamp
function unix-timestamp
date -d @$argv[1]
end

View File

@@ -1,2 +1,4 @@
function vsnp
set snips_dir "/home/kevin/.vim/plugged/vim-snippets/UltiSnips"
echo $EDITOR $snips_dir/$argv[1]
end

View File

@@ -0,0 +1,3 @@
function zathura-silent
zathura $argv[1] > /dev/null 2>&1&
end