mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
Updated Advanced use cases (markdown)
parent
cdf107f999
commit
eaebd0212d
|
@ -132,11 +132,13 @@ To use `nnn` as the file picker dialog for chromium browsers, create a script `k
|
|||
#!/bin/sh
|
||||
while :; do case $1 in
|
||||
--getsavefilename) file="$2" break ;;
|
||||
--version) printf ""; exit ;;
|
||||
--*) shift ;;
|
||||
*) break ;;
|
||||
esac done
|
||||
file="${file##/*/}"
|
||||
st -c picker sh -c "nnn -S -s picker -p - | awk '{ print system(\"[ -d \" \$0 \" ]\") ? \$0: \$0\"/${file##/*/}\" }' > /proc/$$/fd/1"
|
||||
|
||||
```
|
||||
|
||||
This example sets the class for `st` to `picker` and `nnn` uses a named session `picker`. This allows you to for example have the picker window float by default in your window manager and `nnn` remembers where your previous "Save as..." target was. Replace with your preferred terminal and `nnn` options if applicable.
|
||||
|
|
Loading…
Reference in a new issue