Skip to content

add stricter arg cleaning rules and add support for -h and -1#11

Open
Bobb-E-Burns wants to merge 6 commits intoAnthonyDiGirolamo:masterfrom
Bobb-E-Burns:master
Open

add stricter arg cleaning rules and add support for -h and -1#11
Bobb-E-Burns wants to merge 6 commits intoAnthonyDiGirolamo:masterfrom
Bobb-E-Burns:master

Conversation

@Bobb-E-Burns
Copy link
Copy Markdown

using, i.e ls's --group-directories-first would pass on --rup-directries-first because the chars lngo were stripped from everything before calling /bin/ls.
I've made it so there is are stricter checks before stripping these chars and now every arg gets passed properly

Also goes for checking if recursive ls was enabled, it now also checks for the use of --recursive in stead of only -R

LeLobster added 3 commits August 27, 2018 19:00
using, i.e ls's `--group-directories-first` would pass on `--rup-directries-first` because the chars `lngo` were stripped from everything before calling `/bin/ls`.  
I've made it so there is are stricter checks before stripping these chars and now every arg gets passed properly  

Also goes for checking if recursive ls was enabled, it now also checks for the use of `--recursive` in stead of only `-R`
`file_name` and `extension` would be nil because the line check didn't account for `-h` adding a K after the digits which would cause a TypeError
man ls: ` -1     list one file per line.  Avoid '\n' with -q or -b`

when `-1` is passed as arg do a simple `puts` to print line for line
@Bobb-E-Burns Bobb-E-Burns changed the title add stricter argument cleaning rules add stricter arg cleaning rules and add support for -h and -1 Aug 27, 2018
LeLobster added 3 commits September 1, 2018 01:00
K,M,G,T,P,E,Z and Y are all the ls SIZE chars
example commands
`els -d */`  
`els -dl */`
`ls -1 folder_1 folder2/*`

last cmd is similar to calling `ls` with -r or --recursive and performance wise everything seems to be fine but we'll keep actually calling `els` with -r or --recursive disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant