We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92d2928 commit c986988Copy full SHA for c986988
lazy-connect.sh
@@ -64,16 +64,15 @@ EOF
64
}
65
66
function lazy-connect() {
67
- while getopts "iah" opt; do
+ while getopts "ih" opt; do
68
case $opt in
69
h)
70
echo "Usage"
71
+ return 0
72
;;
73
i)
74
_lazy_connect_init
- ;;
75
- a)
76
- echo "Connect all"
77
78
\?)
79
echo "Invalid Option: -$OPTARG."
@@ -87,4 +86,10 @@ function lazy-connect() {
87
86
88
esac
89
done
+
90
+ config_dir=~/.config/lazy-connect
91
+ secret=$(cat $config_dir/secret)
92
+ vpn_name=$(cat $config_dir/vpns \
93
+ | fzf --height=10 --ansi --reverse)
94
+ [ -z "$vpn_name" ] || _lazy_connect $vpn_name $secret
95
0 commit comments