-
-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracker #1537
Comments
does the wiki says that without atool, pressing enter on an archive opens it with the opener, and with atool instead pressing enter will show options? |
When atool is not available default opener is used. atool/bsdtar are optional. |
That's not the question. The question is: does the wiki says that without atool, pressing enter on an archive opens it with the opener, and with atool instead pressing enter will show options? |
See https://github.com/jarun/nnn/wiki/Usage#dependencies It's doesn't have to. The system default opener invokes a tool which The opener only takes the file name/path. |
I didn't say nnn should know which options the software called by the opener provides. I said that the wiki (not the software) should say that, if you hover over a file with an extensions that matches
The wiki doesn't have to document the behavior of |
Exactly. When the optional tool is not present, the default behaviour is to call the opener. Otherwise, if |
Carry the option chosen by the user? I don't see how that answer my objection. The objection is: the wiki should say that:
Even if atool is optional, the wiki still should say that the behaviour changes when the optional I didn't have atool installed. I hovered over an archive and pressed Enter. (I think) the opener was called on that file since it got opened in GNOME Archive. Then I went to the wiki and looked on how to extract archives with Then I googled it and found this. It said that by pressing Enter on the archive Since the poster said "I have atool", I guessed that the behavior would change with atool installed. So I installed it and it did. I think that this behavior should be documented, I should not had to google it (only look for it in the wiki) and I should not had to guess it. This doesn't imply in any way shape or form that atool should be compulsory. |
I don't understand why you keep talking about the software. I'm talking about the wiki, not about the software. |
Maybe under Basic use cases create a new section "Manage archives".
|
It says very clearly in the Depedencies section that:
And then in the Configuration section that:
Your problem is you have defined |
Even without If you do not have the utility to handle a specific archive type, the default opener will be invoked. |
Yes, that's what I said here. I don't need additional troubleshooting :)
It says how to set It doesn't say what happens if you have It is also misleading because in the Dependencies section you linked it says "for more formats (install) atool". So it looks like it is needed only if you want to support additional formats. Instead no, the behavior changes and with that tool
That's undocumented as well. There is no
That's what I said here and after that. You continue to tell me what happens in various cases. I already figured that out by googling and by trial and error. I just would like for this to be written in the wiki. |
That behavior is documented in the manpage as far as I can see:
|
calm down |
Anyone know what binding triggers the behavior that when opening the file, the cursor moves to the next item? Really annoying I toggle that by accident but not sure what key to toggle it back so I need to restart the instance. |
The program help shows with
|
Use case: use nnn as an xdg-desktop-portal file chooser through https://github.com/GermainZ/xdg-desktop-portal-termfilechooser |
Check the picker mode. Option
|
|
I made a fork of xdg-desktop-portal-termfilechooser that allows a FileChooser portal with |
@raffaem how does it handle the workflow of browser suggesting the default filename for the file to save? |
It separates the dir from the filename. The dir is opened in nnn, and the filename is copied to the system clipboard. |
Awesome! |
The way this is usually done, including the wiki example we already have, is to create an empty file with the suggested name which can be selected immediately. |
But then you have to manually delete the file if you want to save to another name. And you are stuck with it if you forget to delete it. Maybe have an option that pass the default name to readline? |
The major problem is it percolates deep down and through several checks. And then there are the cases of overwrite, cancellation and so on. The current arrangement seems to be the best to me. |
You can simply delete the suggested file if it is still empty when nnn closes (which is what the wiki example does). |
Oh, I see. What if the folder has a lot of files? How do you find which file to select, if you want to save in the default position? |
Pass the suggested file as argument to nnn and nnn will place the cursor there on startup. |
That makes sense. Is this one the wiki entry you are referring to? |
At commit 2a673b4 I have made a change to allow overwriting existing regular files on new file creation. |
This may not help immediately but I am thinking of options to allow creation of non existent files on passing the option at startup. |
See commit 56fd6ea for an implementation of creating a new file at startup. Note that the parent directory, if passed, much exist and has to be accessible. Otherwise I implemented it because I see a faster workflow where I can just |
All right, I finished the work on my fork for now. I implemented the suggested workflow (touching a new file on save and deleting it afterwards if it's empty). Also my fork should now work out-of-the-box: just install it and change the configuration file.
Thanks, I will take a look at it. |
Lifted all restrictions at commit d4c3e52. |
Following the latest commit, I have removed the creation of file from the wrapper and now I delegate all to nnn. But there is something that makes me uncomfortable with this implementation.
|
Otherwise, you can pass the complete tree as well.
|
Suppose neither Call |
Yes, that is the correct behaviour as of now. The file is being created in another directory. In a regular workflow, the user may not want to switch to the other directory yet, hence she didn't switch first and then create. I will think more on this. |
But can you switch first if readline is waiting for the input? If we can implement navigation while readline is waiting for user input that would be perfect |
No we can't. |
@raffaem I think your previous wrokflow is better - open the default and copy the filename to clipboard. I don't want to over-complicate things here. |
@jarun How vigilant do we want to be with what is considered a dependency for plugins? The list is a bit inconsistent and I'm not exactly sure what should and shouldn't be considered a dependency. |
Generally speaking, the base utilities installed by default OR which are well-known are left out. |
Rolled from #1454.
Cooking
Up for grabs
None open at the time.
Contribution guideline.
The text was updated successfully, but these errors were encountered: