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
#, 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

View File

@ -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

View File

@ -2185,8 +2185,8 @@ msgstr "$? nest 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 "$$ nest pas le PID. Dans fish, veuillez utiliser %%self."
msgid "$$ is not the pid. In fish, please use $pid."
msgstr "$$ nest pas le PID. Dans fish, veuillez utiliser $pid."
#: src/parse_constants.h:278
msgid "$# is not supported. In fish, please use 'count $argv'."

View File

@ -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

View File

@ -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

View File

@ -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'."

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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.")
/// 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'.")