3 ms·
"command" works also interactively, to call the "real" thing instead of the aliased thing. As an example, I alias "cat" to run "bat", which pretty-prints the o
by mfontani 5y ago
"command" works also interactively, to call the "real" thing instead of the aliased thing.
As an example, I alias "cat" to run "bat", which pretty-prints the output. If I don't want the pretty-printed output, I can "command cat foo.txt" and it will call the "real" cat.
- LanternLight83 5y agoI like to escape aliases (ie. using `\vi` when vi is aliased to $EDITOR, but I actually want it), and actually have a special case for bat where I bind ccat to `bat -p --pager=never` for nice, copy-able, and still potentially highlighted output.
- fckthisguy 5y agobat's great! There's an easy way to disable pretty printing too: either use the flag, or pipe to another command.
- deleted 5y ago[deleted]
- stonewareslord 5y agoYou can also bypass aliases by escaping some part of the command ~ $ alias true='echo alias' ~ $ true alias ~ $ \true ~ $ 'true' ~ $ tr'u'e ~ $