fzf: Add support for any file in 'describe'
parent
0a19222f60
commit
b93a58f4c2
|
@ -1,13 +1,21 @@
|
||||||
function describe -d 'Extend on "type" for executables'
|
function describe -d 'Extended "type"'
|
||||||
for i in $argv
|
for i in $argv
|
||||||
switch (type -t $i)
|
set typ (type -t $i ^ /dev/null)
|
||||||
|
if test $status -ne 0
|
||||||
|
set -l path $i
|
||||||
|
ls -l $path
|
||||||
|
file $path | cut -d':' -f2 | cut -b 2-
|
||||||
|
type -pq pacman; and pacman -Qo $path ^ /dev/null
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
switch $typ
|
||||||
case file
|
case file
|
||||||
set -l path (type -p $i)
|
set -l path (type -p $i)
|
||||||
ls -l $path
|
ls -l $path
|
||||||
file $path | cut -d':' -f2 | cut -b 2-
|
file $path | cut -d':' -f2 | cut -b 2-
|
||||||
type -pq pacman; and pacman -Qo $path
|
type -pq pacman; and pacman -Qo $path ^ /dev/null
|
||||||
case '*'
|
case '*'
|
||||||
type $i
|
type $i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue