Git Product home page Git Product logo

Comments (6)

vaygr avatar vaygr commented on May 14, 2024

More debugging info:

Starting program: /home/user/nnn-1.5/nnn 
[New process 99364]

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 565247]
*_libc_strtol (nptr=0x0, endptr=0x0, base=10) at /usr/src/lib/libc/stdlib/strtol.c:68
68      /usr/src/lib/libc/stdlib/strtol.c: No such file or directory.
        in /usr/src/lib/libc/stdlib/strtol.c
(gdb) bt
#0  *_libc_strtol (nptr=0x0, endptr=0x0, base=10) at /usr/src/lib/libc/stdlib/strtol.c:68
#1  0x000002656d897530 in *_libc_atoi (str=Variable "str" is not available.
) at /usr/src/lib/libc/stdlib/atoi.c:36
#2  0x0000026307a013a0 in spawn (file=0x7f7ffffd0d0f "/bin/ksh", arg1=0x0, arg2=0x0, dir=0x26307c0fde0 "/home/user/nnn-1.5", flag=129 '\201') at nnn.c:571
#3  0x0000026307a072d9 in browse (ipath=0x26307c101e0 "/home/user/nnn-1.5", ifilter=0x26307b0a6fc "^[^.]") at nnn.c:2775
#4  0x0000026307a078c0 in main (argc=1, argv=0x7f7ffffd0a78) at nnn.c:2937

from nnn.

vaygr avatar vaygr commented on May 14, 2024

I guess the answer is $SHLVL is not supported by ksh. It is supported by bash, mksh and fish
however -- I checked those. But since it's only an info message, maybe it can be optional.

from nnn.

jarun avatar jarun commented on May 14, 2024

First, thanks a lot for testing nnn out and for the issues and PRs! I will review and pull them in a few hours.

Regarding the issue:

It can be optional but it's quite helpful. So I'm thinking how about checking the shell and if it's bash, fish or mksh show this msg? is there any alternative on ksh?

from nnn.

jarun avatar jarun commented on May 14, 2024

Resolved at d835f72.

from nnn.

vaygr avatar vaygr commented on May 14, 2024

Well, let's pave a bright future for nnn :) there are many shells right now, and there will probably more in 2052, all w/ or w/o support with this special variable.

So I think it's cleaner to rely on this variable existence and use it if it's there rather than add/remove support shells based on their names every time 1) new shell with a new name is developed; 2) support for this variable is added/removed. So we'd actually need to track it or rely on users' reports.

On the other hand, there we just check the var and use it if it's available -- cheap and simple.

from nnn.

jarun avatar jarun commented on May 14, 2024

Makes sense, the reason I already accepted the PR. ;)

from nnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.