diff options
| author | 2015-07-23 06:41:53 +0000 | |
|---|---|---|
| committer | 2015-07-23 06:41:53 +0000 | |
| commit | 2f2dbf5306f87c082620613d069a2068bf350ad3 (patch) | |
| tree | 3f60ae395757f1cac43b64b076204446458aefa0 | |
| parent | 1d990fb0b3a3e579733a5c3fae0d69577b195c61 (diff) | |
| download | dotfiles-2f2dbf5306f87c082620613d069a2068bf350ad3.tar.gz dotfiles-2f2dbf5306f87c082620613d069a2068bf350ad3.tar.bz2 dotfiles-2f2dbf5306f87c082620613d069a2068bf350ad3.zip | |
Added bash completion after sudo
| -rw-r--r-- | bash/.bashrc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index 153f4e2..5e0625b 100644 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -41,6 +41,10 @@ exists() { | |||
| 41 | hash $@ 2> /dev/null | 41 | hash $@ 2> /dev/null |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | if exists complete && exists sudo; then | ||
| 45 | complete -cf sudo | ||
| 46 | fi | ||
| 47 | |||
| 44 | if exists mpv; then | 48 | if exists mpv; then |
| 45 | alias jblive='mpv rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream' | 49 | alias jblive='mpv rtmp://videocdn-us.geocdn.scaleengine.net/jblive/live/jblive.stream' |
| 46 | elif exists vlc; then | 50 | elif exists vlc; then |
| @@ -71,13 +75,13 @@ if exists gem; then | |||
| 71 | export PATH="$PATH:$GEM_HOME" | 75 | export PATH="$PATH:$GEM_HOME" |
| 72 | fi | 76 | fi |
| 73 | 77 | ||
| 74 | if exists ezjail-admin; then | 78 | if exists ezjail-admin && exists sudo; then |
| 75 | jl() { | 79 | jl() { |
| 76 | sudo ezjail-admin $1 $2\.tomvanderlee.com | 80 | sudo ezjail-admin $1 $2\.tomvanderlee.com |
| 77 | } | 81 | } |
| 78 | fi | 82 | fi |
| 79 | 83 | ||
| 80 | if exists pfctl; then | 84 | if exists pfctl && exists sudo; then |
| 81 | showbanned () | 85 | showbanned () |
| 82 | { | 86 | { |
| 83 | for table in "fail2ban" "permaban"; do | 87 | for table in "fail2ban" "permaban"; do |
| @@ -87,7 +91,7 @@ if exists pfctl; then | |||
| 87 | } | 91 | } |
| 88 | fi | 92 | fi |
| 89 | 93 | ||
| 90 | if exists pacman && ! exists pacaur; then | 94 | if (exists pacman && !exists pacaur) && exists sudo; then |
| 91 | alias pacaur="sudo pacman" | 95 | alias pacaur="sudo pacman" |
| 92 | fi | 96 | fi |
| 93 | 97 | ||
