diff options
author | Canop <cano.petrole@gmail.com> | 2019-01-21 21:19:43 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2019-01-21 21:19:43 +0100 |
commit | 3e5faa68e74e8c206e91d06d03447c16e2c20b74 (patch) | |
tree | 4715dd80e15351f390cbfa7eb93bf089937f6530 /documentation.md | |
parent | 8aa96fb62ef7622b2db8473c10fe7bb99c3c163c (diff) |
--cmd program argument to pass a sequence of commands
Right not I use it for tests & benchmarks
Diffstat (limited to 'documentation.md')
-rw-r--r-- | documentation.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/documentation.md b/documentation.md index 912a9ea..6008bd7 100644 --- a/documentation.md +++ b/documentation.md @@ -135,3 +135,30 @@ In the default configuration, it's mapped to `s` and can be activated at launch When broot starts, it checks for a configuration file in the standard location defined by your OS and creates one if there's none. You can see this location by opening the help with ̀`?`. You can also open it directly from the help screen by typing `:o`. + +## Passing commands as program argument + +*Note: this feature is experimental and will probably change.* + +Commands to be executed can be passed using the `--cmd` argument, separated with a space. + +### Direcly search + + broot --cmd miaou / + +This opens broot and immediately search for "miaou" in `/` as if it were typed in broot's input. + +### Go to the most relevant directory + + broot --cmd ":p miaou :g" + +This opens broot, goes to the parent directory, searches for "miaou", then opens the selected directory (staying in broot). + +### cd to a directory + + br --cmd "roulette :c" ~ + +This launches broot using the `br` shell function in your home directory, searches for "roulette", then cd to the relevant directory (leaving broot). + + + |