Open
Description
The code only handles Include
directives in the SSH config with relative paths or in the home dir (~
). To also support absolute paths, we need another alternative:
diff --git a/zsh-ssh.zsh b/zsh-ssh.zsh
index 9d0ce5d..ad175c8 100644
--- a/zsh-ssh.zsh
+++ b/zsh-ssh.zsh
@@ -19,7 +19,10 @@ _parse_config_file() {
while IFS= read -r line || [[ -n "$line" ]]; do
if [[ $line =~ ^[Ii]nclude[[:space:]]+(.*) ]] && (( $#match > 0 )); then
local include_path="${match[1]}"
- if [[ $include_path == ~* ]]; then
+ if [[ $include_path == /* ]]; then
+ # Absolute path, use as-is
+ expanded_include_path="$include_path"
+ elif [[ $include_path == ~* ]]; then
# Replace the first occurrence of "~" in the string with the value of the environment variable HOME.
local expanded_include_path=${include_path/#\~/$HOME}
else
Metadata
Metadata
Assignees
Labels
No labels