Skip to content

Commit e45e82e

Browse files
committed
fix the issue related to ls
1 parent 86d1945 commit e45e82e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • implement-shell-tools/implement-shell-tools-python/ls

implement-shell-tools/implement-shell-tools-python/ls/ls.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def list_directory(path, show_all):
2020
def main():
2121
parser = argparse.ArgumentParser(description="List directory contents")
2222
parser.add_argument("-a", "--all", action="store_true", help="show hidden files")
23+
parser.add_argument(
24+
"-1", dest="one", action="store_true", help="one entry per line (default)"
25+
)
2326
parser.add_argument("paths", nargs="*", default=["."], help="directories to list")
2427

2528
args = parser.parse_args()

0 commit comments

Comments
 (0)