summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-05-17 10:29:55 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-05-17 10:29:55 +0200
commit0cf614e8ed40bd0e7cc2b3443b68abe59659c46e (patch)
treeba8fab38f312621c4cef510ac48286448f49a226 /src
parent56f606565fd957d8b376432a58e605c441dfb7b8 (diff)
parent94b02c773abc4b0b624a29c6db73ad86625aec2b (diff)
Merge branch 'no-pager'
Diffstat (limited to 'src')
-rw-r--r--src/cli.rs2
-rw-r--r--src/main.rs22
2 files changed, 1 insertions, 23 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 2a1ccb6..1796b14 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -31,8 +31,6 @@ pub fn cli<'a>() -> App<'a> {
The following environment variables can be passed to butido:
RUST_LOG - to enable logging, for exact usage see the rust cookbook
- PAGER - to change the pager
- NOPAGER - to disable automatic use of the PAGER
"#)
.arg(Arg::new("hide_bars")
diff --git a/src/main.rs b/src/main.rs
index 7feb99b..20f0191 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -149,10 +149,7 @@ async fn main() -> Result<()> {
let db_connection_config = crate::db::DbConnectionConfig::parse(&config, &cli)?;
match cli.subcommand() {
Some(("generate-completions", matches)) => generate_completions(matches),
- Some(("db", matches)) => {
- setup_pager();
- crate::commands::db(db_connection_config, &config, matches)?
- },
+ Some(("db", matches)) => crate::commands::db(db_connection_config, &config, matches)?,
Some(("build", matches)) => {
let conn = db_connection_config.establish_connection()?;
@@ -172,7 +169,6 @@ async fn main() -> Result<()> {
}
Some(("what-depends", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::what_depends(matches, &config, repo)
.await
.context("what-depends command failed")?
@@ -180,7 +176,6 @@ async fn main() -> Result<()> {
Some(("dependencies-of", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::dependencies_of(matches, &config, repo)
.await
.context("dependencies-of command failed")?
@@ -188,7 +183,6 @@ async fn main() -> Result<()> {
Some(("versions-of", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::versions_of(matches, repo)
.await
.context("versions-of command failed")?
@@ -196,7 +190,6 @@ async fn main() -> Result<()> {
Some(("env-of", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::env_of(matches, repo)
.await
.context("env-of command failed")?
@@ -204,7 +197,6 @@ async fn main() -> Result<()> {
Some(("find-artifact", matches)) => {
let repo = load_repo()?;
- setup_pager();
let conn = db_connection_config.establish_connection()?;
crate::commands::find_artifact(matches, &config, progressbars, repo, conn)
.await
@@ -213,7 +205,6 @@ async fn main() -> Result<()> {
Some(("find-pkg", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::find_pkg(matches, &config, repo)
.await
.context("find-pkg command failed")?
@@ -221,7 +212,6 @@ async fn main() -> Result<()> {
Some(("source", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::source(matches, &config, repo, progressbars)
.await
.context("source command failed")?
@@ -235,7 +225,6 @@ async fn main() -> Result<()> {
Some(("lint", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::lint(&repo_path, matches, progressbars, &config, repo)
.await
.context("lint command failed")?
@@ -243,7 +232,6 @@ async fn main() -> Result<()> {
Some(("tree-of", matches)) => {
let repo = load_repo()?;
- setup_pager();
crate::commands::tree_of(matches, repo, progressbars)
.await
.context("tree-of command failed")?
@@ -251,7 +239,6 @@ async fn main() -> Result<()> {
Some(("metrics", _)) => {
let repo = load_repo()?;
- setup_pager();
let conn = db_connection_config.establish_connection()?;
crate::commands::metrics(&repo_path, &config, repo, conn)
.await
@@ -259,7 +246,6 @@ async fn main() -> Result<()> {
}
Some(("endpoint", matches)) => {
- setup_pager();
crate::commands::endpoint(matches, &config, progressbars)
.await
.context("endpoint command failed")?
@@ -301,9 +287,3 @@ fn generate_completions(matches: &ArgMatches) {
_ => unreachable!(),
}
}
-
-#[inline]
-fn setup_pager() {
- pager::Pager::new().setup();
-}
-