Skip to content

ls: -w option takes an argument - #1031

Merged
briandfoy merged 1 commit into
briandfoy:masterfrom
mknos:ls-w-202603
Mar 5, 2026
Merged

ls: -w option takes an argument#1031
briandfoy merged 1 commit into
briandfoy:masterfrom
mknos:ls-w-202603

Conversation

@mknos

@mknos mknos commented Mar 5, 2026

Copy link
Copy Markdown
Contributor
  • Reading the POD, -w was intended for setting width but the option wasn't defined to take a value
  • Add missing option value in POD
  • Bonus changes: fix typo in POD, and prevent re-declaration of @args and $max_gid_length (found by perlcritic)
$ for w in 40 80 120; do ls -w${w}; echo "[----------------]";done # now I can do... 
addbib      moo
a.out       morse
apply       new
ar          newdir
arch        nl
arithmetic  nnn
asa         od
awk         out
bad.diff    par
banner      paste
base64      patch
basename    patch.old
bc          patterns.txt
bcd         perldoc
cal         perlpowertools
cat         pig
chgrp       ping
ching       pom
chmod       ppt
chown       pr
clear       primes
cmp         printenv
col         printf
colrm       pwd
comm        rain
cp          random
cut         rev
date        rm
dc          rmdir
deroff      robots
deroff.exe  rot13
diff        seq
dir         shar
dir2        sleep
dirname     sort
du          spell
dupword.sh  split
echo        strings
ed          sum
empty       tac
env         tail
err         tar
expand      tee
expr        test
expr.c      time
factor      touch
false       tr
file        trace
find        true
fish        tsort
fmt         tty
fold        uname
fortune     unexpand
from        uniq
glob        units
grep        unlink
hangman     unpar
head        unshar
heh         uudecode
hexdump     uuencode
id          wc
install     what
join        which
kill        which_refactor
ln          whoami
lock        whois
look        wordlist.txt
ls          words
mail        wump
maze        x
mimedecode  xargs
mkdir       yes
mkdir2      yes2
mkfifo      yes.diff
Mkfifo      yes.rej
[----------------]
addbib      cp          fmt         moo             random   tty
a.out       cut         fold        morse           rev      uname
apply       date        fortune     new             rm       unexpand
ar          dc          from        newdir          rmdir    uniq
arch        deroff      glob        nl              robots   units
arithmetic  deroff.exe  grep        nnn             rot13    unlink
asa         diff        hangman     od              seq      unpar
awk         dir         head        out             shar     unshar
bad.diff    dir2        heh         par             sleep    uudecode
banner      dirname     hexdump     paste           sort     uuencode
base64      du          id          patch           spell    wc
basename    dupword.sh  install     patch.old       split    what
bc          echo        join        patterns.txt    strings  which
bcd         ed          kill        perldoc         sum      which_refactor
cal         empty       ln          perlpowertools  tac      whoami
cat         env         lock        pig             tail     whois
chgrp       err         look        ping            tar      wordlist.txt
ching       expand      ls          pom             tee      words
chmod       expr        mail        ppt             test     wump
chown       expr.c      maze        pr              time     x
clear       factor      mimedecode  primes          touch    xargs
cmp         false       mkdir       printenv        tr       yes
col         file        mkdir2      printf          trace    yes2
colrm       find        mkfifo      pwd             true     yes.diff
comm        fish        Mkfifo      rain            tsort    yes.rej
[----------------]
addbib      cat     deroff.exe  factor   id          moo             pig       rot13    touch     wc
a.out       chgrp   diff        false    install     morse           ping      seq      tr        what
apply       ching   dir         file     join        new             pom       shar     trace     which
ar          chmod   dir2        find     kill        newdir          ppt       sleep    true      which_refactor
arch        chown   dirname     fish     ln          nl              pr        sort     tsort     whoami
arithmetic  clear   du          fmt      lock        nnn             primes    spell    tty       whois
asa         cmp     dupword.sh  fold     look        od              printenv  split    uname     wordlist.txt
awk         col     echo        fortune  ls          out             printf    strings  unexpand  words
bad.diff    colrm   ed          from     mail        par             pwd       sum      uniq      wump
banner      comm    empty       glob     maze        paste           rain      tac      units     x
base64      cp      env         grep     mimedecode  patch           random    tail     unlink    xargs
basename    cut     err         hangman  mkdir       patch.old       rev       tar      unpar     yes
bc          date    expand      head     mkdir2      patterns.txt    rm        tee      unshar    yes2
bcd         dc      expr        heh      mkfifo      perldoc         rmdir     test     uudecode  yes.diff
cal         deroff  expr.c      hexdump  Mkfifo      perlpowertools  robots    time     uuencode  yes.rej
[----------------]

* Reading the POD, -w was intended for setting width but the option wasn't defied to take a value
* Add missing option value in POD
* Bonus changes: fix typo in POD, and prevent re-declaration of @Args and $max_gid_length
@mknos
mknos temporarily deployed to housekeeping March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing March 5, 2026 03:52 — with GitHub Actions Inactive
@github-actions github-actions Bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: ls The ls program Status: needs verification issue needs to be verified Type: bug an existing feature does not work labels Mar 5, 2026
@briandfoy briandfoy removed Type: enhancement improve a feature that already exists Status: needs verification issue needs to be verified labels Mar 5, 2026
@briandfoy
briandfoy merged commit f31b0de into briandfoy:master Mar 5, 2026
23 of 24 checks passed
@github-actions github-actions Bot added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Program: ls The ls program Status: accepted The fix is accepted Type: bug an existing feature does not work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants