mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
remove "cat file |" from scripts
This commit is contained in:
parent
05ab849b72
commit
a927efa015
8 changed files with 13 additions and 15 deletions
|
@ -16,7 +16,7 @@ complete -c adduser -l group --description 'When combined with --system, a group
|
||||||
complete -c adduser -l help --description 'Display brief instructions'
|
complete -c adduser -l help --description 'Display brief instructions'
|
||||||
complete -c adduser -l home --description 'Use specified directory as the user\'s home directory' -x -a '(__fish_complete_directories)'
|
complete -c adduser -l home --description 'Use specified directory as the user\'s home directory' -x -a '(__fish_complete_directories)'
|
||||||
complete -c adduser -l shell --description 'Use shell as the user\'s login shell, rather than the default specified by the configuration file' -x -a '(cat /etc/shells)'
|
complete -c adduser -l shell --description 'Use shell as the user\'s login shell, rather than the default specified by the configuration file' -x -a '(cat /etc/shells)'
|
||||||
complete -c adduser -l ingroup --description 'Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file' -x -a '(cat /etc/group|cut -d : -f 1)'
|
complete -c adduser -l ingroup --description 'Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file' -x -a '(cut -d : -f 1 /etc/group)'
|
||||||
complete -c adduser -l no-create-home --description 'Do not create the home directory, even if it doesni\'t exist'
|
complete -c adduser -l no-create-home --description 'Do not create the home directory, even if it doesni\'t exist'
|
||||||
complete -c adduser -l quiet --description 'Suppress informational messages, only show warnings and errors'
|
complete -c adduser -l quiet --description 'Suppress informational messages, only show warnings and errors'
|
||||||
complete -c adduser -l debug --description 'Be verbose, most useful if you want to nail down a problem with adduser'
|
complete -c adduser -l debug --description 'Be verbose, most useful if you want to nail down a problem with adduser'
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
set -l filter '"s/\S+\s\S+\s(.+)\((.+)\)/\1\t\2/;"'
|
set -l filter '"s/\S+\s\S+\s(.+)\((.+)\)/\1\t\2/;"'
|
||||||
|
|
||||||
complete -c setxkbmap -o '?' -o help -d 'Print this message'
|
complete -c setxkbmap -o '?' -o help -d 'Print this message'
|
||||||
complete -c setxkbmap -o compat -d 'Specifies compatibility map component name' -xa "(cat /usr/share/X11/xkb/compat.dir | sed -r $filter)"
|
complete -c setxkbmap -o compat -d 'Specifies compatibility map component name' -xa "(sed -r $filter /usr/share/X11/xkb/compat.dir)"
|
||||||
complete -c setxkbmap -o config -d 'Specifies configuration file to use' -r
|
complete -c setxkbmap -o config -d 'Specifies configuration file to use' -r
|
||||||
complete -c setxkbmap -o device -d 'Specifies the device ID to use' -x
|
complete -c setxkbmap -o device -d 'Specifies the device ID to use' -x
|
||||||
complete -c setxkbmap -o display -d 'Specifies display to use' -x
|
complete -c setxkbmap -o display -d 'Specifies display to use' -x
|
||||||
complete -c setxkbmap -o geometry -d 'Specifies geometry component name' -xa "(cat /usr/share/X11/xkb/geometry.dir | sed -r $filter)"
|
complete -c setxkbmap -o geometry -d 'Specifies geometry component name' -xa "(sed -r $filter /usr/share/X11/xkb/geometry.dir)"
|
||||||
complete -c setxkbmap -o I -d 'Add <dir> to list of directories to be used' -xa '(__fish_complete_directories)'
|
complete -c setxkbmap -o I -d 'Add <dir> to list of directories to be used' -xa '(__fish_complete_directories)'
|
||||||
complete -c setxkbmap -o keycodes -d 'Specifies keycodes component name' -xa "(cat /usr/share/X11/xkb/keycodes.dir | sed -r $filter)"
|
complete -c setxkbmap -o keycodes -d 'Specifies keycodes component name' -xa "(sed -r $filter /usr/share/X11/xkb/keycodes.dir)"
|
||||||
complete -c setxkbmap -o keymap -d 'Specifies name of keymap to load' -xa "(cat /usr/share/X11/xkb/keymap.dir | sed -r $filter)"
|
complete -c setxkbmap -o keymap -d 'Specifies name of keymap to load' -xa "(sed -r $filter /usr/share/X11/xkb/keymap.dir)"
|
||||||
complete -c setxkbmap -o layout -d 'Specifies layout used to choose component names' -xa "(__fish_complete_setxkbmap layout)"
|
complete -c setxkbmap -o layout -d 'Specifies layout used to choose component names' -xa "(__fish_complete_setxkbmap layout)"
|
||||||
complete -c setxkbmap -o model -d 'Specifies model used to choose component names' -xa "(__fish_complete_setxkbmap model)"
|
complete -c setxkbmap -o model -d 'Specifies model used to choose component names' -xa "(__fish_complete_setxkbmap model)"
|
||||||
complete -c setxkbmap -o option -d 'Adds an option used to choose component names' -xa "(__fish_complete_list , '__fish_complete_setxkbmap option')"
|
complete -c setxkbmap -o option -d 'Adds an option used to choose component names' -xa "(__fish_complete_list , '__fish_complete_setxkbmap option')"
|
||||||
complete -c setxkbmap -o print -d 'Print a complete xkb_keymap description and exit'
|
complete -c setxkbmap -o print -d 'Print a complete xkb_keymap description and exit'
|
||||||
complete -c setxkbmap -o query -d 'Print the current layout settings and exit'
|
complete -c setxkbmap -o query -d 'Print the current layout settings and exit'
|
||||||
complete -c setxkbmap -o rules -d 'Name of rules file to use' -x
|
complete -c setxkbmap -o rules -d 'Name of rules file to use' -x
|
||||||
complete -c setxkbmap -o symbols -d 'Specifies symbols component name' -xa "(cat /usr/share/X11/xkb/symbols.dir | sed -r $filter)"
|
complete -c setxkbmap -o symbols -d 'Specifies symbols component name' -xa "(sed -r $filter /usr/share/X11/xkb/symbols.dir)"
|
||||||
complete -c setxkbmap -o synch -d 'Synchronize request w/X server'
|
complete -c setxkbmap -o synch -d 'Synchronize request w/X server'
|
||||||
complete -c setxkbmap -o types -d 'Specifies types component name' -xa "(cat /usr/share/X11/xkb/types.dir | sed -r $filter)"
|
complete -c setxkbmap -o types -d 'Specifies types component name' -xa "(sed -r $filter /usr/share/X11/xkb/types.dir)"
|
||||||
complete -c setxkbmap -o v -o verbose -d 'Sets verbosity (1..10). Higher values yield more messages' -xa '(seq 1 10)'
|
complete -c setxkbmap -o v -o verbose -d 'Sets verbosity (1..10). Higher values yield more messages' -xa '(seq 1 10)'
|
||||||
complete -c setxkbmap -o variant -d 'Specifies layout variant used to choose component names' -xa "(__fish_complete_setxkbmap variant)"
|
complete -c setxkbmap -o variant -d 'Specifies layout variant used to choose component names' -xa "(__fish_complete_setxkbmap variant)"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ complete -c ssh -s a --description "Disables forwarding of the authentication ag
|
||||||
complete -c ssh -s A --description "Enables forwarding of the authentication agent"
|
complete -c ssh -s A --description "Enables forwarding of the authentication agent"
|
||||||
complete -x -c ssh -s b --description "Interface to transmit from" -a "
|
complete -x -c ssh -s b --description "Interface to transmit from" -a "
|
||||||
(
|
(
|
||||||
cat /proc/net/arp ^/dev/null| string match -r -v '^IP'|cut -d ' ' -f 1 ^/dev/null
|
tail -n +2 /proc/net/arp | cut -d ' ' -f 1 ^/dev/null
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ complete -c umount -s d --description "In case the unmounted device was a loop d
|
||||||
complete -c umount -s i --description "Don't call the /sbin/umount.<filesystem> helper even if it exists"
|
complete -c umount -s i --description "Don't call the /sbin/umount.<filesystem> helper even if it exists"
|
||||||
complete -c umount -s a --description "Unmount all of the file systems described in /etc/mtab"
|
complete -c umount -s a --description "Unmount all of the file systems described in /etc/mtab"
|
||||||
complete -c umount -s t --description "Actions should only be taken on file systems of the specified type" -xa "(__fish_print_filesystems)"
|
complete -c umount -s t --description "Actions should only be taken on file systems of the specified type" -xa "(__fish_print_filesystems)"
|
||||||
complete -c umount -s O --description "Actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cat /etc/mtab | cut -d " " -f 4)\t"Mount option"'
|
complete -c umount -s O --description "Actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cut -d " " -f 4 /etc/mtab)\t"Mount option"'
|
||||||
complete -c umount -s f --description "Force unmount (in case of an unreachable NFS system)"
|
complete -c umount -s f --description "Force unmount (in case of an unreachable NFS system)"
|
||||||
complete -c umount -s l --description "Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy"
|
complete -c umount -s l --description "Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
complete -c useradd -s c -l comment --description 'A comment about this user' -r
|
complete -c useradd -s c -l comment --description 'A comment about this user' -r
|
||||||
complete -c useradd -s d -l home --description 'Home directory for the new user' -x -a '(__fish_complete_directories)'
|
complete -c useradd -s d -l home --description 'Home directory for the new user' -x -a '(__fish_complete_directories)'
|
||||||
complete -c useradd -s G -l groups --description 'Supplementary groups' -xa '(__fish_append , (cat /etc/group|cut -d : -f 1))'
|
complete -c useradd -s G -l groups --description 'Supplementary groups' -xa '(__fish_append , (cut -d : -f 1 /etc/group))'
|
||||||
complete -c useradd -s h -l help --description 'Display help message and exit'
|
complete -c useradd -s h -l help --description 'Display help message and exit'
|
||||||
complete -c useradd -s m -l create-home --description 'The user\'s home directory will be created if it does not exist'
|
complete -c useradd -s m -l create-home --description 'The user\'s home directory will be created if it does not exist'
|
||||||
complete -c useradd -s n --description 'A group having the same name as the user being added to the system will be created by default (when -g is not specified)'
|
complete -c useradd -s n --description 'A group having the same name as the user being added to the system will be created by default (when -g is not specified)'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function __fish_print_function_prototypes -d "Prints the names of all function prototypes found in the headers in the current directory"
|
function __fish_print_function_prototypes -d "Prints the names of all function prototypes found in the headers in the current directory"
|
||||||
cat *.h* | sed -n "s/^\(.*[^[a-zA-Z_0-9]\|\)\([a-zA-Z_][a-zA-Z_0-9]*\) *(.*);.*\$/\2/p"
|
sed -n "s/^\(.*[^[a-zA-Z_0-9]\|\)\([a-zA-Z_][a-zA-Z_0-9]*\) *(.*);.*\$/\2/p" *.h*
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ function __fish_print_packages
|
||||||
if type -q -f zypper
|
if type -q -f zypper
|
||||||
# Use libzypp cache file if available
|
# Use libzypp cache file if available
|
||||||
if test -f /var/cache/zypp/solv/@System/solv.idx
|
if test -f /var/cache/zypp/solv/@System/solv.idx
|
||||||
cat /var/cache/zypp/solv/*/solv.idx | awk '!/application:|srcpackage:|product:|pattern:|patch:/ {print $1'\t$package'}'
|
awk '!/application:|srcpackage:|product:|pattern:|patch:/ {print $1'\t$package'}' /var/cache/zypp/solv/*/solv.idx
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
function __fish_print_xdg_mimetypes --description 'Print XDG mime types'
|
function __fish_print_xdg_mimetypes --description 'Print XDG mime types'
|
||||||
cat ~/.local/share/applications/mimeinfo.cache | grep -v "\[MIME Cache\]" | tr = \t
|
sed -e '/\[MIME Cache\]/d; y!=!\t!' ~/.local/share/applications/mimeinfo.cache /usr/share/applications/mimeinfo.cache
|
||||||
cat /usr/share/applications/mimeinfo.cache | grep -v "\[MIME Cache\]" | tr = \t
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue