1. 34
  1.  

  2. 5

    I also did not know about this!

    1. 4

      Is there a way to make this work for doas, so it picks up the autocompletes for the command?

      So $ doas rcctl s<tab> would use rcctl’s autocompletes?

      1. 2

        You would have to explicitly set complete_doas arrays. It might be doable based off current complete_* variables listed via set, but It would take some doing.

      2. 3

        Is there much benefit from pledging the shell? I thought pledge wasn’t inherited across fork/exec.

        1. 6

          This question has of course been asked before :)

          http://marc.info/?l=openbsd-tech&m=144451217831726&w=2

        2. [Comment removed by author]

          1. 5

            I included everything in the source directory, here is a breakdown:

            ---------------------------------------------------------------------------------------
            Language                             files          blank        comment           code
            ---------------------------------------------------------------------------------------
            PO File                                 37          24924          34030         157776
            C                                      252          20185          19564         103451
            HTML                                     3           3773             38          26019
            Bourne Shell                            36           3341           3461          19894
            Windows Module Definition               44           2573             11          14751
            C/C++ Header                           111           2729           3448           7344
            TeX                                      1            821           3462           6762
            yacc                                     2            803            907           5214
            m4                                       4            466            438           4659
            Perl                                     2            535            834           4229
            Bourne Again Shell                      23            187            248            746
            make                                     3             48             36            110
            Assembly                                 2             11             20             48
            awk                                      1              8             15             24
            sed                                      2              0              0             16
            ---------------------------------------------------------------------------------------
            SUM:                                   523          60404          66512         351043
            ---------------------------------------------------------------------------------------
            
            
            1. 5

              Yeah that doesn’t seem accurate because .po is for localization I think, and it has a lot of tests. You don’t want to count the localization tests against it. But yes bash is too big and slow – it even says so in the man page.

              And nice article! I’ve worked on completion a bit for the OIl shell, and it’s definitely a big pain point with bash. In fact I have some broken custom completions right now that I can’t figure out, and I’m pretty good at debugging bash. It’s actually a non-deterministic bug where they stop working after awhile in the shell and I have to restart a new shell to make them work.

              1. 1

                it even says so in the man page

                I had no idea! That’s awesome! I debated not including all the things.. ultimately decided give complete totals because picking individual languages seemed too arbitrary.

                And nice article!

                Thanks! That sounds like a bug one definitely wouldn’t want in their shell!

          2. 2

            There’s still no fish port, is there? I tried pkg add a little while ago and got nothing, but maybe I used the wrong name?

            1. 3

              It’s in wip - I am going to stick with ksh, but I still plan on sending the patches upstream.

              1. 1

                fish-shell