Shell config changes

master
Jonathan Hodgson 5 years ago
parent 6529b587ad
commit 5cad599fb2
  1. 32
      shells/bash/completions/hydra.bash
  2. 2
      shells/shared/aliases
  3. 24
      shells/shared/environmentVariables
  4. 2
      shells/shared/functions
  5. 2
      shells/zsh/includes/promptconfig.zsh

@ -0,0 +1,32 @@
#!/usr/bin/env bash
__hydra_complete(){
local toAdd=""
#if [ -n "${COMP_WORDS[COMP_CWORD]}" ]; then
# toAdd=" "
# prevArgNo="$COMP_CWORD"
#else
# prevArgNo="$(($COMP_CWORD - 1))"
#fi
local curr="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local services="adam6500 asterisk afp cisco cisco-enable cvs firebird ftp ftps http-head http-get http-post http-get-form http-post-form http-proxy http-proxy-urlenum icq imap irc ldap2 ldap3 ldap3-crammd5 ldap3-digestmd5 mssql mysql nntp oracle-listener oracle-sid pcanywhere pcnfs pop3 postgres radmin2 redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp smtp-enum snmp socks5 ssh sshkey svn teamspeak telnet vmauthd vnc xmpp"
case "$prev" in
-L|-P|-C|-M)
COMPREPLY=($(compgen -A file -- "$curr"))
;;
-l|-p|-t|-h)
COMPREPLY=()
;;
-U)
COMPREPLY=($(compgen -W "$services" -- "$curr"))
;;
*)
COMPREPLY=($(compgen -W "-l -L -p -P -C -M -t -U -h" -- "$curr"))
;;
esac
}
complete -F __hydra_complete hydra

@ -200,3 +200,5 @@ alias chrome-curl="node $HOME/GitRepos/chrome-curl/index.js"
#alias irmgpg="gpg --no-default-keyring --keyring=irm.gpg"
alias irmgpg="gpg --options ~/.gnupg/irmgpg.conf --keyring=irm.gpg"
alias weakopenssl="$HOME/GitRepos/openssl-weak/openssl-1.0.2-chacha/apps/openssl"

@ -3,7 +3,7 @@ export TERMINAL=/usr/local/bin/st
export TERM=xterm-256color
export EDITOR='vim'
export READER='zathura'
export CDPATH=.:~:~/Projects
export CDPATH=.:~:~/Projects:~/.dotfiles
#Adds a list of all the sub directories in my .bin folder to a variable called mypath
mypath="$HOME/.bin"
@ -21,4 +21,24 @@ export PATH=$PATH:$GEM_HOME/bin
export GEM_HOME=$(ruby -e 'print Gem.user_dir')
#echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'" | /usr/bin/cowsay -f tux -W 80
export LESS_TERMCAP_mb=$'\e[1;36m'
export LESS_TERMCAP_md=$'\e[1;36m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[1;40;92m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;32m'
export DOTFILES="$HOME/.dotfiles"
if [ -n "$GTK_MODULES" ]
then
export GTK_MODULES="$GTK_MODULES:unity-gtk-module"
else
export GTK_MODULES="unity-gtk-module"
fi
if [ -z "$UBUNTU_MENUPROXY" ]
then
export UBUNTU_MENUPROXY=1
fi

@ -303,7 +303,7 @@ function man(){
$MAN "$@"
return $?
else
$MAN -k . | fzf --reverse --preview="echo {1,2} | sed 's/ (/./' | sed -E 's/\)\s*$//' | xargs $MAN" | awk '{print $1 "." $2}' | tr -d '()' | xargs -r "$MAN"
$MAN -k . | fzf --reverse --preview="echo {1,2} | sed 's/ (/./' | sed -E 's/\)\s*$//' | xargs $MAN" | awk '{print $1 "." $2}' | tr -d '()' | xargs -r $MAN
return $?
fi
}

@ -116,7 +116,7 @@ prompt_git(){
local branch="$(git branch --show-current 2> /dev/null)"
local color="green"
local ret=""
if [ -n "branch" ]; then
if [ -n "$branch" ]; then
ret="$branch"
local repoTopLevel="$(command git rev-parse --show-toplevel 2> /dev/null)"
local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}" 2> /dev/null)

Loading…
Cancel
Save