mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Don't use camcontrol in FreeBSD zpool completions
It requires root/su privileges to list devices, and we have a great alternative that already produces the desired results.
This commit is contained in:
parent
fc7d11d7b8
commit
93b02dcec4
1 changed files with 1 additions and 4 deletions
|
@ -46,10 +46,7 @@ function __fish_zpool_list_available_vdevs
|
|||
if test $OS = 'Linux'
|
||||
find /dev -type b | string replace '/dev/' ''
|
||||
else if test $OS = 'FreeBSD'
|
||||
for i in (camcontrol devlist | cut -d "(" -f 2 | cut -d "," -f 1)
|
||||
set -l files /dev/*
|
||||
string replace /dev/ '' -- $files | string match -r "^$i"
|
||||
end
|
||||
sysctl -an kern.disks | string split ' '
|
||||
else if test $OS = 'SunOS'
|
||||
find /dev/dsk -type b | string replace '/dev/' ''
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue