summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-03-27 19:53:50 +0100
committerCanop <cano.petrole@gmail.com>2020-03-27 19:53:50 +0100
commita344abcc16c3b4f420dd014ff789818fe5212107 (patch)
tree075732d0560993cc24c030500e85700f106a3c8c
parent3bfb9f545206fa66b72c419d9307d78fe4b56673 (diff)
add a man pagev0.13.5
It can be built with release.sh or found in the official releases of new versions.
-rw-r--r--CHANGELOG.md1
-rw-r--r--man/page115
-rwxr-xr-xrelease.sh26
-rw-r--r--src/clap.rs18
4 files changed, 151 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6741221..961dde6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
- right key open directory, left key gets back (when input is empty)
- replace ~ in path arguments with user home dir
- use $XDG_CONFIG_HOME/git/ignore when the normal core.excludesFile git setting is missing
+- add a man page to archive
<a name="v0.13.4"></a>
### v0.13.4 - 2020-03-13
diff --git a/man/page b/man/page
new file mode 100644
index 0000000..b957b3c
--- /dev/null
+++ b/man/page
@@ -0,0 +1,115 @@
+.\" Manpage for broot
+.\" Some items starting with a # are replaced on build
+.TH broot 1 "#date" "#version" "broot manpage"
+.SH NAME
+broot \- Tree view, file manager, configurable launcher
+.SH SYNOPSIS
+.B broot
+[\fIflags\fR]
+[\fIoptions\fR]
+[path]
+.br
+.B br
+[\fIflags\fR]
+[\fIoptions\fR]
+[path]
+.SH DESCRIPTION
+\fBbroot\fR lets you explore file hierarchies with a tree-like view, manipulate files, launch actions, and define your own shortcuts.
+.PP
+\fBbroot\fR is best launched as \fBbr\fR: this shell function gives you access to more commands, especially \fIcd\fR. The \fBbr\fR shell function is interactively installed on first \fBbroot\fR launch.
+.PP
+Flags and options can be classically passed on launch but also written in the configuration file. Each flag has a counter-flag so that you can cancel at command line a flag which has been set in the configuration file.
+.SH FLAGS
+FLAGS
+.TP
+.B \-d ", " \-\-dates
+Show the last modified date of files and directories
+.TP
+.B \-D ", " \-\-no-dates
+Don't show the last modified date
+.TP
+.B \-f ", " \-\-only-folders
+Only show folders
+.TP
+.B \-F ", " \-\-no-only-folders
+Show folders and files alike
+.TP
+.B \-g ", " \-\-show-git-info
+Show git statuses on files and stats of repository
+.TP
+.B \-G ", " \-\-no-show-git-info
+Don't show git statuses on files nor stats
+.TP
+.B \-h ", " \-\-hidden
+Show hidden files
+.TP
+.B \-H ", " \-\-no-hidden
+Don't show hidden files
+.TP
+.B \-i ", " \-\-show-gitignored
+Show files which should be ignored according to git
+.TP
+.B \-I ", " \-\-no-show-gitignored
+Don't show gitignored files
+.TP
+.B \-p ", " \-\-permissions
+Show permissions with owner and group
+.TP
+.B \-P ", " \-\-no-permissions
+Don't show permissions
+.TP
+.B \-s ", " \-\-sizes
+Show the sizes of files and directories. When this mode is on, children aren't shown so that the biggest entries at the selected level can be sorted first.
+.TP
+.B \-S ", " \-\-no-sizes
+Don't show sizes
+.TP
+.B \-t ", " \-\-trim-root
+Trim the root: remove elements which would exceed the screen size. This removes the scrollbar.
+.TP
+.B \-T ", " \-\-no-trim-root
+Don't trim the root (still trim the deeper levels). A scrollbar may be used when there are too many elements to show on screen.
+.TP
+.B \-\-install
+Install or reinstall the \fBbr\fR shell function
+.TP
+.B \-\-no-style
+Remove all style and colors
+.TP
+.B \-\-help
+Prints a help page, with more or less the same content as this man page
+.TP
+.B \-v ", " \-\-version
+Prints the version of \fBbroot\fR
+.SH PARAMETERS:
+.TP
+.B \-\-outcmd <cmd-export-path>
+Where to write a command if broot produces one
+.TP
+.B \-c ", " \-\-cmd <commands>
+Semicolon separated commands to execute on start of \fBbroot\fR
+.TP
+.B \-\-height <height>
+Height to use if you don't want to fill the screen or for file export (by default the terminal height is used)
+.TP
+.B \-o ", " \-\-out <file-export-path>
+Where to write the produced path, if any
+.TP
+.B \-\-set-install-state <undefined|refused|installed>
+Set the installation state. This is mostly useful in installation scripts to override the normal installation process.
+.TP
+.B \-\-print-shell-function <bash|fish|zsh>
+Print to stdout the \fBbr\fR function for the given shell. This can be used in your own installation process overriden the standard one.
+.SH BUGS
+.PP
+.B broot
+is known to be slow on most \fIWindows\fR installations.
+.PP
+On unix and mac platforms, most problems you may encounter are related to some terminals or terminal multiplexers which either intercepts some standard TTY instructions or break buffering or size querying. The list of shortcuts you can define in the config file is thus dependent of your system.
+.SH AUTHOR
+.B broot
+is free and open-source and is written by \fIdenys.seguret@gmail.com\fR. The source code and documentation are available at https://dystroy.org/broot
+
+
+
+
diff --git a/release.sh b/release.sh
new file mode 100755
index 0000000..4db29ba
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,26 @@
+# build a new release of broot
+# This isn't used for normal compilation (see https://dystroy.org/broot for instruction)
+# but for the building of the official releases
+version=$(sed 's/version = "\([0-9.]\{1,\}\)"/\1/;t;d' Cargo.toml | head -1)
+
+echo "Building release $version"
+
+# make the build directory and compile for all targets
+./compile-all-targets.sh
+
+# add the readme and changelog in the build directory
+echo "This is broot. More info and installation instructions on https://dystroy.org/broot" > build/README.md
+cp CHANGELOG.md build
+
+# add the man page and fix its date and version
+cp man/page build/broot.1
+sed -i "s/#version/$version/g" build/broot.1
+sed -i "s/#date/$(date +'%Y\/%m\/%d')/g" build/broot.1
+
+# prepare the release archive
+rm broot_*.zip
+zip -r "broot_$version.zip" build/*
+
+# copy it to releases folder
+mkdir releases
+cp "broot_$version.zip" releases
diff --git a/src/clap.rs b/src/clap.rs
index ec3d191..284526f 100644
--- a/src/clap.rs
+++ b/src/clap.rs
@@ -10,7 +10,7 @@ pub fn clap_app() -> clap::App<'static, 'static> {
clap::App::new("broot")
.version(env!("CARGO_PKG_VERSION"))
.author("dystroy <denys.seguret@gmail.com>")
- .about("Balanced tree view + fuzzy search + BFS + customizable launcher")
+ .about("A tree explorer and a customizable launcher")
.arg(clap::Arg::with_name("root").help("sets the root directory"))
// tree flags
@@ -61,7 +61,7 @@ pub fn clap_app() -> clap::App<'static, 'static> {
clap::Arg::with_name("no-hidden")
.short("H")
.long("no-hidden")
- .help("Show hidden files"),
+ .help("Don't show hidden files"),
)
.arg(
clap::Arg::with_name("show-gitignored")
@@ -125,7 +125,7 @@ pub fn clap_app() -> clap::App<'static, 'static> {
.short("c")
.long("cmd")
.takes_value(true)
- .help("Semicolon separated commands to execute (experimental)"),
+ .help("Semicolon separated commands to execute"),
)
.arg(
clap::Arg::with_name("conf")
@@ -134,6 +134,12 @@ pub fn clap_app() -> clap::App<'static, 'static> {
.help("Semicolon separated paths to specific config files"),
)
.arg(
+ clap::Arg::with_name("height")
+ .long("height")
+ .help("Height (if you don't want to fill the screen or for file export)")
+ .takes_value(true),
+ )
+ .arg(
clap::Arg::with_name("file-export-path")
.short("o")
.long("out")
@@ -141,12 +147,6 @@ pub fn clap_app() -> clap::App<'static, 'static> {
.help("Where to write the produced path (if any)"),
)
.arg(
- clap::Arg::with_name("height")
- .long("height")
- .help("Height (if you don't want to fill the screen or for file export)")
- .takes_value(true),
- )
- .arg(
clap::Arg::with_name("install")
.long("install")
.help("Install or reinstall the br shell function"),