fix(zsh): apply formatting

This commit is contained in:
2024-07-27 18:27:10 +02:00
parent 61fe8c2e6e
commit 7489e0cf84
+18 -19
View File
@@ -93,7 +93,6 @@ function set_terminal_title() {
function precmd() {
set_terminal_title
}
# function preexec() { set_terminal_title "$1" }
function ssh_with_title() {
local host=""
@@ -101,25 +100,25 @@ function ssh_with_title() {
for arg in "$@"; do
case "$arg" in
-[bcDeFIiLlmOopRSWw]?*)
# Option with argument immediately after, like -p22
-[bcDeFIiLlmOopRSWw]?*)
# Option with argument immediately after, like -p22
skip_next="false"
;;
-[bcDeFIiLlmOopRSWw])
# Option with argument on next iteration
skip_next="true"
;;
-*)
# Any other option, assumed not to take an argument
skip_next="false"
;;
*)
if [ "$skip_next" = "true" ]; then
skip_next="false"
;;
-[bcDeFIiLlmOopRSWw])
# Option with argument on next iteration
skip_next="true"
;;
-*)
# Any other option, assumed not to take an argument
skip_next="false"
;;
*)
if [ "$skip_next" = "true" ]; then
skip_next="false"
else
host="${arg#*@}"
fi
;;
else
host="${arg#*@}"
fi
;;
esac
done