Skip to content

Commit

Permalink
fish: Update aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokaltog committed Dec 8, 2015
1 parent d14ce92 commit 908d5d5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion home/.config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
alias + "sudo -E"
alias l "ls -ABFhovX --color=auto --group-directories-first --time-style=long-iso"
alias p "+ pacman"
alias pr "packer --noedit"
alias pac "packer --aur"
alias y "yaourt"
alias sd "+ shutdown -h now"
alias rb "+ reboot"
Expand All @@ -19,6 +19,7 @@ set fish_greeting
function smartdot
commandline -i (commandline -b | awk '{print $0 ~ /\.\.$/ ? "/.." : "."}')
end

function smartsudo
commandline -r (commandline -b | awk '{print $0 ~ /^(sudo|\+)\ / ? "" : "+ "}')(commandline -b)
end
Expand All @@ -28,6 +29,15 @@ function fish_user_key_bindings
bind \es 'smartsudo'
end

function pr
cd ~/projects/$argv[1]
end

function __fish_project_list
find ~/projects/ -mindepth 1 -maxdepth 1 -type d -printf '%f\tChanged %CY-%Cm-%Cd %CH:%CM\n'
end
complete -c pr -r -A -a '(__fish_project_list)' -d 'Goto project'

set -x EDITOR "emacs"

set -x LANG "en_US.utf8"
Expand Down

0 comments on commit 908d5d5

Please sign in to comment.