Forráskód Böngészése

Add `ll` alias, use `/usr/bin/env` in installer

Also compact instances of `> /dev/null` as a standard to be used for
files belonging to this repo (external files can have whatever).
Weiyi Lou 9 éve
szülő
commit
3bf73676ee

+ 2 - 2
bin/zfs-backup

@@ -13,8 +13,8 @@ fsFrom=${1:?$usage}
 fsTo=${2:?$usage}
 
 # Check that filesystems exist. Also checks that `zfs` exists.
-zfs list -Hd 0 $fsFrom > /dev/null
-zfs list -Hd 0 $fsTo > /dev/null
+zfs list -Hd 0 $fsFrom >/dev/null
+zfs list -Hd 0 $fsTo >/dev/null
 echo "Source:        $fsFrom"
 echo "Destination:   $fsTo"
 

+ 1 - 1
install

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # vim: set sw=2 ts=2 sts=2 et tw=80 fmr={{{,}}} fdl=0 fdm=marker:
 set -euo pipefail
 IFS=$'\n\t'

+ 1 - 0
shell/common/directories.sh

@@ -9,6 +9,7 @@ fi
 # Folder listing/traversal
 alias l='ls'
 alias la='ls -A'
+alias ll='ls -lh'
 alias lal='ls -Alh'
 
 # Common places

+ 2 - 2
shell/common/fzf.sh

@@ -1,13 +1,13 @@
 # Fuzzy Finder in Go/Ruby
 
-if [[ -x $(command -v ag 2> /dev/null) ]]; then
+if [[ -x $(command -v ag 2>/dev/null) ]]; then
   # Setting ag as the default source for fzf
   export FZF_DEFAULT_COMMAND='ag -l -g ""'
 else
   # Otherwise at least use `git ls-tree` if available.
   export FZF_DEFAULT_COMMAND='
   (git ls-tree -r --name-only HEAD ||
-    find * -name ".*" -prune -o -type f -print -o -type l -print) 2> /dev/null'
+    find * -name ".*" -prune -o -type f -print -o -type l -print) 2>/dev/null'
 fi
 
 # To apply the command to CTRL-T as well (paste selection into command line)

+ 1 - 1
shell/common/git-prompt.sh

@@ -223,7 +223,7 @@ function __gitp_dirty() {
 #
 # Check for a name in git remotes, between ':' or '/' and a space.
 function __gitp_repo() {
-  local repo="$(git remote -v | head -n 1 2> /dev/null)"
+  local repo="$(git remote -v | head -n 1 2>/dev/null)"
   repo=${repo##*[:|/]}
   repo=${repo% *}
   printf "${repo%.git}"

+ 1 - 1
shell/common/git.sh

@@ -59,4 +59,4 @@ alias gcs='git commit --squash'
 
 # Create Work-In-Progress commits.
 alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
-alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'
+alias gwip='git add -A; git rm $(git ls-files --deleted) 2>/dev/null; git commit -m "--wip--"'

+ 1 - 1
shell/common/ssh-agent.sh

@@ -60,7 +60,7 @@ function add_keys() {
 # Start a new agent.
 function start_agent() {
   echo "Starting a new SSH Agent."
-  eval `ssh-agent` &> /dev/null
+  eval `ssh-agent` &>/dev/null
   link_socket
 }
 

+ 1 - 1
shell/common/vars

@@ -4,5 +4,5 @@
 TERM="xterm-256color"
 
 # Git version string
-GIT_VER=$(git --version 2> /dev/null)
+GIT_VER=$(git --version 2>/dev/null)
 GIT_VER=${GIT_VER:12}