Skip to content

Instantly share code, notes, and snippets.

@anosatsuk124
Last active October 26, 2022 23:33
Show Gist options
  • Save anosatsuk124/92fa8d3465bf3d5e25643217ef584a34 to your computer and use it in GitHub Desktop.
Save anosatsuk124/92fa8d3465bf3d5e25643217ef584a34 to your computer and use it in GitHub Desktop.
#! /usr/bin/env fish
set -gx BW_SESSION (tmux showenv BW_SESSION | cut -d= -f2)
#! /bin/sh
BW_SESSION=$(bw unlock --raw)
while [ $? -ne 0 ]; do
BW_SESSION=$(bw unlock --raw)
done
exec tmux new-session "$@" \; \
setenv BW_SESSION "${BW_SESSION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment