For macOS
This commit is contained in:
parent
300fd1b732
commit
703a42a5f8
|
@ -5,7 +5,7 @@
|
|||
key="$1"; shift
|
||||
args=("$@")
|
||||
|
||||
otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp.*: ?.*$' | cut -d ':' -f 2 | sed 's/ //g')"
|
||||
otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp' | cut -d ':' -f 2 | sed 's/ //g')"
|
||||
otp_status="$?"
|
||||
[[ $otp_status != 0 ]] && { echo "pass command failed with exit code $otp_status"; exit 1; }
|
||||
[[ -z $otp ]] && { echo "No OTP secret found for pass entry '$key'"; exit 2; }
|
||||
|
|
|
@ -40,6 +40,15 @@ function fish_greeting;
|
|||
test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr)
|
||||
end
|
||||
|
||||
if has_command brew && test -f (brew --prefix asdf)/lib/asdf.fish
|
||||
set -Ux ASDF_DIR (brew --prefix asdf)
|
||||
source (brew --prefix asdf)/lib/asdf.fish
|
||||
else if test -f $HOME/.asdf/asdf.fish
|
||||
source $HOME/.asdf/asdf.fish
|
||||
else if test -f /opt/asdf-vm/asdf.fish
|
||||
source /opt/asdf-vm/asdf.fish
|
||||
end
|
||||
|
||||
# assume the user uses "$HOME" to just store their mess of dotfiles and other
|
||||
# nonsense that clutters it up and that they have a preferred starting
|
||||
# directory where they keep the stuff they actually care about
|
||||
|
@ -47,9 +56,3 @@ end
|
|||
if test $PWD = $HOME; or test $PWD = $NICE_HOME;
|
||||
cd $NICE_HOME || cd
|
||||
end
|
||||
|
||||
if test -f $HOME/.asdf/asdf.fish
|
||||
source $HOME/.asdf/asdf.fish
|
||||
else if test -f /opt/asdf-vm/asdf.fish
|
||||
source /opt/asdf-vm/asdf.fish
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -Ux GOPATH $HOME/.go
|
||||
|
||||
set -g fish_user_paths \
|
||||
set paths_candidates \
|
||||
$HOME/.go \
|
||||
$GOPATH/bin \
|
||||
$DOTFILES_PATH/common/bin \
|
||||
|
@ -12,7 +12,7 @@ set -g fish_user_paths \
|
|||
$HOME/.yarn/bin \
|
||||
$HOME/.netlify/helper/bin
|
||||
|
||||
for d in $ENV_PATH/*/bin
|
||||
for d in $paths_candidates $ENV_PATH/*/bin
|
||||
test -d $d && set -ga fish_user_paths $d
|
||||
end
|
||||
|
||||
|
|
Reference in a new issue