mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:49:02 -08:00
15 lines
383 B
Bash
Executable file
15 lines
383 B
Bash
Executable file
#!/usr/bin/env bash
|
|
if [ -n "${ZSH_VERSION:-}" ]; then
|
|
logs() {
|
|
local last="${@: -1}"
|
|
[ -n "$last" ] && [ ${last[1]} != '-' ] && last="-u $last"
|
|
journalctl ${@:1:-1} $last
|
|
}
|
|
else
|
|
logs() {
|
|
local last="${@: -1}"
|
|
[ -n "$last" ] && [ ${last:0:1} != '-' ] && last="-u $last"
|
|
journalctl ${@:1:$(($#-1))} $last
|
|
}
|
|
fi
|
|
logs "$@"
|