Skip to content

Commit

Permalink
Reindent functions to remove useless quotes
Browse files Browse the repository at this point in the history
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
  • Loading branch information
faho committed Mar 9, 2020
1 parent 6deef37 commit 9367d4f
Show file tree
Hide file tree
Showing 307 changed files with 5,262 additions and 5,064 deletions.
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/aliases.fish
@@ -1,5 +1,5 @@
function alias --description 'Creates a function wrapping a command'
set -l options 'h/help' 's/save'
set -l options h/help s/save
argparse -n alias --max-args=2 $options -- $argv
or return

Expand Down
2 changes: 1 addition & 1 deletion build_tools/lint.fish
Expand Up @@ -31,7 +31,7 @@ end
# be harmless everywhere else.
set cppcheck_args $cppcheck_args -I /usr/include -I .

if test "$machine_type" = "x86_64"
if test "$machine_type" = x86_64
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
end

Expand Down
2 changes: 1 addition & 1 deletion build_tools/style.fish
Expand Up @@ -9,7 +9,7 @@ set fish_files
set python_files
set all no

if test "$argv[1]" = "--all"
if test "$argv[1]" = --all
set all yes
set -e argv[1]
end
Expand Down
2 changes: 1 addition & 1 deletion share/completions/abbr.fish
Expand Up @@ -4,4 +4,4 @@ complete -c abbr -f -s a -l add -d 'Add abbreviation'
complete -c abbr -s e -l erase -d 'Erase abbreviation' -xa '(abbr --list)'
complete -c abbr -f -s s -l show -d 'Print all abbreviations'
complete -c abbr -f -s l -l list -d 'Print all abbreviation names'
complete -c abbr -f -s h -l help -d 'Help'
complete -c abbr -f -s h -l help -d Help
112 changes: 56 additions & 56 deletions share/completions/adb.fish
Expand Up @@ -38,9 +38,9 @@ function __fish_adb_run_command -d 'Runs adb with any -s parameters already give
# If no -s option, see if there's a -d or -e instead
if test -z "$sopt"
if contains -- -d $cmd
set sopt '-d'
set sopt -d
else if contains -- -e $cmd
set sopt '-e'
set sopt -e
end
end

Expand All @@ -63,7 +63,7 @@ function __fish_adb_list_files

# Have tab complete show initial / if nothing on current token
if test -z "$token"
set token "/"
set token /
end

# Return list of directories suffixed with '/'
Expand All @@ -74,52 +74,52 @@ end


# Generic options, must come before command
complete -n '__fish_adb_no_subcommand' -c adb -s s -x -a "(__fish_adb_get_devices)" -d 'Device to communicate with'
complete -n '__fish_adb_no_subcommand' -c adb -s d -d 'Communicate with first USB device'
complete -n '__fish_adb_no_subcommand' -c adb -s e -d 'Communicate with emulator'
complete -n __fish_adb_no_subcommand -c adb -s s -x -a "(__fish_adb_get_devices)" -d 'Device to communicate with'
complete -n __fish_adb_no_subcommand -c adb -s d -d 'Communicate with first USB device'
complete -n __fish_adb_no_subcommand -c adb -s e -d 'Communicate with emulator'

# Commands
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'connect' -d 'Connect to device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'disconnect' -d 'Disconnect from device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'devices' -d 'List all connected devices'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'push' -d 'Copy file to device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'pull' -d 'Copy file from device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'sync' -d 'Copy host->device only if changed'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'shell' -d 'Run remote shell [command]'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'emu' -d 'Run emulator console command'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'logcat' -d 'View device log'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'install' -d 'Install package'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'uninstall' -d 'Uninstall package'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'jdwp' -d 'List PIDs of processes hosting a JDWP transport'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'forward' -d 'Port forwarding'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'bugreport' -d 'Return bugreport information'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'backup' -d 'Perform device backup'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'restore' -d 'Restore device from backup'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'version' -d 'Show adb version'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'help' -d 'Show adb help'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'wait-for-device' -d 'Block until device is online'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'start-server' -d 'Ensure that there is a server running'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'kill-server' -d 'Kill the server if it is running'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'remount' -d 'Remounts the /system partition on the device read-write'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'reboot' -d 'Reboots the device, optionally into the bootloader or recovery program'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'get-state' -d 'Prints state of the device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'get-serialno' -d 'Prints serial number of the device'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'get-devpath' -d 'Prints device path'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'status-window' -d 'Continuously print the device status'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'root' -d 'Restart the adbd daemon with root permissions'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'usb' -d 'Restart the adbd daemon listening on USB'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'tcpip' -d 'Restart the adbd daemon listening on TCP'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'ppp' -d 'Run PPP over USB'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'sideload' -d 'Sideloads the given package'
complete -f -n '__fish_adb_no_subcommand' -c adb -a 'reconnect' -d 'Kick current connection from host side and make it reconnect.'
complete -f -n __fish_adb_no_subcommand -c adb -a connect -d 'Connect to device'
complete -f -n __fish_adb_no_subcommand -c adb -a disconnect -d 'Disconnect from device'
complete -f -n __fish_adb_no_subcommand -c adb -a devices -d 'List all connected devices'
complete -f -n __fish_adb_no_subcommand -c adb -a push -d 'Copy file to device'
complete -f -n __fish_adb_no_subcommand -c adb -a pull -d 'Copy file from device'
complete -f -n __fish_adb_no_subcommand -c adb -a sync -d 'Copy host->device only if changed'
complete -f -n __fish_adb_no_subcommand -c adb -a shell -d 'Run remote shell [command]'
complete -f -n __fish_adb_no_subcommand -c adb -a emu -d 'Run emulator console command'
complete -f -n __fish_adb_no_subcommand -c adb -a logcat -d 'View device log'
complete -f -n __fish_adb_no_subcommand -c adb -a install -d 'Install package'
complete -f -n __fish_adb_no_subcommand -c adb -a uninstall -d 'Uninstall package'
complete -f -n __fish_adb_no_subcommand -c adb -a jdwp -d 'List PIDs of processes hosting a JDWP transport'
complete -f -n __fish_adb_no_subcommand -c adb -a forward -d 'Port forwarding'
complete -f -n __fish_adb_no_subcommand -c adb -a bugreport -d 'Return bugreport information'
complete -f -n __fish_adb_no_subcommand -c adb -a backup -d 'Perform device backup'
complete -f -n __fish_adb_no_subcommand -c adb -a restore -d 'Restore device from backup'
complete -f -n __fish_adb_no_subcommand -c adb -a version -d 'Show adb version'
complete -f -n __fish_adb_no_subcommand -c adb -a help -d 'Show adb help'
complete -f -n __fish_adb_no_subcommand -c adb -a wait-for-device -d 'Block until device is online'
complete -f -n __fish_adb_no_subcommand -c adb -a start-server -d 'Ensure that there is a server running'
complete -f -n __fish_adb_no_subcommand -c adb -a kill-server -d 'Kill the server if it is running'
complete -f -n __fish_adb_no_subcommand -c adb -a remount -d 'Remounts the /system partition on the device read-write'
complete -f -n __fish_adb_no_subcommand -c adb -a reboot -d 'Reboots the device, optionally into the bootloader or recovery program'
complete -f -n __fish_adb_no_subcommand -c adb -a get-state -d 'Prints state of the device'
complete -f -n __fish_adb_no_subcommand -c adb -a get-serialno -d 'Prints serial number of the device'
complete -f -n __fish_adb_no_subcommand -c adb -a get-devpath -d 'Prints device path'
complete -f -n __fish_adb_no_subcommand -c adb -a status-window -d 'Continuously print the device status'
complete -f -n __fish_adb_no_subcommand -c adb -a root -d 'Restart the adbd daemon with root permissions'
complete -f -n __fish_adb_no_subcommand -c adb -a usb -d 'Restart the adbd daemon listening on USB'
complete -f -n __fish_adb_no_subcommand -c adb -a tcpip -d 'Restart the adbd daemon listening on TCP'
complete -f -n __fish_adb_no_subcommand -c adb -a ppp -d 'Run PPP over USB'
complete -f -n __fish_adb_no_subcommand -c adb -a sideload -d 'Sideloads the given package'
complete -f -n __fish_adb_no_subcommand -c adb -a reconnect -d 'Kick current connection from host side and make it reconnect.'

# install options
complete -n '__fish_seen_subcommand_from install' -c adb -s l -d 'Forward-lock the app'
complete -n '__fish_seen_subcommand_from install' -c adb -s r -d 'Reinstall the app keeping its data'
complete -n '__fish_seen_subcommand_from install' -c adb -s s -d 'Install on SD card instead of internal storage'
complete -n '__fish_seen_subcommand_from install' -c adb -l 'algo' -d 'Algorithm name'
complete -n '__fish_seen_subcommand_from install' -c adb -l 'key' -d 'Hex-encoded key'
complete -n '__fish_seen_subcommand_from install' -c adb -l 'iv' -d 'Hex-encoded iv'
complete -n '__fish_seen_subcommand_from install' -c adb -l algo -d 'Algorithm name'
complete -n '__fish_seen_subcommand_from install' -c adb -l key -d 'Hex-encoded key'
complete -n '__fish_seen_subcommand_from install' -c adb -l iv -d 'Hex-encoded iv'

# uninstall
complete -n '__fish_seen_subcommand_from uninstall' -c adb -s k -d 'Keep the data and cache directories'
Expand All @@ -133,31 +133,31 @@ complete -n '__fish_seen_subcommand_from disconnect' -c adb -x -a "(__fish_adb_g

# backup
complete -n '__fish_seen_subcommand_from backup' -c adb -s f -d 'File to write backup data to'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'apk' -d 'Enable backup of the .apks themselves'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'noapk' -d 'Disable backup of the .apks themselves (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'obb' -d 'Enable backup of any installed apk expansion'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'noobb' -d 'Disable backup of any installed apk expansion (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'shared' -d 'Enable backup of the device\'s shared storage / SD card contents'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'noshared' -d 'Disable backup of the device\'s shared storage / SD card contents (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'all' -d 'Back up all installed applications'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'system' -d 'Include system applications in -all (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o 'nosystem' -d 'Exclude system applications in -all'
complete -n '__fish_seen_subcommand_from backup' -c adb -o apk -d 'Enable backup of the .apks themselves'
complete -n '__fish_seen_subcommand_from backup' -c adb -o noapk -d 'Disable backup of the .apks themselves (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o obb -d 'Enable backup of any installed apk expansion'
complete -n '__fish_seen_subcommand_from backup' -c adb -o noobb -d 'Disable backup of any installed apk expansion (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o shared -d 'Enable backup of the device\'s shared storage / SD card contents'
complete -n '__fish_seen_subcommand_from backup' -c adb -o noshared -d 'Disable backup of the device\'s shared storage / SD card contents (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o all -d 'Back up all installed applications'
complete -n '__fish_seen_subcommand_from backup' -c adb -o system -d 'Include system applications in -all (default)'
complete -n '__fish_seen_subcommand_from backup' -c adb -o nosystem -d 'Exclude system applications in -all'
complete -n '__fish_seen_subcommand_from backup' -c adb -f -a "(__fish_adb_list_packages)" -d 'Package(s) to backup'

# reboot
complete -n '__fish_seen_subcommand_from reboot' -c adb -x -a 'bootloader recovery'

# forward
complete -n '__fish_seen_subcommand_from forward' -c adb -l 'list' -d 'List all forward socket connections'
complete -n '__fish_seen_subcommand_from forward' -c adb -l 'no-rebind' -d 'Fails the forward if local is already forwarded'
complete -n '__fish_seen_subcommand_from forward' -c adb -l 'remove' -d 'Remove a specific forward socket connection'
complete -n '__fish_seen_subcommand_from forward' -c adb -l 'remove-all' -d 'Remove all forward socket connections'
complete -n '__fish_seen_subcommand_from forward' -c adb -l list -d 'List all forward socket connections'
complete -n '__fish_seen_subcommand_from forward' -c adb -l no-rebind -d 'Fails the forward if local is already forwarded'
complete -n '__fish_seen_subcommand_from forward' -c adb -l remove -d 'Remove a specific forward socket connection'
complete -n '__fish_seen_subcommand_from forward' -c adb -l remove-all -d 'Remove all forward socket connections'

# sideload
complete -n '__fish_seen_subcommand_from sideload' -c adb -xa '(__fish_complete_suffix .zip)'

# reconnect
complete -n '__fish_seen_subcommand_from reconnect' -c adb -x -a 'device' -d 'Kick current connection from device side and make it reconnect.'
complete -n '__fish_seen_subcommand_from reconnect' -c adb -x -a device -d 'Kick current connection from device side and make it reconnect.'

# commands that accept listing device files
complete -n '__fish_seen_subcommand_from shell' -c adb -f -a "(__fish_adb_list_files)" -d 'File on device'
Expand Down
16 changes: 8 additions & 8 deletions share/completions/alsactl.fish
@@ -1,17 +1,17 @@
set -l commands store restore nrestore init daemon rdaemon kill monitor

complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "store" -d "Save current driver state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "restore" -d "Load driver state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "nrestore" -d "Restore and rescan for available soundcards" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a store -d "Save current driver state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a restore -d "Load driver state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a nrestore -d "Restore and rescan for available soundcards" -f
complete -c alsactl -s F -l force -n "__fish_seen_subcommand_from restore nrestore" -d 'Try to restore control elements as much as possible' -f
complete -c alsactl -s g -l ignore -n "__fish_seen_subcommand_from store restore nrestore" -d 'Ignore missing soundcards' -f
complete -c alsactl -s P -l pedantic -n "__fish_seen_subcommand_from restore nrestore" -d 'Do not restore mismatching control elements' -f
complete -c alsactl -s I -l no-init-fallback -n "__fish_seen_subcommand_from restore nrestore" -d 'Do not init if restore fails' -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "init" -d "Initialize all devices to a default state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "daemon" -d "Periodically save state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "rdaemon" -d "Restore state and then periodically save it" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "kill" -d "Notify daemon to do an operation" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a "monitor" -d "Monitor events" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a init -d "Initialize all devices to a default state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a daemon -d "Periodically save state" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a rdaemon -d "Restore state and then periodically save it" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a kill -d "Notify daemon to do an operation" -f
complete -c alsactl -n "not __fish_seen_subcommand_from $commands" -a monitor -d "Monitor events" -f

complete -c alsactl -s h -l help -d 'Show available flags and commands' -f
complete -c alsactl -s d -l debug -d 'Make output a bit more verbose' -f
Expand Down
14 changes: 7 additions & 7 deletions share/completions/ansible-vault.fish
Expand Up @@ -22,13 +22,13 @@ complete -c ansible-vault -l vault-id -r -d "the vault identity to use"
complete -c ansible-vault -l vault-password-file -r -d "Vault password file"

# subcommands
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -a decrypt -d 'Decrypt encrypted file or stdin'
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -a encrypt -d 'Encrypt a file or stdin'
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -ra create -d 'Create encrypted file'
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -ra edit -d 'Edit encrypted file'
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -ra rekey -d 'Rekey encrypted file'
complete -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -ra view -d 'View contents of something encrypted'
complete -f -c ansible-vault -n '__fish_ansible_vault_no_subcommand' -a encrypt_string -d 'Encrypt string'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -a decrypt -d 'Decrypt encrypted file or stdin'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -a encrypt -d 'Encrypt a file or stdin'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -ra create -d 'Create encrypted file'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -ra edit -d 'Edit encrypted file'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -ra rekey -d 'Rekey encrypted file'
complete -c ansible-vault -n __fish_ansible_vault_no_subcommand -ra view -d 'View contents of something encrypted'
complete -f -c ansible-vault -n __fish_ansible_vault_no_subcommand -a encrypt_string -d 'Encrypt string'

# encrypt_string options
complete -c ansible-vault -n '__fish_ansible_vault_using_command encrypt encrypt_string' -r -l stdin-name -f -d 'Specify the variable name for stdin'
Expand Down

0 comments on commit 9367d4f

Please sign in to comment.