This commit is contained in:
Evgenii Alekseev 2016-02-21 23:01:14 +03:00
parent 330a1440af
commit 2bd0bb8bfd
4 changed files with 31 additions and 2 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "zsh/zsh-syntax-highlighting"]
path = zsh/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
[submodule "zsh/zsh-autosuggestions"]
path = zsh/zsh-autosuggestions
url = https://github.com/tarruda/zsh-autosuggestions

View File

@ -5,7 +5,8 @@ else
source "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=black'
bindkey '^ ' autosuggest-accept
bindkey '^B' autosuggest-clear
# highlighting
if [[ -a "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then

View File

@ -22,7 +22,7 @@ precmd() {
local _bat_perc=0
local _num=0
local _bat
for _bat in /sys/class/power_supply/BAT*; do
for _bat in /sys/class/power_supply/BAT*; do
let "_bat_perc += $(cat ${_bat}/capacity)"
let "_num += 1"
done

View File

@ -1,5 +1,30 @@
# web_search from terminal
function open_command() {
emulate -L zsh
setopt shwordsplit
local open_cmd
# define the open command
case "$OSTYPE" in
darwin*) open_cmd='open' ;;
cygwin*) open_cmd='cygstart' ;;
linux*) open_cmd='xdg-open' ;;
msys*) open_cmd='start ""' ;;
*) echo "Platform $OSTYPE not supported"
return 1
;;
esac
# don't use nohup on OSX
if [[ "$OSTYPE" == darwin* ]]; then
$open_cmd "$@" &>/dev/null
else
nohup $open_cmd "$@" &>/dev/null
fi
}
function web_search() {
emulate -L zsh