mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 15:43:02 +02:00
cli: jump to end of 'show log' commands automatically
Instead of having to scroll to the end (Shift G, or page down til end), let's instead start at the end now that we have control over paging in the CLI ourselves. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -189,9 +189,9 @@
|
||||
<COMMAND name="all" help="Show all containers (default only running)">
|
||||
<ACTION sym="script">doas container -a show</ACTION>
|
||||
</COMMAND>
|
||||
<COMMAND name="log" help="Show container log (alias for show log container)">
|
||||
<COMMAND name="log" help="Show container log (jumps to end), alias to 'show log container'">
|
||||
<ACTION sym="script" in="tty" out="tty" interrupt="true">
|
||||
doas -u $USER cat /log/container |pager
|
||||
doas -u $USER cat /log/container |pager +G
|
||||
</ACTION>
|
||||
</COMMAND>
|
||||
<COMMAND name="images" help="Show container images">
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
</SWITCH>
|
||||
</COMMAND>
|
||||
|
||||
<COMMAND name="log" help="Show log file, default: syslog">
|
||||
<COMMAND name="log" help="Show log file (jumps to end), default: syslog">
|
||||
<PARAM name="fn" ptype="/LOGFILES" min="0" help="Optional log file to show"/>
|
||||
<SWITCH name="optional" min="0">
|
||||
<COMMAND name="tail" help="Show log tail, last N lines only">
|
||||
@@ -447,7 +447,7 @@
|
||||
if [ -n "$KLISH_PARAM_lines" ]; then
|
||||
$cmd "$file" | tail -n $KLISH_PARAM_lines
|
||||
else
|
||||
$cmd "$file" | pager
|
||||
$cmd "$file" | pager +G
|
||||
fi
|
||||
</ACTION>
|
||||
</COMMAND>
|
||||
|
||||
Reference in New Issue
Block a user