elbachir-one / gt

gt is a tree-like program written in Go with a lot of features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gt

gt, is a command-line tool written in Go that displays a tree of files and directories with colored icons.

gt shot

Features

  • Displays a tree of files and directories.
  • Supports showing hidden files.
  • Option to unsort files.
  • Displays summary of files and directories.
  • Colored icons based on file types.
  • List directories.
  • Order files.
  • Print full path.

Installation

  1. Ensure you have Go installed, and also Nerd Fonts

  2. Clone the repository

   git clone https://github.com/elbachir-one/gt
   cd gt
   go build gt.go
   ./gt
  1. Install
    sudo cp gt /usr/local/bin/gt

Note: gt is in the AUR, and a template is available for Void Linux.

  • Arch Linux
yay -Sy gt
  • Void Linux
git clone --depth=1 https://github.com/void-linux/packages
cd void-packages/
./xbps-install binary-bootstrap
mkdir srcpkgs/gt
vim srcpkgs/gt/template

Past the content of this template to your local template and save it.

./xbps-install pkg gt
sudo xbps-install -R hostdir/binpkgs gt

Usage

    gt [OPTIONS] [DIRECTORY]

Note: you can also pip gt to fzf or less.

gt | less -r

gt and less

-r is an option for less to repaint the screen.

gt | fzf --ansi

gt and fzf

Options:

Option Description example
-h Show help -h
-v Show version -v
-s Show hidden files -s
-u Files -u
-m Summary -m
-d List directories only -d
-o Order files based on extension -o
-f Print full path prefix to each file -f
--depth Depth to which the tree should be displaye the default is -1 gt --depth 1 any number greater than or equal to 1 can be used. --depth

Contributing

Contributions, issues, and feature requests are always welcome! Thank you.

About

gt is a tree-like program written in Go with a lot of features.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%