mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Stringify reading nfs in print_hostnames
This commit is contained in:
parent
a5f5e6c1ef
commit
94c12d84e2
@ -15,8 +15,8 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
|
|||||||
| string replace -r '[0-9.]*\s*' '' | string trim | string replace -ra '\s+' '\n'
|
| string replace -r '[0-9.]*\s*' '' | string trim | string replace -ra '\s+' '\n'
|
||||||
end
|
end
|
||||||
# Print nfs servers from /etc/fstab
|
# Print nfs servers from /etc/fstab
|
||||||
if test -r /etc/fstab
|
if test -r /etc/fstab
|
||||||
__fish_sgrep </etc/fstab "^\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\|[a-zA-Z.]*\):"|cut -d : -f 1
|
string match -r '^\s*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3]:|[a-zA-Z\.]*:' </etc/fstab | string replace -r ':.*' ''
|
||||||
end
|
end
|
||||||
|
|
||||||
# Print hosts with known ssh keys
|
# Print hosts with known ssh keys
|
||||||
|
Loading…
x
Reference in New Issue
Block a user