auto commit at 2026-03-25 17:37:53

This commit is contained in:
2026-03-25 17:37:53 +08:00
parent 53d6c6f4fc
commit 5bd67b766f
2 changed files with 24 additions and 10 deletions

20
,
View File

@@ -1,16 +1,16 @@
#!/usr/bin/env ruby #!/bin/bash
set -e
puts %q[This is a "comma script", meaning a script starts with a comma. echo "This is a \"comma script\", meaning a script starts with a comma."
The benefit is: type "," and press TAB, and you can see all comma scripts! echo "The benefit is: type \",\" and press TAB, and you can see all comma scripts!"
]
puts '' echo ""
puts 'Shell: ' + `echo $SHELL` echo "Shell:" $(echo $SHELL)
puts "PATH: #{ENV['PATH'].split(':').size} paths [Please run ',path' to view path list]" echo "PATH:" $(echo "$PATH" | tr ':' '\n' | wc -l) "paths [Please run ',path' to view path list]"
puts '' echo ""
puts 'Ruby version: ' + `/usr/bin/env ruby -v` echo "Ruby version:" $(/usr/bin/env ruby -v)
puts 'Python version: ' + `/usr/bin/env python --version` echo "Python version:" $(/usr/bin/env python --version)

14
,week Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require 'date'
idx = ARGV[0] || '0'
idx = idx.to_i
today = Date.today + idx*7
monday = today - today.cwday + 1
sunday = monday + 6
puts "week-#{today.cweek}-#{monday.strftime('%m%d')}-#{sunday.strftime('%m%d')}"