summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/essentials/shell/functions.sh16
-rw-r--r--config/extra/mutt/muttrc1
2 files changed, 16 insertions, 1 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh
index d18a188..1413fd8 100644
--- a/config/essentials/shell/functions.sh
+++ b/config/essentials/shell/functions.sh
@@ -350,7 +350,7 @@ nvim_bindings() {
prj () {
pfx="$HOME/proj"
d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" |fzf)"
- [ -d "$pfx/$d" ] || exit 1
+ [ -d "$pfx/$d" ] || return 1
cd "$pfx/$d"
}
@@ -360,3 +360,17 @@ edit_git_file () {
[ "$f" ] || return 2
$EDITOR "$1"/"$f"
}
+
+# Wrapper to automatically add the key
+# could have been alias='SSH_ASKPASS=askpass SSH_ASKPASS_REQUIRE=prefer ssh'
+# but this option is very slow for some reason
+ssh() {
+ for arg in $@; do
+ if grep "Host $arg\s*\$" ~/.ssh/config > /dev/null 2>&1 ;
+ then
+ keyadd "$arg" 2> /dev/null
+ break
+ fi
+ done
+ /usr/bin/ssh $@
+}
diff --git a/config/extra/mutt/muttrc b/config/extra/mutt/muttrc
new file mode 100644
index 0000000..6554188
--- /dev/null
+++ b/config/extra/mutt/muttrc
@@ -0,0 +1 @@
+source /home/aluc/.config/mutt/configs/luca@spacehb.net.muttrc