Update %self references with $pid instead

This commit is contained in:
Mahmoud Al-Qudsi 2018-03-09 03:56:19 -06:00
parent 90d0f91bcd
commit b236ab6e5d
13 changed files with 19 additions and 20 deletions

View file

@ -2118,7 +2118,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2068,7 +2068,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2185,8 +2185,8 @@ msgstr "$? nest pas le code de retour. Dans fish, veuillez utiliser $status."
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "$$ nest pas le PID. Dans fish, veuillez utiliser %%self." msgstr "$$ nest pas le PID. Dans fish, veuillez utiliser $pid."
#: src/parse_constants.h:278 #: src/parse_constants.h:278
msgid "$# is not supported. In fish, please use 'count $argv'." msgid "$# is not supported. In fish, please use 'count $argv'."

View file

@ -2027,7 +2027,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2027,7 +2027,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2051,9 +2051,9 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" 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 #: src/parse_constants.h:278
msgid "$# is not supported. In fish, please use 'count $argv'." msgid "$# is not supported. In fish, please use 'count $argv'."

View file

@ -2084,7 +2084,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2031,7 +2031,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -2045,7 +2045,7 @@ msgstr ""
#: src/parse_constants.h:275 #: src/parse_constants.h:275
#, c-format #, c-format
msgid "$$ is not the pid. In fish, please use %%self." msgid "$$ is not the pid. In fish, please use $pid."
msgstr "" msgstr ""
#: src/parse_constants.h:278 #: src/parse_constants.h:278

View file

@ -1,11 +1,10 @@
function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions" 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 # 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 # 'tail -n +2' deletes the first line, which contains the headers
# %self is removed from output by string match -r -v # $pid is removed from output by string match -r -v
set -l SELF %self
# Display the tty if available # Display the tty if available
# But not if it's just question marks, meaning no tty # 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 end

View file

@ -6,9 +6,9 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
else else
# We should never execute this block but better to be paranoid. # We should never execute this block but better to be paranoid.
if set -q TMPDIR if set -q TMPDIR
set f $TMPDIR/fish.(echo %self).fish set f $TMPDIR/fish.$pid.fish
else else
set f /tmp/fish.(echo %self).fish set f /tmp/fish.$pid.fish
end end
touch $f touch $f
or return 1 or return 1

View file

@ -18,11 +18,11 @@ function suspend --description 'Suspend the current shell.'
end end
if status is-interactive if status is-interactive
echo -ns 'Suspending ' %self ': run' echo -ns 'Suspending ' $pid ': run'
echo -n (set_color --bold) 'kill -CONT' %self (set_color normal) echo -n (set_color --bold) 'kill -CONT' $pid (set_color normal)
echo 'from another terminal to resume' echo 'from another terminal to resume'
end end
# XXX always causes a zombie until one fg's when we do this: # XXX always causes a zombie until one fg's when we do this:
kill -STOP %self kill -STOP $pid
end end

View file

@ -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.") #define ERROR_NOT_STATUS _(L"$? is not the exit status. In fish, please use $status.")
/// Error issued on $$. /// 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 $#. /// Error issued on $#.
#define ERROR_NOT_ARGV_COUNT _(L"$# is not supported. In fish, please use 'count $argv'.") #define ERROR_NOT_ARGV_COUNT _(L"$# is not supported. In fish, please use 'count $argv'.")