=Better systemctl handling
這個提交存在於:
父節點
64add644e5
當前提交
9dbfb53327
共有 2 個檔案被更改,包括 1 行新增 和 19 行删除
|
@ -1,18 +0,0 @@
|
|||
get_clean_path() {
|
||||
sed 's/ *:\?$//g;s/`/``/g;s/:/`:`/g;s/\\`:`/\\:/g;' <<< $1 | \
|
||||
awk -v RS='`:`' -v ORS='`:`' '!arr[$0]++' | \
|
||||
sed 's/`:`/:/g;s/:$//g'
|
||||
}
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [[ -d "$HOME/bin" ]] ; then
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [[ -d "$HOME/.local/bin" ]] ; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
PATH=$( get_clean_path $PATH )
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
"style": "powerline",
|
||||
"properties": {
|
||||
"shell": "bash",
|
||||
"command": "systemctl is-system-running || true"
|
||||
"command": "'[[ -n \"$(type -t systemctl)\" ]] && systemctl is-system-running || true'"
|
||||
},
|
||||
"template": "{{ if not (contains \"running\" .Output) }} {{ .Output }} {{ end }}"
|
||||
},
|
||||
|
|
載入中…
新增表格
新增連結
新增問題並參考