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-08-30 12:35:27 +02:00
|
|
|
|
# source javascript functions
|
|
|
|
|
js "$(cat /mnt/profile.js)"
|
|
|
|
|
|
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?)"
|
|
|
|
|
alert '[XRSH TIPS]'
|
|
|
|
|
alert 'js console: ' "type 'jsh'"
|
|
|
|
|
alert 'js shellfunction:' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')"
|
|
|
|
|
alert 'js logging: ' "type 'echo 0 > /dev/browser/console.tty' to disable"
|
|
|
|
|
alert 'js capture log: ' "type 'tail -f /dev/browser/console'"
|
2024-08-30 12:35:27 +02:00
|
|
|
|
alert '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
|
|
|
|
|
#clear
|
|
|
|
|
cat /mnt/motd
|
|
|
|
|
export PATH=$PATH:/mnt
|
|
|
|
|
export PS1="\n[38;5;57mx[38;5;93mr[38;5;129ms[38;5;165mh [38;5;201m# \033[0m"
|