Add bass and change theme to l #fishshell

This commit is contained in:
Colin Powell
2018-12-12 10:23:28 -05:00
parent 012e82dc94
commit cd3f4b6e98
6 changed files with 172 additions and 44 deletions

View File

@ -0,0 +1,27 @@
function bass
set __bash_args $argv
if test "$__bash_args[1]_" = '-d_'
set __bass_debug
set -e __bash_args[1]
end
python (dirname (status -f))/__bass.py $__bash_args | read -z __script
set __errorflag (string sub -s 1 -l 7 "$__script")
if test "$__script" = '__usage'
echo "Usage: bass [-d] <bash-command>"
else if test "x$__errorflag" = 'x__error'
echo "Bass encountered an error!"
set __exitcode (string sub -s 9 "$__script")
set __exitcode (string trim $__exitcode)
if test -z $__exitcode
return 1
else
return $__exitcode
end
else
echo -e "$__script" | source -
if set -q __bass_debug
echo "$__script"
end
end
end