fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
650 B10 linesraw
1# localization: skip(private)
2function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions"
3    # This may be a bit slower, but it's nice - having the tty displayed is really handy
4    # 'tail -n +2' deletes the first line, which contains the headers
5    #  $fish_pid is removed from output by string match -r -v
6
7    # Display the tty if available
8    # But not if it's just question marks, meaning no tty
9    __fish_ps -o pid,comm,tty | string match -r -v '^\s*'$fish_pid'\s' | tail -n +2 | string replace -r ' *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+) *$' '$1\t$2 [$3]' | string replace -r ' *\[\?*\] *$' ''
10end