2024-09-02 15:05:47 +02:00
|
|
|
# source URL data from v86 (file created by v86 during boot)
|
|
|
|
test -f /mnt/profile.browser && source /mnt/profile.browser
|
|
|
|
|
2024-08-30 12:35:27 +02:00
|
|
|
# source xrsh env
|
2024-08-29 17:18:14 +02:00
|
|
|
source /mnt/profile.xrsh
|
2024-08-26 12:02:35 +02:00
|
|
|
|
2024-09-02 15:05:47 +02:00
|
|
|
# source shell functions
|
|
|
|
source /mnt/profile.sh
|
|
|
|
|
|
|
|
# source js functions
|
2024-09-06 10:30:24 +02:00
|
|
|
./.profile.js
|
2024-09-02 15:05:47 +02:00
|
|
|
|
2024-08-27 20:40:05 +02:00
|
|
|
## forward not-found commands to javascript (via jsh)
|
|
|
|
command_not_found_handle(){
|
2024-08-29 17:18:14 +02:00
|
|
|
echo "$1 not found, did you mean $1(...) (javascript?)"
|
2024-09-02 15:05:47 +02:00
|
|
|
echo ""
|
|
|
|
echo 'TIPS'
|
|
|
|
echo '----'
|
2024-09-05 19:09:40 +02:00
|
|
|
echo 'js run ' "type 'js 'alert(\"hello\")'"
|
|
|
|
echo 'js console.log: ' "type 'console document.baseURI"
|
|
|
|
echo 'js function as cmd: ' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')"
|
|
|
|
echo 'js inspect: ' "type 'js \"return document.baseURI\"'"
|
|
|
|
echo 'js console disable: ' "type 'echo 0 > /dev/browser/console.tty' to enable"
|
|
|
|
echo 'js capture console: ' "type 'tail -f /dev/browser/console'"
|
|
|
|
echo 'jsh<->sh hooks: ' "type 'chmod +x ~/hook.d/*/* && alert helloworld'"
|
2024-08-27 20:40:05 +02:00
|
|
|
}
|
|
|
|
|
2024-08-26 12:02:35 +02:00
|
|
|
resize
|
2024-09-02 15:08:45 +02:00
|
|
|
test $HOSTNAME = localhost || clear
|
2024-08-26 12:02:35 +02:00
|
|
|
cat /mnt/motd
|
2024-09-04 20:44:49 +02:00
|
|
|
export PATH=$PATH:/mnt:~/bin
|
2024-09-03 18:33:35 +02:00
|
|
|
export PS1="\n\[\033[38;5;57m\]x\[\033[38;5;93m\]r\[\033[38;5;129m\]s\[\033[38;5;165m\]h \[\033[38;5;201m\]# \[\033[0m\]"
|
|
|
|
|