Skip to content

Commit

Permalink
mango interval, skip 30 seconds to watch video
Browse files Browse the repository at this point in the history
  • Loading branch information
EnterTheVoid-x86 committed Nov 22, 2021
1 parent ed9a592 commit a37c79c
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 10 deletions.
2 changes: 1 addition & 1 deletion arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ do
printf "\b${sp:i++%${#sp}:1}"
done
printf "prompt: '↳ '
message: 'Welcome to Ruby Shell v1.30!'
message: 'Welcome to Ruby Shell v1.31!'
ascii: 'logo.txt'" >> config.yml
printf "\nFinished."
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
prompt: ''
message: 'Welcome to Ruby Shell v1.30!'
message: 'Welcome to Ruby Shell v1.31!'
ascii: 'logo.txt'
2 changes: 1 addition & 1 deletion fishprompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ do
printf "\b${sp:i++%${#sp}:1}"
done
printf "prompt: '~$ '
message: 'Welcome to Ruby Shell v1.30!'
message: 'Welcome to Ruby Shell v1.31!'
ascii: 'logo.txt'" >> config.yml
printf "\nFinished."
sleep 1
Expand Down
68 changes: 68 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,71 @@ kljkjklj


clear
Among US?
Among
AMONG US
Among us?
clear
puts
clear
irb
sdfsdfsdf
Among us?
SUS
SUS
clear
retry
/
\
\
\
\
\
`
1
1
1
~
/
~?
/?
?
.
dcsjiudvjdvs
fv
f
f
;i
l;
iu;uiku
kuku
ktuko
gj59y
54y54y
9
9
9
.
.
.
.
/
/
/
/.
.
.
.
.
.
.
,
,
,
,
,
Z
irb
irb
irb
irb
Expand Down
2 changes: 1 addition & 1 deletion lambda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ do
printf "\b${sp:i++%${#sp}:1}"
done
printf "prompt: 'λ '
message: 'Welcome to Ruby Shell v1.30!'
message: 'Welcome to Ruby Shell v1.31!'
ascii: 'logo.txt'" >> config.yml
printf "\nFinished."
sleep 1
Expand Down
2 changes: 2 additions & 0 deletions logo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--=============000=============--
******* **
/**////** /** ** **
/** /** ** **/** //** **
Expand All @@ -15,3 +16,4 @@
/**/** /**/**//// /** /**
******** /** /**//****** *** ***
//////// // // ////// /// ///
--=============000=============--
2 changes: 1 addition & 1 deletion main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class String
include Colors
end

puts "Loading Ruby Shell v1.30...".blink.red
puts "Loading Ruby Shell v1.31...".blink.red
sleep 0.5
require_relative 'rsh.rb'
18 changes: 14 additions & 4 deletions rsh.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby

# Ruby Shell v1.30
# Ruby Shell v1.31
require 'readline'
require 'shellwords'
require 'socket'
Expand Down Expand Up @@ -89,6 +89,7 @@ def render_ascii_art(string)
end
end


Readline.completion_append_character = " "
Readline.completion_proc = comp

Expand All @@ -115,29 +116,38 @@ def render_ascii_art(string)
print_exception(e, true)
end
end


# Writes the history to a history file
# The shell is currently ABLE to load this file, but only for the commands ran in the current session, once restarted, it doesn't work, and creates a loop of this bug.

begin
file = File.open("#{workingdir}/history.txt", "a+")
file.write("#{Readline::HISTORY.to_a.last}\n")
rescue IOError => e
rescue IOError => h
#some error occur, dir not writable etc.
puts "Failed to open file."
ensure
file.close unless file.nil?
end
end
# ah yes, stolen stackoverflow code, my favorite

rescue Interrupt => e
# Ensuring that the shell still gets executed if interrupted
puts "^C"
retry
rescue NoMethodError => d
puts "Quitting...".red
printf "\nQuitting...".red
sleep 1
puts "\e[H\e[2J"
sleep 0.2
rescue SystemExit => f
puts "Quitting...".red
printf "\nQuitting...".red
sleep 1
puts "\e[H\e[2J"
sleep 0.2
rescue StandardError => g
puts "rsh: invalid quote"
retry
end
3 changes: 2 additions & 1 deletion rshdev.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env ruby
require_relative "modules/colors.rb"
class String
include Colors
end
puts "Loading Ruby Shell v1.30 in development mode... Warning: Ctrl + C will crash the shell in this mode.".blink.red
puts "Loading Ruby Shell v1.31 in development mode... Warning: Ctrl + C will crash the shell in this mode.".blink.red
sleep 0.7
exec "irb rsh.rb"

0 comments on commit a37c79c

Please sign in to comment.