Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doas, pkexec and kdesu as sudo alternatives #281

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion memo/D1665.bashrc2
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [[ $type == fix3 ]]; then
if [[ ${BLE_VERSION-} ]]; then
ble/function#advice after ble/widget/clear-screen '_ble_edit_lineno=0'
_check_clear_command() {
local rex_eval_prefix='((eval|command|env|sudo)[[:space:]]+)?'
local rex_eval_prefix='((eval|command|env|sudo|doas|pkexec|kdesu)[[:space:]]+)?'
local rex_clear_command='(tput[[:space:]]+)?(clear|reset)'
local rex=$'(^|[\n;&|(])[[:space:]]*'$rex_eval_prefix$rex_clear_command'([ \t\n;&|)]|$)'
[[ $BASH_COMMAND =~ $rex ]] && _ble_edit_lineno=0
Expand Down
2 changes: 1 addition & 1 deletion src/edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ function ble/prompt/print-ruler.draw {
[[ $bleopt_prompt_ruler ]] || return 0

local command=$1 opts=$2 cols=$COLUMNS
local rex_eval_prefix='(([!{]|time|if|then|elif|while|until|do|exec|eval|command|env|nice|nohup|xargs|sudo)[[:space:]]+)?'
local rex_eval_prefix='(([!{]|time|if|then|elif|while|until|do|exec|eval|command|env|nice|nohup|xargs|sudo|doas|pkexec|kdesu)[[:space:]]+)?'
local rex_clear_command='(tput[[:space:]]+)?(clear|reset)'
local rex=$'(^|[\n;&|(])[[:space:]]*'$rex_eval_prefix$rex_clear_command'([ \t\n;&|)]|$)'
[[ $command =~ $rex ]] && return 0
Expand Down