-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_funcs
42 lines (37 loc) · 821 Bytes
/
.bash_funcs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
hob_ssh() {
ssh_nc "u@$1.local"
}
ssh_nc() {
local cmd
if [ "$TERM" == "xterm-kitty" ]; then
cmd="kitten ssh"
else
cmd="ssh"
fi
$cmd $SSH_NCOPTS "$@" \
2> >(grep -v "^Warning: Permanently added" >&2)
}
scp_nc() {
scp $SSH_NCOPTS "$@" \
2> >(grep -v "^Warning: Permanently added" >&2)
}
nvim_dap() {
if [ "$1" == "" ]; then
return
fi
case "$1" in
("rust"|"c"|"python"|"bash")
cp "$HOME/.config/nvim/dap-conf/$1.lua" .nvim-dap.lua
;;
("sh")
cp "$HOME/.config/nvim/dap-conf/bash.lua" .nvim-dap.lua
;;
("cpp"|"cc")
cp "$HOME/.config/nvim/dap-conf/c.lua" .nvim-dap.lua
;;
(*)
echo "unexpected $1"
;;
esac
}