Add new arguments (enhancements especially when used in scripted environments) #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have made three (quite minor) changes, that are most helpful in scripted scenarios, where
dtach
is used behind the scenes. Namely:add support for
--
argument termination marker (just like other Linux tools), which allows one to have executables starting with-
; another side-effect of this patch is that in casedtach
is used in a script where we can't trust the user input, now the user is not able to inject new options that are interpreted bydtach
; (for example it is used likedtach -c socket -- ${@}
;add support for
-q
option which, like other Linux tools makesdtach
exit quietly if everything is OK; basically it doesn't print anymore[EOS ...]
; in conjunction with the other patches which introduce the-R
option, it makesdtach
transparent when used in scripts;add support for
-R
(the symmetric argument for-r
), which allows the user how the terminal is cleared when the command exits or is detached; the two options aremove
(the current behavior) andnone
, which just prints a new line; the second variant allows one to usedtach
in a loop for short commands, and still be able to read their output without having to scroll; (one use-case is for example in a Jenkins job;)If these patches are accepted I can also provide the necessary
man
updates. (For now I have only added the embedded help documentation.)