From 93209ab05367ff3ca9906d9c103a97ef370af860 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 6 Mar 2018 17:55:25 +0100 Subject: [PATCH] Fix termux path This is "/data/data/com.termux/files/usr/etc", not just ".../files/etc". --- share/functions/__fish_print_hostnames.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 7f40760d3..cad1f18b4 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -20,9 +20,10 @@ function __fish_print_hostnames -d "Print a list of known hostnames" # Check hosts known to ssh. # Yes, seriously - the default specifies both with and without "2". # Termux puts these in the android data directory if not rooted. - # Unfortunately there doesn't seem to be a way to get that path without hardcoding it. + # The directory is available as $PREFIX/etc, but that variable name is so generic that + # it would cause false-positives. # Also, some people might use /usr/local/etc. - set -l known_hosts ~/.ssh/known_hosts{,2} {/data/data/com.termux/files,/usr/local,}/etc/ssh/{,ssh_}known_hosts{,2} + set -l known_hosts ~/.ssh/known_hosts{,2} {/data/data/com.termux/files/usr,/usr/local,}/etc/ssh/{,ssh_}known_hosts{,2} # Check default ssh configs. set -l ssh_config # Get alias and commandline options.