From patchwork Tue Sep 12 01:04:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 9948253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 37C2860224 for ; Tue, 12 Sep 2017 01:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A0D828D20 for ; Tue, 12 Sep 2017 01:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D1BD28DAB; Tue, 12 Sep 2017 01:04:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E2ED28D20 for ; Tue, 12 Sep 2017 01:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751054AbdILBEW (ORCPT ); Mon, 11 Sep 2017 21:04:22 -0400 Received: from mgwym01.jp.fujitsu.com ([211.128.242.40]:63996 "EHLO mgwym01.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbdILBEV (ORCPT ); Mon, 11 Sep 2017 21:04:21 -0400 Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.229.67]) by mgwym01.jp.fujitsu.com with smtp id 0b04_2826_9e09282e_c70e_4fd6_a713_ec578d8c856d; Tue, 12 Sep 2017 10:04:18 +0900 Received: from g01jpfmpwkw02.exch.g01.fujitsu.local (g01jpfmpwkw02.exch.g01.fujitsu.local [10.0.193.56]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id 611ABAC0153 for ; Tue, 12 Sep 2017 10:04:17 +0900 (JST) Received: from G01JPEXCHKW15.g01.fujitsu.local (G01JPEXCHKW15.g01.fujitsu.local [10.0.194.54]) by g01jpfmpwkw02.exch.g01.fujitsu.local (Postfix) with ESMTP id 9D0043286F2; Tue, 12 Sep 2017 10:04:16 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: a7c73f8429224faab25738d85d70540f To: CC: From: "Misono, Tomohiro" Subject: [PATCH] btrfs-progs: cleanup whitespaces of btrfs-completion Message-ID: Date: Tue, 12 Sep 2017 10:04:10 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up spaces and use only tabs. No functional change. Signed-off-by: Tomohiro Misono --- btrfs-completion | 188 +++++++++++++++++++++++++++---------------------------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/btrfs-completion b/btrfs-completion index 1f00add..ae683f4 100644 --- a/btrfs-completion +++ b/btrfs-completion @@ -6,8 +6,8 @@ _btrfs_devs() { - local DEVS - DEVS=''; while read dev; do DEVS+="$dev "; done < <(lsblk -pnro name) + local DEVS + DEVS=''; while read dev; do DEVS+="$dev "; done < <(lsblk -pnro name) COMPREPLY+=( $( compgen -W "$DEVS" -- "$cur" ) ) } @@ -23,92 +23,92 @@ _btrfs_mnts() _btrfs() { local cur prev words cword - _init_completion || return + _init_completion || return - COMPREPLY=() + COMPREPLY=() local cmd=${words[1]} - commands='subvolume filesystem balance device scrub check rescue restore inspect-internal property send receive quota qgroup replace help version' - commands_subvolume='create delete list snapshot find-new get-default set-default show sync' - commands_filesystem='defragment sync resize show df du label usage' - commands_balance='start pause cancel resume status' - commands_device='scan add delete remove ready stats usage' - commands_scrub='start cancel resume status' - commands_rescue='chunk-recover super-recover zero-log' - commands_inspect_internal='inode-resolve logical-resolve subvolid-resolve rootid min-dev-size dump-tree dump-super tree-stats' - commands_property='get set list' - commands_quota='enable disable rescan' - commands_qgroup='assign remove create destroy show limit' - commands_replace='start status cancel' + commands='subvolume filesystem balance device scrub check rescue restore inspect-internal property send receive quota qgroup replace help version' + commands_subvolume='create delete list snapshot find-new get-default set-default show sync' + commands_filesystem='defragment sync resize show df du label usage' + commands_balance='start pause cancel resume status' + commands_device='scan add delete remove ready stats usage' + commands_scrub='start cancel resume status' + commands_rescue='chunk-recover super-recover zero-log' + commands_inspect_internal='inode-resolve logical-resolve subvolid-resolve rootid min-dev-size dump-tree dump-super tree-stats' + commands_property='get set list' + commands_quota='enable disable rescan' + commands_qgroup='assign remove create destroy show limit' + commands_replace='start status cancel' if [[ "$cur" == -* && $cword -le 3 && "$cmd" != "help" ]]; then COMPREPLY=( $( compgen -W '--help' -- "$cur" ) ) return 0 fi - if [[ $cword -eq 1 ]]; then - COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) ) - return 0 - elif [[ $cword -eq 2 ]]; then - case $cmd in - subvolume) - opts="$commands_subvolume" - ;; - filesystem) - opts="$commands_filesystem" - ;; - balance) - opts="$commands_balance" - ;; - device) - opts="$commands_device" - ;; - scrub) - opts="$commands_scrub" - ;; - check) - _btrfs_devs + if [[ $cword -eq 1 ]]; then + COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) ) + return 0 + elif [[ $cword -eq 2 ]]; then + case $cmd in + subvolume) + opts="$commands_subvolume" + ;; + filesystem) + opts="$commands_filesystem" + ;; + balance) + opts="$commands_balance" + ;; + device) + opts="$commands_device" + ;; + scrub) + opts="$commands_scrub" + ;; + check) + _btrfs_devs + return 0 + ;; + rescue) + opts="$commands_rescue" + ;; + restore) + _btrfs_devs return 0 - ;; - rescue) - opts="$commands_rescue" - ;; - restore) - _btrfs_devs + ;; + inspect-internal) + opts="$commands_inspect_internal" + ;; + property) + opts="$commands_property" + ;; + send|receive) + _filedir -d return 0 - ;; - inspect-internal) - opts="$commands_inspect_internal" - ;; - property) - opts="$commands_property" - ;; - send|receive) - _filedir -d - return 0 - ;; - quota) - opts="$commands_quota" - ;; - qgroup) - opts="$commands_qgroup" - ;; - replace) - opts="$commands_replace" - ;; - help) - opts="--full" - ;; - version) - return 0 - ;; - esac - COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) - return 0 - elif [[ $cword -eq 3 ]]; then - case $cmd in - filesystem) + ;; + quota) + opts="$commands_quota" + ;; + qgroup) + opts="$commands_qgroup" + ;; + replace) + opts="$commands_replace" + ;; + help) + opts="--full" + ;; + version) + return 0 + ;; + esac + COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) + return 0 + elif [[ $cword -eq 3 ]]; then + case $cmd in + filesystem) case $prev in defragment) _filedir @@ -124,11 +124,11 @@ _btrfs() return 0 ;; esac - ;; - device|rescue) + ;; + device|rescue) _btrfs_devs - return 0 - ;; + return 0 + ;; inspect-internal) case $prev in min-dev-size) @@ -149,18 +149,18 @@ _btrfs() ;; esac ;; - replace) - case $prev in - status|cancel) + replace) + case $prev in + status|cancel) _btrfs_mnts - return 0 - ;; - start) + return 0 + ;; + start) _btrfs_devs - return 0 - ;; - esac - ;; + return 0 + ;; + esac + ;; subvolume) case $prev in list) @@ -169,11 +169,11 @@ _btrfs() ;; esac ;; - esac - fi + esac + fi - _filedir -d - return 0 + _filedir -d + return 0 } complete -F _btrfs btrfs