mirror of https://github.com/jarun/nnn.git
fix: use a more generic way to print NUL with awk
Only gawk undestands the \0 syntax
This commit is contained in:
parent
505f46a1ed
commit
b43e0bd084
2
nnn.1
2
nnn.1
|
@ -353,7 +353,7 @@ Handy bash/zsh shell function to list files by mime-type in current directory:
|
|||
|
||||
list ()
|
||||
{
|
||||
find . -maxdepth 1 | file -if- | grep "$1" | awk -F: '{printf "%s\0", $1}' | nnn
|
||||
find . -maxdepth 1 | file -if- | grep "$1" | awk -F: '{printf "%s%c", $1, 0}' | nnn
|
||||
}
|
||||
.Ed
|
||||
.Pp
|
||||
|
|
|
@ -12,4 +12,4 @@ printf "mime (e.g., video/audio/image): "
|
|||
read -r mime
|
||||
|
||||
printf "%s" "+l" > "$NNN_PIPE"
|
||||
find . | file -if- | grep "$mime" | awk -F: '{printf "%s\0", $1}' > "$NNN_PIPE"
|
||||
find . | file -if- | grep "$mime" | awk -F: '{printf "%s%c", $1, 0}' > "$NNN_PIPE"
|
||||
|
|
Loading…
Reference in New Issue