mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Fix screen session name completion for non-Ubuntu distros
For some reason Ubuntu's version of screen includes timestamps in the output of `screen -list`. The timestamps aren't present on other distributions (tested on Fedora and Arch Linux), nor when building from source. This commit fixes the regex so that with or without the timestamp, fish will correctly show suggestions for screen sessions.
This commit is contained in:
parent
efa88b171a
commit
e475b1a375
|
@ -21,7 +21,7 @@ end
|
|||
|
||||
function __fish_complete_screen_general_list -d "Get the socket list"
|
||||
set -l escaped (string escape --style=regex $argv)
|
||||
screen -list | string match -r '^\t.*\(.*\)\s*\('$escaped'\)\s*$'| string replace -r '\t(.*)\s+\((.*)\)\s*\((.*)\)' '$1\t$2 $3'
|
||||
screen -list | string match -r '^\t.*\('$escaped'\)\s*$' | string replace -r '\t(.*)\s+(\(.*\))?\s*\((.*)\)' '$1\t$3'
|
||||
end
|
||||
|
||||
function __fish_complete_screen_detached -d "Print a list of detached screen sessions"
|
||||
|
|
Loading…
Reference in New Issue
Block a user