sx: remove case check on tty
Substring removal using the '#' form will already try to match from the beginning of the string. If the output from ps does not start with "tty" then nothing will be removed.
This commit is contained in:
parent
d2919f5b62
commit
956be33728
5
sx
5
sx
|
@ -20,10 +20,7 @@ cleanup() {
|
||||||
|
|
||||||
stty=$(stty -g)
|
stty=$(stty -g)
|
||||||
tty=$(ps -o tty= $$)
|
tty=$(ps -o tty= $$)
|
||||||
|
tty=${tty#tty}
|
||||||
case $tty in
|
|
||||||
tty*) tty=${tty#tty}
|
|
||||||
esac
|
|
||||||
|
|
||||||
cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx
|
cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx
|
||||||
datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx
|
datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx
|
||||||
|
|
Loading…
Reference in New Issue