@@ -5,7 +5,7 @@ Version 1.1.0
55
66## Usage
77
8- usage: lsi [-h] [-x] [-n | -i | -a] [-d | -f] [-v] [FILE [FILE ...]]
8+ usage: lsi [-h] [-t | -1 | - x] [-n | -i | -a] [-d | -f] [-v] [FILE [FILE ...]]
99
1010 ls command alternative. Output is either cleanly formatted table or string of
1111 null terminated file names parseable by xargs command. Default behaviour is to
@@ -19,6 +19,8 @@ Version 1.1.0
1919
2020 optional arguments:
2121 -h, --help show this help message and exit
22+ -t output in table format; this is default
23+ -1 output on file per line
2224 -x, --xargs output will be string of null terminated file names;
2325 can be used as input to other commands like xargs;
2426 absense of this option makes output to be a table,
@@ -35,21 +37,31 @@ Version 1.1.0
3537
3638## Examples
3739
38- $ lsi
39- 'file20' 'file19' 'file18' 'file17' 'file16' 'file15' 'file14' 'file13' 'file12'
40- 'file11' 'file10' 'file9' 'file8' 'file7' 'file6' 'file5' 'file4' 'file3'
41- 'file2' 'file1'
42- $ lsi -d
43- 'dir20/' 'dir19/' 'dir18/' 'dir17/' 'dir16/' 'dir15/' 'dir14/' 'dir13/' 'dir12/'
44- 'dir11/' 'dir10/' 'dir9/' 'dir8/' 'dir7/' 'dir6/' 'dir5/' 'dir4/' 'dir3/'
45- 'dir2/' 'dir1/'
46- $ lsi -w
47- 'file20' 'file19' 'file18' 'file17' 'file16' 'file15' 'file14' 'file13' 'file12'
48- 'file11' 'file10' 'file9' 'file8' 'file7' 'file6' 'file5' 'file4' 'file3'
49- 'file2' 'file1' 'dir20/' 'dir19/' 'dir18/' 'dir17/' 'dir16/' 'dir15/' 'dir14/'
50- 'dir13/' 'dir12/' 'dir11/' 'dir10/' 'dir9/' 'dir8/' 'dir7/' 'dir6/' 'dir5/'
51- 'dir4/' 'dir3/' 'dir2/' 'dir1/'
52-
53- [ You should not parse the output of ` ls ` command, but ** you can safely parse the output of ` lsi ` ** ] ( http://www.mywiki.wooledge.org/ParsingLs )
54-
55- $ lsi -x | xargs -r0 cat
40+ # show all non-hidden files and directories
41+ $ lsi
42+ 'very-long-name3' 'very-long-name2' 'very-long-name1' 'long-name5'
43+ 'long-name4' 'long-name3' 'long-name2' 'long-name1'
44+ 'file15' 'file14' 'file13' 'file12'
45+ 'file11' 'file10' 'file9' 'file8'
46+ 'file7' 'file6' 'file5' 'file4'
47+ 'file3' 'file2' 'file1' 'directory5/'
48+ 'directory4/' 'directory3/' 'directory2/' 'directory1/'
49+ 'dir15/' 'dir14/' 'dir13/' 'dir12/'
50+ 'dir11/' 'dir10/' 'dir9/' 'dir8/'
51+ 'dir7/' 'dir6/' 'dir5/' 'dir4/'
52+ 'dir3/' 'dir2/' 'dir1/'
53+
54+ # show all directories
55+ $ lsi -da
56+ '.hidden-dir5/' '.hidden-dir4/' '.hidden-dir3/' '.hidden-dir2/' '.hidden-dir1/'
57+ 'hidden-files/' 'directory5/' 'directory4/' 'directory3/' 'directory2/'
58+ 'directory1/' 'dir15/' 'dir14/' 'dir13/' 'dir12/'
59+ 'dir11/' 'dir10/' 'dir9/' 'dir8/' 'dir7/'
60+ 'dir6/' 'dir5/' 'dir4/' 'dir3/' 'dir2/'
61+ 'dir1/'
62+
63+
64+ [ You should not parse the output of ` ls ` command,] ( http://www.mywiki.wooledge.org/ParsingLs ) but ** you can safely parse the output of ` lsi ` **
65+
66+ # move all hidden files to hidden-files directory
67+ $ lsi -ifx | xargs -r0 mv -t hidden-files
0 commit comments