[terminal.sh] Terminal's doing stuff with my title
This commit is contained in:
parent
2fea2ba9f8
commit
5d1d0da059
1 changed files with 3 additions and 3 deletions
|
@ -2,10 +2,10 @@
|
|||
|
||||
# If a window with a path in its title is focused, open a terminal with that
|
||||
# location as working directory. Like this, terminals are opened in the same
|
||||
# directory as the currently focused one, if no command is running. This is
|
||||
# very hackish, but it works.
|
||||
# directory as the currently focused one. I modified my oh-my-zsh to always
|
||||
# also print the directory, even when a command is executing.
|
||||
|
||||
if [[ $(xtitle) =~ (^| )(~?)(/.*) ]]; then
|
||||
if [[ $(xtitle) =~ (in|^.*@.*:)\ (~?)(/.*) ]]; then
|
||||
path="${BASH_REMATCH[3]}"
|
||||
[[ ${BASH_REMATCH[2]} == "~" ]] && path="$HOME$path"
|
||||
|
||||
|
|
Loading…
Reference in a new issue