1
1
mirror of https://github.com/jarun/nnn.git synced 2024-10-26 14:28:31 +03:00

Updated Advanced use cases (markdown)

luukvbaal 2022-07-27 00:42:06 +02:00
parent 4fc114bf05
commit d8a2b39bf0

@ -203,25 +203,6 @@ if [ "$save" = 1 ]; then
fi
```
Then make sure #!/bin/sh
save="$3"
suggest="$4"
out="$5"
file="${suggest##/*/}"
if [ "$save" = 1 ]; then
touch "$suggest"
fi
st -c picker sh -c "nnn -J -p - '$suggest' | awk '{ print system(\"[ -d '\''\"\$0\"'\'' ]\") ? \$0 : \$0\"/$file\" }' > '$out'"
if [ "$save" = 1 ]; then
if [ ! -s "$out" ] || [ ! -s "$suggest" ]; then
rm "$suggest"
fi
fi
```
Then make sure `widget.use-xdg-desktop-portal.file-picker == 1` in `about:config` firefox should use `nnn` as filechooser.
## Launch `nnn` with a keyboard shortcut