1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-25 16:57:12 -07:00

remove logs command

This commit is contained in:
Connor Olding 2018-02-21 10:47:01 +01:00
parent f116182d0f
commit a35f853942
2 changed files with 0 additions and 19 deletions

View File

@ -302,10 +302,6 @@ $ isup fdhafdslkjgfjs.com && echo yay || echo nay
nay
```
### [logs](/sh/logs)
(bash/zsh) just wraps around `journalctl`. i don't remember how it works exactly.
### [lol-twitter](/sh/lol-twitter)
(zsh) checks if usernames (from stdin) are available on twitter.

15
sh/logs
View File

@ -1,15 +0,0 @@
#!/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 "$@"