"less" command works fine, though.
I can use "less" to display part of the file on the screen.
Supposedly, there is a "more" command, but when I type it in, it says "bash: more: command not found."
"less" command works fine, though.
I can use "less" to display part of the file on the screen.
Supposedly, there is a "more" command, but when I type it in, it says "bash: more: command not found."
You can benefit from the Windows more though:
alias more=/proc/cygdrive/c/Windows/System32/more.com
(This does not imply Cygwin: the git bash
packaged with Git For Windows is based on MSys2, a stripped down version of Cygwin, actively kept up-to-date with Cygwin's source code)
That will work:
cat large_file | more
The bash alternative:
alias more="less -de"
(as commented: adding -d
for --dumb
and -e
for --quit-at-eof
makes this alias closed to what more does by default)
In both instances, you can add that alias in your %USERPROFILE%/.bashrc
.
See also "In git bash how to increase less's screen width?" to understand what less.exe
is in that Windows context.
The reason is that Git for Windows uses a version of
less
that relies on the MSYS2 runtime to interact with the pseudo terminal (typically inside a MinTTY window, which is also aware of the MSYS2 runtime).
more
already (which as this is included in the Cygwin distribution). –
Drat less
behave pretty much like more
, the alias should be alias more="less -de"
. –
Drat /C
, while you are locating it via /proc/cygdrive/c
. Are both ways officially supported? I did not find the latter one documented. –
Drat /proc/cygdrive/c
did not raise any concern for me. –
Cassycast © 2022 - 2024 — McMap. All rights reserved.
more
is not installed in git-bash. You can runwhich less
to check whereless
is installed. – Blokless
. – Drat