Skip to content

Commit

Permalink
Fixes #141, #183 - open babun shell here
Browse files Browse the repository at this point in the history
  • Loading branch information
kubamarchwicki committed Apr 13, 2015
1 parent 0eebc02 commit d5bab32
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions babun-core/plugins/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ plugin_install "cacert"
plugin_install "oh-my-zsh"
plugin_install "git"
plugin_install "cygdrive"
plugin_install "shell-here"
22 changes: 22 additions & 0 deletions babun-core/plugins/shell-here/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set -e -f -o pipefail
source "/usr/local/etc/babun.instance"
source "$babun_tools/script.sh"

babun_root=$( cygpath -w "/" | sed "s#\\\cygwin##g" )
name="Babun Shell here"
cmd="${babun_root}\cygwin\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/zsh.exe"

keys=("HKCU\Software\Classes\Directory\Background\shell\babun"
"HKCU\Software\Classes\Directory\shell\babun"
"HKCU\Software\Classes\Drive\Background\Shell\babun"
"HKCU\Software\Classes\Drive\shell\babun")

#start with installing chere
pact install chere || echo "Installing 'chere' failed"

#install registry keys
for key in ${keys[*]}
do
cmd /c "reg" "add" "${key}" "/ve" "/d" "${name}" "/t" "REG_SZ" "/f" || echo "Failed adding ${key}"
cmd /c "reg" "add" "${key}\command" "/ve" "/d" "${cmd}" "/t" "REG_EXPAND_SZ" "/f" || echo "Failed adding ${key}"
done
5 changes: 5 additions & 0 deletions babun-core/plugins/shell-here/install_home.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -e -f -o pipefail
source "/usr/local/etc/babun.instance"
source "$babun_tools/script.sh"

# NO LOGIC
3 changes: 3 additions & 0 deletions babun-core/plugins/shell-here/plugin.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# plugin descriptor
plugin_name=shell-here
plugin_version=1
5 changes: 5 additions & 0 deletions babun-core/plugins/shell-here/src/uninstall-shell-here.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\babun]
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\babun]
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\Background\Shell\babun]
[-HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\babun]

0 comments on commit d5bab32

Please sign in to comment.