x in the checkbox along with the information)nnn masterI would like to enable cd on quit and for that I need to execute nnn with n, if I understood correctly. However, I also want to always run nnn with the -aA options, and wanted to create an alias for that. With alias nnn='nnn -aA', I can automatically run those options, but cd on quit doesn't work in that case. Reciprocally, if I start nnn with just n, the -aA options are not set.
Creating an alias as n instead of nnn to combine both creates a conflict with the cd on quit script, which then fails on the first line when sourcing .bashrc.
I am sure there is a proper way to avoid setting an alias and just embed -aA somewhere inside the cd on quit script, but in that case I would need a pointer. If this is possible, it would also be useful to indicate with a comment where extra options can be set by the user to combine cd on quit and command line options.
You need a wrapper function. Please refer to the following script: https://github.com/jarun/nnn/blob/master/misc/quitcd/quitcd.bash_zsh
Read the notes on cd on quit and change line 21:
nnn "$@"
to
nnn -aA "$@"
The scripts are linked from Step 3 in Quickstart: https://github.com/jarun/nnn#quickstart
BTW, did you consider submitting SailfishOS to repology? Given the number of distros *nix has and package managers, I find the centralized database of package availability extremely handy and useful. Helps me find dated distros easily. Helps the community much more.
@AMDmi3 (who maintains the project) can help if you have any questions.
I read the quickstart and the notes on the script, I had it added to my .bashrc already and it was working perfectly before I tried to combine that with options.
I tried adding them on the same line actually, but that failed. That was probably because my environment was already altered by the previous attempts to combine alias and cd on quit.
[Edit] Retested with a clean environment after reboot, it works, thanks! I did the right thing at one moment, but sadly this didn't have any effect because of my failed attempts before.
Wouldn't it make sense to add a comment on that line in the script? Something along those lines:
# If you want to run nnn with cd on quit *and* command line options by just typing "n", add the options on this line, i.e., nnn -A "$@"
nnn "$@"
I checked repology but I don't know that tool, I didn't even find where to add a distribution when I was on the page. I didn't want to bother you with this and just thought I would try again later when I have some more time. To be honest I am in my very early days of packaging anything, still a lot to learn, including such tools. You would faint if you saw my workflow.
If you want to run nnn with cd on quit and command line options, add the commands on this line and then run nnn with "n"
This is implied because the enclosing function name is n.
To be honest I am in my very early days of packaging anything
You probably don't need to package anything. The data you need to provide to repology would be the versions of your packages which should be available already, may be in a different format.
I think this may be the procedure to help: https://github.com/repology/repology-updater#running
@AMDmi3 correct me if I'm wrong.
Thanks, I'll have a look.
I think I cannot combine -S with cd on quit with ^G (without export): when -S is enabled, quitting all contexts at once with Q will always cd to the path of the current context, and quitting with q will close contexts one by one so it will cd to the path of the last one. Ideally -S could be compatible with cd on ^G, but I don't know how to achieve that.
On Friday, 5 June 2020, Mischievous Meerkat wrote:
To be honest I am in my very early days of packaging anything
You probably don't need to package anything. The data you need to provide to repology would be the versions of your packages which should be available already, may be in a different format.
I think this may be the procedure to help: https://github.com/repology/repology-updater#running
@AMDmi3 correct me if I'm wrong.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/jarun/nnn/issues/635#issuecomment-63921235
Forget what I just said, it works. I must be drunk. Sorry.
On Friday, 5 June 2020, Mischievous Meerkat wrote:
To be honest I am in my very early days of packaging anything
You probably don't need to package anything. The data you need to provide to repology would be the versions of your packages which should be available already, may be in a different format.
I think this may be the procedure to help: https://github.com/repology/repology-updater#running
@AMDmi3 correct me if I'm wrong.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/jarun/nnn/issues/635#issuecomment-63921235
Yes, it helps if users explore more before reporting issues. All the nnn devs keep busy due to other professional/personal commitments and looking into non-issues is a waste of our time.
You probably don't need to package anything. The data you need to provide to repology would be the versions of your packages which should be available already, may be in a different format.
Well, yes, details are in the Docs section on the site. It should be easy since SailfishOS seem to use OBS, and we already have/have had support for OBS using projects already (Mer in particular, before it had all packages gone from the repository). Basically, I'd just need to know which project https://build.sailfishos.org/project/list_public can be used, as obvious ones like sailfishos:latest contain no packages.
Actually I did not build on OBS that time, I would need to work on a better .spec file to build from sources. This time I just built on device, packaged that, and distributed using the community repository (openrepos.net).
Using OBS in the future would definitely be better. There is no way I can keep up with the development speed of nnn though, so Il will probably just package some releases here and there. This may take time before I have a working .spec file though, I have some documentation reading to do before I can understand all the macros. I will ping you in this thread when it's done for inclusion in Repology.