1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-25 09:41:20 +08:00

fix(sublime): pass user's env to sst (#12194)

This commit is contained in:
Rayzeq 2024-02-04 18:21:31 +01:00 committed by GitHub
parent 70bf12402c
commit 2124370900
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ alias st=subl
alias stt='subl .'
# Define sst only if sudo exists
(( $+commands[sudo] )) && alias sst='sudo subl'
(( $+commands[sudo] )) && alias sst='sudo -EH subl'
alias stp=find_project
alias stn=create_project
@ -62,7 +62,7 @@ alias stn=create_project
for _sublime_path in $_sublime_paths; do
if [[ -a $_sublime_path ]]; then
alias subl="'$_sublime_path'"
(( $+commands[sudo] )) && alias sst="sudo '$_sublime_path'"
(( $+commands[sudo] )) && alias sst="sudo -EH '$_sublime_path'"
break
fi
done