diff options
author | Carlos Santos <casantos@redhat.com> | 2020-01-22 18:06:28 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2020-01-22 18:06:28 +0100 |
commit | 3bd204b9400650ff75197b4a1ab65711a58b5388 (patch) | |
tree | 8645eb567aa1663dae555f974665bcca3c131fef /src | |
parent | 115db9c2b4d07ab7bcd98c287c39854649bd2750 (diff) | |
download | vte-3bd204b9400650ff75197b4a1ab65711a58b5388.tar.gz |
vte.sh: Add vte.csh, a tcsh counterpart of vte.sh
Use vte-urlencode-cwd in the precmd alias. This overrides an existing precmd
and can also be overriten, like happens with the PROMPT_COMMAND variable
in vte.sh.
Fixes: https://gitlab.gnome.org/GNOME/vte/issues/206
Diffstat (limited to 'src')
-rw-r--r-- | src/meson.build | 10 | ||||
-rw-r--r-- | src/vte.csh.in | 24 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build index 78dba0c5..a385716f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -533,6 +533,16 @@ endforeach # Shell integration +vte_csh = configure_file( + input: 'vte.csh.in', + output: '@BASENAME@', + configuration: { + 'libexecdir': vte_prefix / vte_libexecdir, + }, + install: true, + install_dir: vte_sysconfdir / 'profile.d', +) + vte_sh = configure_file( input: 'vte.sh.in', output: '@BASENAME@', diff --git a/src/vte.csh.in b/src/vte.csh.in new file mode 100644 index 00000000..e809d9c0 --- /dev/null +++ b/src/vte.csh.in @@ -0,0 +1,24 @@ +# Copyright © 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Red Hat Author(s): Carlos Santos + +# exit if non-interactive, csh, no terminal or old VTE versions +if ( ! $?prompt | ! $?tcsh | ! $?TERM | 0$VTE_VERSION < 3405) exit + +switch($TERM) + case xterm*: + alias precmd 'echo -n "\e]7;file://$HOST"; @libexecdir@/vte-urlencode-cwd; echo -n "\e\\"' +endsw |