[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: output/send \033]7; file:///the/current/dir\033\\ o
From: |
Greg Wooledge |
Subject: |
Re: Feature request: output/send \033]7; file:///the/current/dir\033\\ on directory change |
Date: |
Mon, 25 Nov 2019 08:53:53 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Nov 25, 2019 at 02:08:04PM +0200, IFo Hancroft wrote:
> I have the following feature request:
>
> Output/send \033]7;file:///the/current/dir\033\\ on directory change.
cd() {
builtin cd "$@" &&
printf '\e]7;file://%s\a' "$PWD"
}
pushd() {
builtin pushd "$@" &&
printf '\e]7;file://%s\a' "$PWD"
}
popd() {
builtin popd "$@" &&
printf '\e]7;file://%s\a' "$PWD"
}
> TL;DR:
> It makes sense for the shell to output it on directory change.
> Everyone can take advantage of that.
> It will be clean solution.
You can do it yourself, by putting the functions I just gave you into
your ~/.bashrc file. This kind of change doesn't belong in the shell
itself, because it will *not* be a "clean solution" for everybody.