You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i need to build a program which performs different action depending on the name it is called by symlinking (like busybox and some other do), i.e. instead of calling program command do a symlink ln -s program command and then just call it as command.
A simple
ARGV.unshift File.basename($0,'.rb')
does the job, but then the program does not respond to --help or help anymore.
This discussion was converted from issue #681 on May 12, 2023 22:34.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
i need to build a program which performs different action depending on the name it is called by symlinking (like busybox and some other do), i.e. instead of calling program command do a symlink ln -s program command and then just call it as command.
A simple
ARGV.unshift File.basename($0,'.rb')
does the job, but then the program does not respond to --help or help anymore.
Would be nice to get some support for that.
Beta Was this translation helpful? Give feedback.
All reactions