mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-02 21:40:23 +00:00
Make cat alias use regular cat if output not term
This commit is contained in:
parent
93a096540b
commit
8f81558f9d
@ -4,8 +4,15 @@ alias gac='ga && gc'
|
|||||||
alias gpull='git pull'
|
alias gpull='git pull'
|
||||||
alias gpush='git push'
|
alias gpush='git push'
|
||||||
|
|
||||||
# Syntax highlighting cat
|
# Syntax highlighting cat if output is a terminal
|
||||||
alias ncat='nvimpager -c'
|
cat() {
|
||||||
|
# Check if output is a terminal, else use regular cat
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
nvimpager -c $@
|
||||||
|
else
|
||||||
|
/usr/bin/cat $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
rip() {
|
rip() {
|
||||||
abcde
|
abcde
|
||||||
|
Loading…
Reference in New Issue
Block a user