OS aliases

This commit is contained in:
Marley Rae 2024-02-02 18:43:42 -08:00
parent 63275d348a
commit c770882ca5
2 changed files with 13 additions and 12 deletions

View file

@ -4,9 +4,9 @@
# Shell aliases.
abbr -a rl --position command "source ~/.config/fish/config.fish"
abbr -a c --position command "clear"
abbr -a e --position command "$EDITOR"
abbr -a v --position command "$EDITOR"
abbr -a c --position command clear
abbr -a e --position command "$EDITOR"
abbr -a v --position command "$EDITOR"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -34,14 +34,6 @@ abbr -a rm --position command "rm -rf"
# └─ recursively remove directories and files
# Colored grep output.
abbr -a grep --position command "grep --color=auto"
abbr -a grep --position command "grep --color=auto"
abbr -a fgrep --position command "fgrep --color=auto"
abbr -a egrep --position command "egrep --color=auto"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$(uname)" = "Darwin" ]
abbr -a o --position command "open"
else if [ "$(uname)" = "Linux" ]
abbr -a o --position command "xdg-open"
end

9
os/aliases.config.fish Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env fish
if [ "$(uname)" = Darwin ]
abbr -a afk --position command "osascript -e 'tell application \"System Events\" to sleep'"
abbr -a o --position command open
else if [ "$(uname)" = Linux ]
abbr -a o --position command xdg-open
end