diff --git a/po/de.po b/po/de.po index 46ad89887..9825adc4c 100644 --- a/po/de.po +++ b/po/de.po @@ -2118,7 +2118,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/en.po b/po/en.po index 0e8101569..e42c37dee 100644 --- a/po/en.po +++ b/po/en.po @@ -2068,7 +2068,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/fr.po b/po/fr.po index 3746d8440..8b12afbe0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2185,8 +2185,8 @@ msgstr "$? n’est pas le code de retour. Dans fish, veuillez utiliser $status." #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." -msgstr "$$ n’est pas le PID. Dans fish, veuillez utiliser %%self." +msgid "$$ is not the pid. In fish, please use $pid." +msgstr "$$ n’est pas le PID. Dans fish, veuillez utiliser $pid." #: src/parse_constants.h:278 msgid "$# is not supported. In fish, please use 'count $argv'." diff --git a/po/nb.po b/po/nb.po index 57fe7d00a..9112bcaba 100644 --- a/po/nb.po +++ b/po/nb.po @@ -2027,7 +2027,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/nn.po b/po/nn.po index 4fa1d9bcb..27cb7902d 100644 --- a/po/nn.po +++ b/po/nn.po @@ -2027,7 +2027,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/pl.po b/po/pl.po index a914f2b96..9bb69f753 100644 --- a/po/pl.po +++ b/po/pl.po @@ -2051,9 +2051,9 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" -"$$ nie jest numerem identyfikacyjnym procesu. W fish używane jest %%self." +"$$ nie jest numerem identyfikacyjnym procesu. W fish używane jest $pid." #: src/parse_constants.h:278 msgid "$# is not supported. In fish, please use 'count $argv'." diff --git a/po/pt_BR.po b/po/pt_BR.po index f5abbc14d..6973708be 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2084,7 +2084,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/sv.po b/po/sv.po index 256e0eeec..fa4458e04 100644 --- a/po/sv.po +++ b/po/sv.po @@ -2031,7 +2031,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/po/zh_CN.po b/po/zh_CN.po index a97024c2d..9e8b37ce1 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2045,7 +2045,7 @@ msgstr "" #: src/parse_constants.h:275 #, c-format -msgid "$$ is not the pid. In fish, please use %%self." +msgid "$$ is not the pid. In fish, please use $pid." msgstr "" #: src/parse_constants.h:278 diff --git a/share/functions/__fish_complete_pids.fish b/share/functions/__fish_complete_pids.fish index d00fbf92d..e352bb3fb 100644 --- a/share/functions/__fish_complete_pids.fish +++ b/share/functions/__fish_complete_pids.fish @@ -1,11 +1,10 @@ function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions" # This may be a bit slower, but it's nice - having the tty displayed is really handy # 'tail -n +2' deletes the first line, which contains the headers - # %self is removed from output by string match -r -v - set -l SELF %self + # $pid is removed from output by string match -r -v # Display the tty if available # But not if it's just question marks, meaning no tty - ps axc -o pid,ucomm,tty | string match -r -v '^\s*'$SELF'\s' | tail -n +2 | string replace -r ' *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+) *$' '$1\t$2 [$3]' | string replace -r ' *\[\?*\] *$' '' + ps axc -o pid,ucomm,tty | string match -r -v '^\s*'$pid'\s' | tail -n +2 | string replace -r ' *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+) *$' '$1\t$2 [$3]' | string replace -r ' *\[\?*\] *$' '' end diff --git a/share/functions/edit_command_buffer.fish b/share/functions/edit_command_buffer.fish index 4fabb5e24..94fce6413 100644 --- a/share/functions/edit_command_buffer.fish +++ b/share/functions/edit_command_buffer.fish @@ -6,9 +6,9 @@ function edit_command_buffer --description 'Edit the command buffer in an extern else # We should never execute this block but better to be paranoid. if set -q TMPDIR - set f $TMPDIR/fish.(echo %self).fish + set f $TMPDIR/fish.$pid.fish else - set f /tmp/fish.(echo %self).fish + set f /tmp/fish.$pid.fish end touch $f or return 1 diff --git a/share/functions/suspend.fish b/share/functions/suspend.fish index ba49439f2..a8803f670 100644 --- a/share/functions/suspend.fish +++ b/share/functions/suspend.fish @@ -18,11 +18,11 @@ function suspend --description 'Suspend the current shell.' end if status is-interactive - echo -ns 'Suspending ' %self ': run' - echo -n (set_color --bold) 'kill -CONT' %self (set_color normal) + echo -ns 'Suspending ' $pid ': run' + echo -n (set_color --bold) 'kill -CONT' $pid (set_color normal) echo 'from another terminal to resume' end # XXX always causes a zombie until one fg's when we do this: - kill -STOP %self + kill -STOP $pid end diff --git a/src/parse_constants.h b/src/parse_constants.h index 9deb0efc3..05700fc4d 100644 --- a/src/parse_constants.h +++ b/src/parse_constants.h @@ -259,7 +259,7 @@ void parse_error_offset_source_start(parse_error_list_t *errors, size_t amt); #define ERROR_NOT_STATUS _(L"$? is not the exit status. In fish, please use $status.") /// Error issued on $$. -#define ERROR_NOT_PID _(L"$$ is not the pid. In fish, please use %%self.") +#define ERROR_NOT_PID _(L"$$ is not the pid. In fish, please use $pid.") /// Error issued on $#. #define ERROR_NOT_ARGV_COUNT _(L"$# is not supported. In fish, please use 'count $argv'.")