tmux fzf and 1password

This commit is contained in:
Noah Masur
2020-07-30 21:12:17 -04:00
parent 191a29079c
commit 3949f763f4
13 changed files with 105 additions and 20 deletions

View File

@ -27,13 +27,15 @@ if status --is-interactive
# Colors
theme_gruvbox
# Aliases
aliases
# Individual features
aliases
pyenv
notes
aws
mactools
# Fuzzy finder
fzf_key_bindings
# Use `starship` prompt
starship init fish | source

View File

@ -9,7 +9,9 @@ SETUVAR _fish_abbr_cat:bat
SETUVAR _fish_abbr_d:deactivate
SETUVAR _fish_abbr_db:docker\x20build\x20\x2e\x20\x2dt
SETUVAR _fish_abbr_dc:\x24DOTS/bin/docker_cleanup
SETUVAR _fish_abbr_dr:docker\x20run
SETUVAR _fish_abbr_de:docker\x20exec\x20\x2dit
SETUVAR _fish_abbr_dr:docker\x20run\x20\x2d\x2drm\x20\x2dit
SETUVAR _fish_abbr_ds:docker\x20ps\x20\x2da
SETUVAR _fish_abbr_falias:vim\x20\x24HOME/\x2econfig/fish/functions/aliases\x2efish
SETUVAR _fish_abbr_fishal:vim\x20\x24HOME/\x2econfig/fish/functions/aliases\x2efish
SETUVAR _fish_abbr_fishrc:vim\x20\x24HOME/\x2econfig/fish/config\x2efish
@ -18,6 +20,7 @@ SETUVAR _fish_abbr_g:git
SETUVAR _fish_abbr_ga:git\x20add\x20\x2dA
SETUVAR _fish_abbr_gc:git\x20commit\x20\x2dm
SETUVAR _fish_abbr_gd:git\x20diff
SETUVAR _fish_abbr_get_2D_fingerprint:ssh\x2dkeyscan\x20myhost\x2ecom\x20\x7c\x20ssh\x2dkeygen\x20\x2dlf\x20\x2d
SETUVAR _fish_abbr_gp:git\x20push
SETUVAR _fish_abbr_gs:git\x20status
SETUVAR _fish_abbr_gu:git\x20pull
@ -30,6 +33,7 @@ SETUVAR _fish_abbr_ll:ls\x20\x2dalhF
SETUVAR _fish_abbr_misty:cd\x20\x24PROJ/misty
SETUVAR _fish_abbr_oldcat:cat
SETUVAR _fish_abbr_p:python
SETUVAR _fish_abbr_public_2D_key:ssh\x2dkeygen\x20\x2dy\x20\x2df\x20\x7e/\x2essh/id_rsa\x20\x3e\x20\x7e/\x2essh/id_rsa\x2epub
SETUVAR _fish_abbr_py:python
SETUVAR _fish_abbr_runbootstrap:\x24DOTS/scripts/bootstrap
SETUVAR _fish_abbr_sshc:vim\x20\x7e/\x2essh/config
@ -64,3 +68,4 @@ SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/usr/local/opt/fzf/bin

View File

@ -49,11 +49,15 @@ function aliases --description 'All aliases'
alias proj='cd $PROJ'
abbr -a ssl 'openssl req -new -newkey rsa:2048 -nodes' \
'-keyout server.key -out server.csr'
abbr -a get-fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -'
abbr -a public-key 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub'
# Docker
abbr -a dc '$DOTS/bin/docker_cleanup'
abbr -a dr 'docker run'
abbr -a dr 'docker run --rm -it'
abbr -a db 'docker build . -t'
abbr -a ds 'docker ps -a'
abbr -a de 'docker exec -it'
alias connect='docker run --rm -v ~/.aws:/root/.aws -v ~/.ssh:/root/.ssh -it connect-aws'
# Terraform

View File

@ -0,0 +1 @@
/usr/local/opt/fzf/shell/key-bindings.fish

View File

@ -0,0 +1,7 @@
#!/usr/local/bin/fish
function mactools
function copy --description 'Copy file contents into clipboard'
cat $argv | pbcopy
end
end

View File

@ -13,6 +13,16 @@ function 'pyenv' --description 'Features for Pyenv virtualenvs'
source ~/.pyenv/versions/$argv[1]/bin/activate.fish
end
# vers - switch to pyenv virtualenv with fuzzy menu
function 'vers' --description 'Switch to virtualenv'
set pyversion (bash -c "pyenv versions --bare --skip-aliases" | fzf)
if test $status -ne 0
return 1
else
source "$PYENV_VERSIONS_DIR/$pyversion/bin/activate.fish"
end
end
function 'ipy' --description 'Borrow iPython interpreter'
set STORED_VENV $VIRTUAL_ENV
source $PYENV_VERSIONS_DIR/ipython/bin/activate.fish; and \