Find a file
Kovács Bálint Hunor 4a2aebdcc4 Update haskells
2023-03-10 00:20:40 +02:00
.gitattributes Initial commit 2023-03-03 00:38:56 +02:00
.gitignore Initial commit 2023-03-03 00:38:56 +02:00
haskells Update haskells 2023-03-10 00:20:40 +02:00
haskells.hs icon and color update 2023-03-10 00:19:48 +02:00
LICENSE Initial commit 2023-03-03 00:38:56 +02:00
README.md v1 update 2023-03-03 01:19:25 +02:00

haskells

This is a simple implementation of the ls command in Haskell. It lists the contents of a directory, including file names, with colors and icons based on file type.

Features

  • Lists files and directories in a specified directory.
  • Colors file names based on their file type.
  • Adds icons to file names based on their file type.

Usage

To use the ls command, open a terminal and navigate to the directory where the ls executable is located. You can then run the command with the following syntax:

./haskells [PATH] [OPTIONS]

Where PATH is the optional path to the directory you want to list. If path is not specified, the current directory will be listed.

Options

  • -a, --all: Display all files, including hidden files.
  • -v, --version: Print the version number.
  • -h, --help: Print a help message with a list of available options.

Examples

List the contents of the current directory:

./haskells

List the contents of a specified directory:

./haskells /path/to/directory

List all files in a directory:

./haskells -a /path/to/directory

Display the version number:

./haskells --version

Display the help message:

./haskells --help

Compiling the Program

To compile the program, you need to have the GHC (Glasgow Haskell Compiler) command-line tool installed on your system. You can then run the following command in the terminal:

ghc haskells.hs

This will produce an executable file named haskells in the same directory as haskells.hs.