Add fish, tmux, vim, and git dotfiles; clean up

This commit is contained in:
mitchell 2019-08-15 00:44:46 -04:00
commit e57d8318d9
47 changed files with 2125 additions and 0 deletions

View File

@ -0,0 +1,564 @@
# docker.fish - docker completions for fish shell
#
# This file is generated by gen_docker_fish_completions.py from:
# https://github.com/barnybug/docker-fish-completion
#
# To install the completions:
# mkdir -p ~/.config/fish/completions
# cp docker.fish ~/.config/fish/completions
#
# Completion supported:
# - parameters
# - commands
# - containers
# - images
# - repositories
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs pause port ps pull push rename restart rm rmi run save search start stop tag top trust unpause version wait stats
return 1
end
end
return 0
end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select
case running
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case stopped
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case all
docker ps -a --no-trunc --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
end
end
function __fish_docker_no_subcommand_trust --description 'Test if docker has yet to be given the trust subcommand'
if __fish_seen_subcommand_from trust
for i in (commandline -opc)
if contains -- $i inspect key revoke sign signer
return 1
end
end
return 0
end
return 1
end
function __fish_docker_subcommand_path --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if not contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_docker_subcommand_path_without --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_print_docker_images --description 'Print a list of docker images'
docker images --format "{{.Repository}}:{{.Tag}}" | command grep -v '<none>'
end
function __fish_print_docker_repositories --description 'Print a list of docker repositories'
docker images --format "{{.Repository}}" | command grep -v '<none>' | command sort | command uniq
end
# common options
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the Engine API. Default is cors disabled"
complete -c docker -f -n '__fish_docker_no_subcommand' -s b -l bridge -d 'Attach containers to a pre-existing network bridge'
complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR notation address for the network bridge's IP, not compatible with -b"
complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-opt -d 'Force Docker to use specific DNS options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set runtime execution options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s g -l graph -d 'Path to use as the root of the Docker runtime'
complete -c docker -f -n '__fish_docker_no_subcommand' -s H -l host -d 'The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.'
complete -c docker -f -n '__fish_docker_no_subcommand' -s h -l help -d 'Print usage'
complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Allow unrestricted inter-container and Docker daemon host communication'
complete -c docker -f -n '__fish_docker_no_subcommand' -l insecure-registry -d 'Enable insecure communication with specified registries (no certificate verification for HTTPS and enable HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip -d 'Default IP address to use when binding container ports'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-forward -d 'Enable net.ipv4.ip_forward and IPv6 forwarding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your existing IPv6 configuration when using Router Advertisement.'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-masq -d "Enable IP masquerading for bridge's IP range"
complete -c docker -f -n '__fish_docker_no_subcommand' -l iptables -d "Enable Docker's addition of iptables rules"
complete -c docker -f -n '__fish_docker_no_subcommand' -l ipv6 -d 'Enable IPv6 networking'
complete -c docker -f -n '__fish_docker_no_subcommand' -s l -l log-level -d 'Set the logging level ("debug", "info", "warn", "error", "fatal")'
complete -c docker -f -n '__fish_docker_no_subcommand' -l label -d 'Set key=value labels to the daemon (displayed in `docker info`)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l mtu -d 'Set the containers network MTU'
complete -c docker -f -n '__fish_docker_no_subcommand' -s p -l pidfile -d 'Path to use for daemon PID file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l registry-mirror -d 'Specify a preferred Docker registry mirror'
complete -c docker -f -n '__fish_docker_no_subcommand' -s s -l storage-driver -d 'Force the Docker runtime to use a specific storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l selinux-enabled -d 'Enable selinux support. SELinux does not presently support the BTRFS storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l storage-opt -d 'Set storage driver options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tls -d 'Use TLS; implied by --tlsverify'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscacert -d 'Trust only remotes providing a certificate signed by the CA given here'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscert -d 'Path to TLS certificate file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlskey -d 'Path to TLS key file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlsverify -d 'Use TLS and verify the remote (daemon: verify client, client: verify daemon)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s v -l version -d 'Print version information and quit'
# subcommands
# attach
complete -c docker -f -n '__fish_docker_no_subcommand' -a attach -d 'Attach local standard input, output, and error streams to a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container"
# build
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l build-arg -d 'Set build-time variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cache-from -d 'Images to consider as cache sources'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l compress -d 'Compress the build context using gzip'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-period -d 'Limit the CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-quota -d 'Limit the CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s f -l file -d "Name of the Dockerfile (Default is PATH/Dockerfile)"
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l force-rm -d 'Always remove intermediate containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l iddfile -d 'Write the image ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l label -d 'Set metadata for an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l memory-swap -d 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l network -d 'Set the networking mode for the RUN instructions during build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l pull -d 'Always attempt to pull a newer version of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the build output and print image ID on success'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l security-opt -d 'Security options'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s t -l tag -d 'Name and optionally a tag in the name:tag format'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l target -d 'Set the target build stage to build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l ulimit -d 'Ulimit options'
# commit
complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes"
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s a -l author -d 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s m -l message -d 'Commit message'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s p -l pause -d 'Pause container during commit'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container"
# cp
complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d "Copy files/folders between a container and the local filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s a -l archive -d 'Archive mode (copy all uid/gid information)'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s L -l follow-link -d 'Always follow symbol link in SRC_PATH'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print usage'
# create
complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight -d 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight-device -d 'Block IO weight (relative device weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-count -d 'CPU count (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-percent -d 'CPU percent (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-period -d 'Limit CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-quota -d 'Limit CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-period -d 'Limit CPU real-time period in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-runtime -d 'Limit CPU real-time runtime in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpus -d 'Number of CPUs'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-bps -d 'Limit read rate (bytes per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-iops -d 'Limit read rate (IO per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-bps -d 'Limit write rate (bytes per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-iops -d 'Limit write rate (IO per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-opt -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-option -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-search -d 'Set custom DNS search domains'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l expose -d 'Expose a port or a range of ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to join'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-cmd -d 'Command to run to check health'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-interval -d 'Time between running the check (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-retries -d 'Consecutive failures needed to report unhealthy'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-start-period -d 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-timeout -d 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l init -d 'Run an init inside the container that forwards signals and reaps processes'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxbandwidth -d 'Maximum IO bandwidth limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxiops -d 'Maximum IOps limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip -d 'IPv4 address (e.g., 172.30.100.104)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip6 -d 'IPv6 address (e.g., 2001:db8::33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ipc -d 'IPC mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l kernel-memory -d 'Kernel memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s l -l label -d 'Set meta data on a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l label-file -d 'Read in a line delimited file of labels'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link -d 'Add link to another container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link-local-ip -d 'Container IPv4/IPv6 link-local addresses'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-driver -d 'Logging driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-opt -d 'Log driver options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-reservation -d 'Memory soft limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swap -d 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swappiness -d 'Tune container memory swappiness (0 to 100)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net -l network -d 'Connect a container to a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net-alias -l network-alias -d 'Add network-scoped alias for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l no-healthcheck -d 'Disable any container-specified HEALTHCHECK'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-kill-disable -d 'Disable OOM Killer'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-score-adj -d 'Tune hosts OOM preferences (-1000 to 1000)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pid -d 'PID namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pids-limit -d 'Tune container pids limit (set -1 for unlimited )'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s p -l publish -d "Publish a containers port(s) to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s P -l publish-all -d 'Publish all exposed ports to random ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l restart -d 'Restart policy to apply when a container exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l rm -d 'Automatically remove the container when it exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l runtime -d 'Runtime to use for this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-signal -d 'Signal to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-timeout -d 'Timeout (in seconds) to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l storage-opt -d 'Storage driver options for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l sysctl -d 'Sysctl options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l tmpfs -d 'Mount a tmpfs directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ulimit -d 'Ulimit options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d ' Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l userns -d 'User namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l uts -d 'UTS namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volume-driver -d 'Optional volume driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_images)' -d "Image"
# diff
complete -c docker -f -n '__fish_docker_no_subcommand' -a diff -d "Inspect changes on a container's filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -a '(__fish_print_docker_containers all)' -d "Container"
# events
complete -c docker -f -n '__fish_docker_no_subcommand' -a events -d 'Get real time events from the server'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -s f -l filter -d "Filter output based on conditions provided"
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l format -d 'Format the output using the given Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l since -d 'Show all events created since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l until -d 'Stream events until this timestamp'
# exec
complete -c docker -f -n '__fish_docker_no_subcommand' -a exec -d 'Run a command in a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s d -l detach -d 'Detached mode: run command in the background'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l privileged -d 'Give extended privileges to the command'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s u -l user -d 'Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_containers running)' -d "Container"
# export
complete -c docker -f -n '__fish_docker_no_subcommand' -a export -d 'Stream the contents of a container as a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -s o -l output -d 'Write to a file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -a '(__fish_print_docker_containers all)' -d "Container"
# history
complete -c docker -f -n '__fish_docker_no_subcommand' -a history -d 'Show the history of an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l format -d 'Pretty-print images using a Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s H -l human -d 'Print sizes and dates in human readable format'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s q -l quiet -d 'Only show numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_print_docker_images)' -d "Image"
# images
complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate images)'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l digests -d 'Show digests'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d 'Filter output based on conditions provided'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l format -d 'Pretty-print images using a Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s q -l quiet -d 'Only show numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -a '(__fish_print_docker_repositories)' -d "Repository"
# import
complete -c docker -f -n '__fish_docker_no_subcommand' -a import -d 'Create a new filesystem image from the contents of a tarball'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s m -l message -d 'Set commit message for imported image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -l help -d 'Print usage'
# info
complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -l help -d 'Print usage'
# inspect
complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s f -l format -d 'Format the output using the given go template.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s s -l size -d 'Display total file sizes if the type is container.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l type -d 'Return JSON for specified type'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_containers all)' -d "Container"
# kill
complete -c docker -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -s s -l signal -d 'Signal to send to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_containers running)' -d "Container"
# load
complete -c docker -f -n '__fish_docker_no_subcommand' -a load -d 'Load an image from a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s i -l input -d 'Read from a tar archive file, instead of STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s q -l quiet -d 'Suppress the load output'
# login
complete -c docker -f -n '__fish_docker_no_subcommand' -a login -d 'Log in to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s p -l password -d 'Password'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l password-stdin -d 'Take the password from stdin'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s u -l username -d 'Username'
# logout
complete -c docker -f -n '__fish_docker_no_subcommand' -a logout -d 'Log out from a Docker registry server'
# logs
complete -c docker -f -n '__fish_docker_no_subcommand' -a logs -d 'Fetch the logs of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s f -l follow -d 'Follow log output'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s t -l timestamps -d 'Show timestamps'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l since -d 'Show logs since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l tail -d 'Output the specified number of lines at the end of logs (defaults to all logs)'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_containers running)' -d "Container"
# port
complete -c docker -f -n '__fish_docker_no_subcommand' -a port -d 'Lookup the public-facing port that is NAT-ed to PRIVATE_PORT'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_containers running)' -d "Container"
# pause
complete -c docker -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause all processes within a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from pause' -a '(__fish_print_docker_containers running)' -d "Container"
# ps
complete -c docker -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s a -l all -d 'Show all containers. Only running containers are shown by default.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l before -d 'Show only container created before Id or Name, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s f -l filter -d 'Provide filter values. Valid filters:'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s l -l latest -d 'Show only the latest created container, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s n -d 'Show n last created containers, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s q -l quiet -d 'Only display numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s s -l size -d 'Display total file sizes'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l since -d 'Show only containers created since Id or Name, include non-running ones.'
# pull
complete -c docker -f -n '__fish_docker_no_subcommand' -a pull -d 'Pull an image or a repository from a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -s a -l all-tags -d 'Download all tagged images in the repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_repositories)' -d "Repository"
# push
complete -c docker -f -n '__fish_docker_no_subcommand' -a push -d 'Push an image or a repository to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_repositories)' -d "Repository"
# rename
complete -c docker -f -n '__fish_docker_no_subcommand' -a rename -d 'Rename an existing container'
# restart
complete -c docker -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -s t -l time -d 'Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_containers running)' -d "Container"
# rm
complete -c docker -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove one or more containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -d 'Force the removal of a running container (uses SIGKILL)'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s l -l link -d 'Remove the specified link and not the underlying container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s v -l volumes -d 'Remove the volumes associated with the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_containers stopped)' -d "Container"
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -a '(__fish_print_docker_containers all)' -d "Container"
# rmi
complete -c docker -f -n '__fish_docker_no_subcommand' -a rmi -d 'Remove one or more images'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -s f -l force -d 'Force removal of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l no-prune -d 'Do not delete untagged parents'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -a '(__fish_print_docker_images)' -d "Image"
# run
complete -c docker -f -n '__fish_docker_no_subcommand' -a run -d 'Run a command in a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s d -l detach -d 'Detached mode: run the container in the background and print the new container ID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list (e.g. --device-cgroup-rule="c 13:37 rwm")'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l expose -d 'Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to run as'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l ipc -d 'Default is to create a private IPC namespace (POSIX SysV IPC) for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l link -d 'Add link to another container in the form of <name|id>:alias'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s m -l memory -d 'Memory limit (format: <number>[<unit>], where unit = b, k, m or g)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l memory-swap -d "Total memory usage (memory + swap), set '-1' to disable swap (format: <number>[<unit>], where unit = b, k, m or g)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l net -d 'Set the Network mode for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s P -l publish-all -d 'Publish all exposed ports to random ports on the host interfaces'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s p -l publish -d "Publish a container's port to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l pid -d 'Default is to create a private PID namespace for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l restart -d 'Restart policy to apply when a container exits (no, on-failure[:max-retry], always)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l rm -d 'Automatically remove the container when it exits (incompatible with -d)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l sig-proxy -d 'Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l stop-signal -d 'Signal to kill a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l tmpfs -d 'Mount tmpfs on a directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_images)' -d "Image"
# save
complete -c docker -f -n '__fish_docker_no_subcommand' -a save -d 'Save an image to a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -s o -l output -d 'Write to an file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -a '(__fish_print_docker_images)' -d "Image"
# search
complete -c docker -f -n '__fish_docker_no_subcommand' -a search -d 'Search for an image on the registry (defaults to the Docker Hub)'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l automated -d 'Only show automated builds'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -s s -l stars -d 'Only displays with at least x stars'
# start
complete -c docker -f -n '__fish_docker_no_subcommand' -a start -d 'Start a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s a -l attach -d "Attach container's STDOUT and STDERR and forward all signals to the process"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s i -l interactive -d "Attach container's STDIN"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -a '(__fish_print_docker_containers stopped)' -d "Container"
# stats
complete -c docker -f -n '__fish_docker_no_subcommand' -a stats -d "Display a live stream of one or more containers' resource usage statistics"
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l no-stream -d 'Disable streaming stats and only pull the first result'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -a '(__fish_print_docker_containers running)' -d "Container"
# stop
complete -c docker -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -s t -l time -d 'Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_containers running)' -d "Container"
# tag
complete -c docker -f -n '__fish_docker_no_subcommand' -a tag -d 'Tag an image into a repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -s f -l force -d 'Force'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -l help -d 'Print usage'
# top
complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Lookup the running processes of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container"
#trust
complete -c docker -f -n '__fish_docker_no_subcommand' -a trust -d 'Manage trust on Docker images'
complete -c docker -A -f -n '__fish_seen_subcommand_from trust' -l help -d 'Print usage'
#trust inspect
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a inspect -d 'Return low-level information about keys and signatures'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust inspect' -l pretty -d 'Print the information in a human friendly format'
#trust key
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a key -d 'Manage keys for signing Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a generate -d 'Generate and load a signing key-pair'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l dir -d 'Directory to generate key in, defaults to current directory'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a load -d 'Load a private key file for signing'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l name -d 'Name for the loaded key (default "signer")'
#trust revoke
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a revoke -d 'Remove trust for an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust revoke' -s y -l yes -d 'Do not prompt for confirmation'
#trust sign
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a sign -d 'Sign an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust sign' -l local -d 'Sign a locally tagged image'
#trust signer
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a signer -d 'Manage entities who can sign Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a add -d 'Add a signer'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a remove -d 'remove a signer'
# unpause
complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause a paused container'
complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container"
# version
complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -l help -d 'Print usage'
# wait
complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -a '(__fish_print_docker_containers running)' -d "Container"

View File

@ -0,0 +1 @@
fisher complete

6
.config/fish/config.fish Normal file
View File

@ -0,0 +1,6 @@
set -x PATH $PATH $GOBIN $HOME/.pub-cache/bin $HOME/Documents/bash_scripts $HOME/Library/Python/2.7/bin $HOME/.n/bin $HOME/Documents/flutter/bin $HOME/.cargo/bin
set -g fish_escape_delay_ms 10
# The next line updates PATH for the Google Cloud SDK.
if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end

View File

@ -0,0 +1,31 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export AWS_SDK_LOAD_CONFIG:true
SETUVAR fish_color_autosuggestion:586e75
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:93a1a1
SETUVAR fish_color_comment:586e75
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:268bd2
SETUVAR fish_color_error:dc322f
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:839496
SETUVAR fish_color_quote:657b83
SETUVAR fish_color_redirection:6c71c4
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_completion:B3A06D
SETUVAR fish_pager_color_description:B3A06D
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

1
.config/fish/fishfile Normal file
View File

@ -0,0 +1 @@
jethrokuan/z

View File

@ -0,0 +1,3 @@
function cp
rsync -aP $argv
end

View File

@ -0,0 +1,10 @@
function fish_greeting -d "What's up, fish?"
set_color $fish_color_autosuggestion
uname -nmsr
# TODO: `command -q -s` only works on fish 2.5+, so hold off on that for now
command -s uptime >/dev/null
and uptime
set_color normal
end

View File

@ -0,0 +1,3 @@
function fish_mode_prompt
end

View File

@ -0,0 +1,158 @@
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
set -l color_cwd
set -l suffix
set -l user_prefix
set -l git_branch
set -l go_version
set -l docker_version
set -l node_version
set -l ex_version
set -l dart_version
set -l flutter_version
set -l jobs_num
set -l exit_code
# Set exit code, based on last command status
if test $last_status -ne 0
set exit_code '<' (set_color $fish_color_status) $last_status (set_color normal) '> '
end
# Set jobs num, based on exit code of jobs command
if jobs > /dev/null
set -l jobs_out (jobs -c)
set jobs_num '[' (set_color brblack) (count $jobs_out) (set_color normal) '] '
end
# Set cwd color and prompt suffix, based on current user and fish_bind_mode.
switch "$USER"
case root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
set suffix '#~>'
if test $fish_key_bindings = 'fish_vi_key_bindings'
switch "$fish_bind_mode"
case 'insert'
set suffix (set_color brblue) $suffix (set_color normal)
case 'default'
set suffix '###'
case 'visual'
set suffix (set_color bryellow) '<~#' (set_color normal)
end
end
case '*'
set color_cwd $fish_color_cwd
set suffix '~~>'
if test $fish_key_bindings = 'fish_vi_key_bindings'
switch "$fish_bind_mode"
case 'insert'
set suffix (set_color brblue) $suffix (set_color normal)
case 'default'
set suffix '<~>'
case 'visual'
set suffix (set_color bryellow) '<~~' (set_color normal)
end
end
end
# Set user_prefix, based on whether or not inside of ssh session.
if test -n "$SSH_CLIENT"; set user_prefix $USER @ (prompt_hostname) ' '; end
# Show current git branch, based on git commands only.
if git branch --show-current > /dev/null 2> /dev/null
set -l branch_color green
set -l git_status (git status)
if string match 'Changes not staged for commit:' $git_status > /dev/null
or string match 'Untracked files:' $git_status > /dev/null
set branch_color red
else if string match 'Changes to be committed:' $git_status > /dev/null
set branch_color yellow
end
set -l cur_branch (git branch --show-current)
if test -z $cur_branch; set cur_branch 'detached'; end
set -l cur_branch_len (string length $cur_branch)
if test $cur_branch_len -gt 21
set -l sub_str (string sub -s (math $cur_branch_len - 17) -l 18 $cur_branch)
set cur_branch "...$sub_str"
end
if string match 'Your branch is ahead of*' $git_status > /dev/null
set cur_branch $cur_branch \u21A5
else if string match 'Your branch is behind*' $git_status > /dev/null
set cur_branch $cur_branch \u21A7
end
set git_branch ' on ' (set_color $branch_color) $cur_branch (set_color normal)
end
# Set go version, by existence of go mod or dep files
if test -e ./go.mod; or test -e ./Gopkg.toml
set -l version_str (string match -r 'go\d+\.\d+\.?\d*' (go version))
set go_version ' with ' (set_color 8eadaf) $version_str (set_color normal)
end
# Set docker version, by existence of Dockerfile
if test -e ./Dockerfile
set -l version_str (string match -r '\d+\.\d+\.?\d*' (docker --version))
set docker_version ' on ' (set_color blue) 'docker' $version_str (set_color normal)
end
# Set user prefix, based on docker machine name
if test -n "$DOCKER_MACHINE_NAME"
set user_prefix (set_color blue) $DOCKER_MACHINE_NAME (set_color normal) ' '
end
# Set node (and ts) version, based on existance of package.json (and tsconfig.json)
if test -e ./package.json
set -l version_str (string sub -s 2 (node -v))
set node_version ' with ' (set_color brgreen) 'node' $version_str (set_color normal)
if test -e ./tsconfig.json
set -l version_str (string match -r '\d+\.\d+\.?\d*' (tsc -v))
set node_version $node_version ' and ' (set_color cyan) 'ts' $version_str (set_color normal)
end
end
# Set elixir version, based on existance of mix.exs
if test -e ./mix.exs
set -l version_str (string sub -s 8 (string match -r 'Elixir \d+\.\d+\.?\d*' (elixir -v)))
set ex_version ' with ' (set_color magenta) 'ex' $version_str (set_color normal)
end
# Set dart version, based on existances of pubspec.yaml
if test -e ./pubspec.yaml
set -l version_str (string match -r '\d+\.\d+\.?\d*' (dart --version 2>| cat))
set dart_version ' with ' (set_color brblue) 'dart' $version_str (set_color normal)
if cat pubspec.yaml | grep flutter > /dev/null
set -l version_str (string sub -s 9 (string match -r 'Flutter \d+\.\d+\.?\d*' (flutter --version)))
set flutter_version ' on ' (set_color blue) 'flutter' $version_str (set_color normal)
end
end
# Combine all prompt variables
set -l cwd (set_color $color_cwd) (prompt_pwd) (set_color normal)
set -l top_prompt $cwd $git_branch $go_version $ex_version $node_version $dart_version $flutter_version $docker_version
set -l bottom_prompt $user_prefix $jobs_num $exit_code $suffix ' '
# Decide whether to insert newline, based on whether the top prompt is only equal to cwd
if test "$top_prompt" = "$cwd"
set bottom_prompt ' ' $bottom_prompt
else
set bottom_prompt \n $bottom_prompt
end
echo -n -s $top_prompt
echo -n -s $bottom_prompt
end

View File

@ -0,0 +1,82 @@
# Borrowed from bobthefish theme (https://github.com/oh-my-fish/theme-bobthefish).
# Copyright (c) 2013-2014 Justin Hileman.
#
# Modifications:
# - Remove lines 75, 76, 78 of original file. Setting '<' as the default left arrow glyph.
#
# You can override some default right prompt options in your config.fish:
# set -g theme_date_format "+%a %H:%M"
function __bobthefish_cmd_duration -S -d 'Show command duration'
[ "$theme_display_cmd_duration" = "no" ]
and return
[ -z "$CMD_DURATION" -o "$CMD_DURATION" -lt 100 ]
and return
if [ "$CMD_DURATION" -lt 5000 ]
echo -ns $CMD_DURATION 'ms'
else if [ "$CMD_DURATION" -lt 60000 ]
__bobthefish_pretty_ms $CMD_DURATION s
else if [ "$CMD_DURATION" -lt 3600000 ]
set_color $fish_color_error
__bobthefish_pretty_ms $CMD_DURATION m
else
set_color $fish_color_error
__bobthefish_pretty_ms $CMD_DURATION h
end
set_color $fish_color_normal
set_color $fish_color_autosuggestion
[ "$theme_display_date" = "no" ]
or echo -ns ' ' $__bobthefish_left_arrow_glyph
end
function __bobthefish_pretty_ms -S -a ms -a interval -d 'Millisecond formatting for humans'
set -l interval_ms
set -l scale 1
switch $interval
case s
set interval_ms 1000
case m
set interval_ms 60000
case h
set interval_ms 3600000
set scale 2
end
switch $FISH_VERSION
case 2.0.\* 2.1.\* 2.2.\* 2.3.\*
# Fish 2.3 and lower doesn't know about the -s argument to math.
math "scale=$scale;$ms/$interval_ms" | string replace -r '\\.?0*$' $interval
case 2.\*
# Fish 2.x always returned a float when given the -s argument.
math -s$scale "$ms/$interval_ms" | string replace -r '\\.?0*$' $interval
case \*
math -s$scale "$ms/$interval_ms"
echo -ns $interval
end
end
function __bobthefish_timestamp -S -d 'Show the current timestamp'
[ "$theme_display_date" = "no" ]
and return
set -q theme_date_format
or set -l theme_date_format "+%c"
echo -n ' '
date $theme_date_format
end
function fish_right_prompt -d 'bobthefish is all about the right prompt'
set __bobthefish_left_arrow_glyph '<'
set_color $fish_color_autosuggestion
__bobthefish_cmd_duration
__bobthefish_timestamp
set_color normal
end

View File

@ -0,0 +1,278 @@
function fish_vi_key_bindings --description 'vi-like key bindings for fish'
if contains -- -h $argv
or contains -- --help $argv
echo "Sorry but this function doesn't support -h or --help"
return 1
end
# Erase all bindings if not explicitly requested otherwise to
# allow for hybrid bindings.
# This needs to be checked here because if we are called again
# via the variable handler the argument will be gone.
set -l rebind true
if test "$argv[1]" = "--no-erase"
set rebind false
set -e argv[1]
else
bind --erase --all --preset # clear earlier bindings, if any
end
# Allow just calling this function to correctly set the bindings.
# Because it's a rather discoverable name, users will execute it
# and without this would then have subtly broken bindings.
if test "$fish_key_bindings" != "fish_vi_key_bindings"
and test "$rebind" = "true"
# Allow the user to set the variable universally.
set -q fish_key_bindings
or set -g fish_key_bindings
# This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed.
set fish_key_bindings fish_vi_key_bindings
return
end
# The default escape timeout is 300ms. But for users of Vi bindings that can be slightly
# annoying when trying to switch to Vi "normal" mode. So set a shorter timeout in this case
# unless the user has explicitly set the delay.
set -q fish_escape_delay_ms
or set -g fish_escape_delay_ms 100
set -l init_mode insert
# These are only the special vi-style keys
# not end/home, we share those.
set -l eol_keys \$ g\$
set -l bol_keys \^ 0 g\^
if contains -- $argv[1] insert default visual
set init_mode $argv[1]
else if set -q argv[1]
# We should still go on so the bindings still get set.
echo "Unknown argument $argv" >&2
end
# Inherit shared key bindings.
# Do this first so vi-bindings win over default.
for mode in insert default visual
__fish_shared_key_bindings -M $mode
end
bind -s --preset -M insert \r execute
bind -s --preset -M insert \n execute
bind -s --preset -M insert "" self-insert
# Add way to kill current command line while in insert mode.
bind -s --preset -M insert \cc __fish_cancel_commandline
# Add a way to switch from insert to normal (command) mode.
# Note if we are paging, we want to stay in insert mode
# See #2871
bind -s --preset -M insert jj "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
# Default (command) mode
bind -s --preset :q exit
bind -s --preset -m insert \cc __fish_cancel_commandline
bind -s --preset -M default h backward-char
bind -s --preset -M default l forward-char
bind -s --preset -m insert \n execute
bind -s --preset -m insert \r execute
bind -s --preset -m insert i force-repaint
bind -s --preset -m insert I beginning-of-line force-repaint
bind -s --preset -m insert a forward-char force-repaint
bind -s --preset -m insert A end-of-line force-repaint
bind -s --preset -m visual v begin-selection force-repaint
#bind -s --preset -m insert o "commandline -a \n" down-line force-repaint
#bind -s --preset -m insert O beginning-of-line "commandline -i \n" up-line force-repaint # doesn't work
bind -s --preset gg beginning-of-buffer
bind -s --preset G end-of-buffer
for key in $eol_keys
bind -s --preset $key end-of-line
end
for key in $bol_keys
bind -s --preset $key beginning-of-line
end
bind -s --preset u history-search-backward
bind -s --preset \cr history-search-forward
bind -s --preset [ history-token-search-backward
bind -s --preset ] history-token-search-forward
bind -s --preset k up-or-search
bind -s --preset j down-or-search
bind -s --preset b backward-word
bind -s --preset B backward-bigword
bind -s --preset ge backward-word
bind -s --preset gE backward-bigword
bind -s --preset w forward-word forward-char
bind -s --preset W forward-bigword forward-char
bind -s --preset e forward-char forward-word backward-char
bind -s --preset E forward-bigword backward-char
# OS X SnowLeopard doesn't have these keys. Don't show an annoying error message.
# Vi/Vim doesn't support these keys in insert mode but that seems silly so we do so anyway.
bind -s --preset -M insert -k home beginning-of-line 2>/dev/null
bind -s --preset -M default -k home beginning-of-line 2>/dev/null
bind -s --preset -M insert -k end end-of-line 2>/dev/null
bind -s --preset -M default -k end end-of-line 2>/dev/null
# Vi moves the cursor back if, after deleting, it is at EOL.
# To emulate that, move forward, then backward, which will be a NOP
# if there is something to move forward to.
bind -s --preset -M default x delete-char forward-char backward-char
bind -s --preset -M default X backward-delete-char
bind -s --preset -M insert -k dc delete-char forward-char backward-char
bind -s --preset -M default -k dc delete-char forward-char backward-char
# Backspace deletes a char in insert mode, but not in normal/default mode.
bind -s --preset -M insert -k backspace backward-delete-char
bind -s --preset -M default -k backspace backward-char
bind -s --preset -M insert \ch backward-delete-char
bind -s --preset -M default \ch backward-char
bind -s --preset -M insert \x7f backward-delete-char
bind -s --preset -M default \x7f backward-char
bind -s --preset -M insert \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
bind -s --preset -M default \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-ctrl-delete
bind -s --preset dd kill-whole-line
bind -s --preset D kill-line
bind -s --preset d\$ kill-line
bind -s --preset d\^ backward-kill-line
bind -s --preset dw kill-word
bind -s --preset dW kill-bigword
bind -s --preset diw forward-char forward-char backward-word kill-word
bind -s --preset diW forward-char forward-char backward-bigword kill-bigword
bind -s --preset daw forward-char forward-char backward-word kill-word
bind -s --preset daW forward-char forward-char backward-bigword kill-bigword
bind -s --preset de kill-word
bind -s --preset dE kill-bigword
bind -s --preset db backward-kill-word
bind -s --preset dB backward-kill-bigword
bind -s --preset dge backward-kill-word
bind -s --preset dgE backward-kill-bigword
bind -s --preset df begin-selection forward-jump kill-selection end-selection
bind -s --preset dt begin-selection forward-jump backward-char kill-selection end-selection
bind -s --preset dF begin-selection backward-jump kill-selection end-selection
bind -s --preset dT begin-selection backward-jump forward-char kill-selection end-selection
bind -s --preset -m insert s delete-char force-repaint
bind -s --preset -m insert S kill-whole-line force-repaint
bind -s --preset -m insert cc kill-whole-line force-repaint
bind -s --preset -m insert C kill-line force-repaint
bind -s --preset -m insert c\$ kill-line force-repaint
bind -s --preset -m insert c\^ backward-kill-line force-repaint
bind -s --preset -m insert cw kill-word force-repaint
bind -s --preset -m insert cW kill-bigword force-repaint
bind -s --preset -m insert ciw forward-char forward-char backward-word kill-word force-repaint
bind -s --preset -m insert ciW forward-char forward-char backward-bigword kill-bigword force-repaint
bind -s --preset -m insert caw forward-char forward-char backward-word kill-word force-repaint
bind -s --preset -m insert caW forward-char forward-char backward-bigword kill-bigword force-repaint
bind -s --preset -m insert ce kill-word force-repaint
bind -s --preset -m insert cE kill-bigword force-repaint
bind -s --preset -m insert cb backward-kill-word force-repaint
bind -s --preset -m insert cB backward-kill-bigword force-repaint
bind -s --preset -m insert cge backward-kill-word force-repaint
bind -s --preset -m insert cgE backward-kill-bigword force-repaint
bind -s --preset '~' capitalize-word
bind -s --preset gu downcase-word
bind -s --preset gU upcase-word
bind -s --preset J end-of-line delete-char
bind -s --preset K 'man (commandline -t) 2>/dev/null; or echo -n \a'
bind -s --preset yy kill-whole-line yank
bind -s --preset Y kill-whole-line yank
bind -s --preset y\$ kill-line yank
bind -s --preset y\^ backward-kill-line yank
bind -s --preset yw kill-word yank
bind -s --preset yW kill-bigword yank
bind -s --preset yiw forward-char forward-char backward-word kill-word yank
bind -s --preset yiW forward-char forward-char backward-bigword kill-bigword yank
bind -s --preset yaw forward-char forward-char backward-word kill-word yank
bind -s --preset yaW forward-char forward-char backward-bigword kill-bigword yank
bind -s --preset ye kill-word yank
bind -s --preset yE kill-bigword yank
bind -s --preset yb backward-kill-word yank
bind -s --preset yB backward-kill-bigword yank
bind -s --preset yge backward-kill-word yank
bind -s --preset ygE backward-kill-bigword yank
bind -s --preset f forward-jump
bind -s --preset F backward-jump
bind -s --preset t forward-jump-till
bind -s --preset T backward-jump-till
bind -s --preset ';' repeat-jump
bind -s --preset , repeat-jump-reverse
# in emacs yank means paste
bind -s --preset p yank
bind -s --preset P backward-char yank
bind -s --preset gp yank-pop
bind -s --preset '"*p' "commandline -i ( xsel -p; echo )[1]"
bind -s --preset '"*P' backward-char "commandline -i ( xsel -p; echo )[1]"
#
# Lowercase r, enters replace_one mode
#
bind -s --preset -m replace_one r force-repaint
bind -s --preset -M replace_one -m default '' delete-char self-insert backward-char force-repaint
bind -s --preset -M replace_one -m default \e cancel force-repaint
#
# visual mode
#
bind -s --preset -M visual h backward-char
bind -s --preset -M visual l forward-char
bind -s --preset -M visual k up-line
bind -s --preset -M visual j down-line
bind -s --preset -M visual b backward-word
bind -s --preset -M visual B backward-bigword
bind -s --preset -M visual ge backward-word
bind -s --preset -M visual gE backward-bigword
bind -s --preset -M visual w forward-word
bind -s --preset -M visual W forward-bigword
bind -s --preset -M visual e forward-word
bind -s --preset -M visual E forward-bigword
bind -s --preset -M visual o swap-selection-start-stop force-repaint
bind -s --preset -M visual f forward-jump
bind -s --preset -M visual t forward-jump-till
bind -s --preset -M visual F backward-jump
bind -s --preset -M visual T backward-jump-till
for key in $eol_keys
bind -s --preset -M visual $key end-of-line
end
for key in $bol_keys
bind -s --preset -M visual $key beginning-of-line
end
bind -s --preset -M visual -m insert c kill-selection end-selection force-repaint
bind -s --preset -M visual -m default d kill-selection end-selection force-repaint
bind -s --preset -M visual -m default x kill-selection end-selection force-repaint
bind -s --preset -M visual -m default X kill-whole-line end-selection force-repaint
bind -s --preset -M visual -m default y kill-selection yank end-selection force-repaint
bind -s --preset -M visual -m default '"*y' "commandline -s | xsel -p; commandline -f end-selection force-repaint"
bind -s --preset -M visual -m default \cc end-selection force-repaint
bind -s --preset -M visual -m default \e end-selection force-repaint
# Make it easy to turn an unexecuted command into a comment in the shell history. Also, remove
# the commenting chars so the command can be further edited then executed.
bind -s --preset -M default \# __fish_toggle_comment_commandline
bind -s --preset -M visual \# __fish_toggle_comment_commandline
# Set the cursor shape
# After executing once, this will have defined functions listening for the variable.
# Therefore it needs to be before setting fish_bind_mode.
fish_vi_cursor
set fish_bind_mode $init_mode
end

View File

@ -0,0 +1,430 @@
set -g fisher_version 3.2.9
function fisher -a cmd -d "fish package manager"
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
set -g fish_config $XDG_CONFIG_HOME/fish
set -g fisher_cache $XDG_CACHE_HOME/fisher
set -g fisher_config $XDG_CONFIG_HOME/fisher
set -q fisher_path; or set -g fisher_path $fish_config
for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache
if test ! -d $path
command mkdir -p $path
end
end
if test ! -e $fisher_path/completions/fisher.fish
echo "fisher complete" >$fisher_path/completions/fisher.fish
_fisher_complete
end
if test -e $fisher_path/conf.d/fisher.fish
switch "$version"
case \*-\*
command rm -f $fisher_path/conf.d/fisher.fish
case 2\*
case \*
command rm -f $fisher_path/conf.d/fisher.fish
end
else
switch "$version"
case \*-\*
case 2\*
echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish
end
end
switch "$cmd"
case {,self-}complete
_fisher_complete
case copy-user-key-bindings
_fisher_copy_user_key_bindings
case ls
set -e argv[1]
if test -s "$fisher_path/fishfile"
set -l file (_fisher_fmt <$fisher_path/fishfile | _fisher_parse -R | command sed "s|@.*||")
_fisher_ls | _fisher_fmt | command awk -v FILE="$file" "
BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/
" | command sed "s|^$HOME|~|"
end
case self-update
_fisher_self_update (status -f)
case self-uninstall
_fisher_self_uninstall
case {,-}-v{ersion,}
echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|")
case {,-}-h{elp,}
_fisher_help
case ""
_fisher_commit --
case add rm
if not isatty
while read -l arg
set argv $argv $arg
end
end
if test (count $argv) = 1
echo "fisher: invalid number of arguments" >&2
_fisher_help >&2
return 1
end
_fisher_commit $argv
case \*
echo "fisher: unknown flag or command \"$cmd\"" >&2
_fisher_help >&2
return 1
end
end
function _fisher_complete
complete -ec fisher
complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages"
complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages"
complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX"
complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help"
complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version"
complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
for pkg in (fisher ls)
complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg
end
end
function _fisher_copy_user_key_bindings
if functions -q fish_user_key_bindings
functions -c fish_user_key_bindings fish_user_key_bindings_copy
end
function fish_user_key_bindings
for file in $fisher_path/conf.d/*_key_bindings.fish
source $file >/dev/null 2>/dev/null
end
if functions -q fish_user_key_bindings_copy
fish_user_key_bindings_copy
end
end
end
function _fisher_ls
for pkg in $fisher_config/*/*/*
command readlink $pkg; or echo $pkg
end
end
function _fisher_fmt
command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||"
end
function _fisher_help
echo "usage: fisher add <package...> Add packages"
echo " fisher rm <package...> Remove packages"
echo " fisher Update all packages"
echo " fisher ls [<regex>] List installed packages matching <regex>"
echo " fisher --help Show this help"
echo " fisher --version Show the current version"
echo " fisher self-update Update to the latest version"
echo " fisher self-uninstall Uninstall from your system"
echo "examples:"
echo " fisher add jethrokuan/z rafaelrinaldi/pure"
echo " fisher add gitlab.com/foo/bar@v2"
echo " fisher add ~/path/to/local/pkg"
echo " fisher add <file"
echo " fisher rm rafaelrinaldi/pure"
echo " fisher ls | fisher rm"
echo " fisher ls fish-\*"
end
function _fisher_self_update -a file
set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish"
echo "fetching $url" >&2
command curl -s "$url?nocache" >$file.
set -l next_version (command awk '{ print $4 } { exit }' <$file.)
switch "$next_version"
case "" $fisher_version
command rm -f $file.
if test -z "$next_version"
echo "fisher: cannot update fisher -- are you offline?" >&2
return 1
end
echo "fisher is already up-to-date" >&2
case \*
echo "linking $file" | command sed "s|$HOME|~|" >&2
command mv -f $file. $file
source $file
echo "updated to fisher $fisher_version -- hooray!" >&2
_fisher_complete
end
end
function _fisher_self_uninstall
for pkg in (_fisher_ls)
_fisher_rm $pkg
end
for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fisher_path/fishfile
echo "removing $file"
command rm -Rf $file 2>/dev/null
end | command sed "s|$HOME|~|" >&2
for name in (set -n | command awk '/^fisher_/')
set -e "$name"
end
functions -e (functions -a | command awk '/^_fisher/') fisher
complete -c fisher --erase
end
function _fisher_commit -a cmd
set -e argv[1]
set -l elapsed (_fisher_now)
set -l fishfile $fisher_path/fishfile
if test ! -e "$fishfile"
command touch $fishfile
echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
end
set -l old_pkgs (_fisher_ls | _fisher_fmt)
for pkg in (_fisher_ls)
_fisher_rm $pkg
end
command rm -Rf $fisher_config
command mkdir -p $fisher_config
set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt))
set -l actual_pkgs (_fisher_fetch $next_pkgs)
set -l updated_pkgs
for pkg in $old_pkgs
if contains -- $pkg $actual_pkgs
set updated_pkgs $updated_pkgs $pkg
end
end
if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs"
echo "fisher: nothing to commit -- try adding some packages" >&2
return 1
end
set -l out_pkgs
if test "$cmd" = "rm"
set out_pkgs $next_pkgs
else
for pkg in $next_pkgs
if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs
set out_pkgs $out_pkgs $pkg
end
end
end
printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile
_fisher_complete
command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) '
BEGIN {
res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U)))
printf((res ? res : "done") " in %.2fs\n", E / 1000)
}
function fmt(action, n, s) {
return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s
}
' >&2
end
function _fisher_parse -a mode cmd
set -e argv[1..2]
command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" '
BEGIN {
for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i]
}
!NF { next } { k = getkey($1) }
MODE == "-R" && !(k in pkgs) && $0 = $1
MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") }
MODE == "-W" || CMD == "rm" { delete pkgs[k] }
END {
for (k in pkgs) {
if (CMD != "rm" || MODE == "-W") print pkgs[k]
else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr"
}
}
function getkey(s, a) {
return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1]
}
'
end
function _fisher_fetch
set -l pkg_jobs
set -l out_pkgs
set -l next_pkgs
set -l local_pkgs
set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token
for pkg in $argv
switch $pkg
case \~\* /\*
set -l path (echo "$pkg" | command sed "s|^~|$HOME|")
if test -e "$path"
set local_pkgs $local_pkgs $path
else
echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2
end
continue
end
command awk -v PKG="$pkg" -v FS=/ '
BEGIN {
if (split(PKG, tmp, /@+|:/) > 2) {
if (tmp[4]) sub("@"tmp[4], "", PKG)
print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master")
} else {
pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1]
tag = tmp[2] ? tmp[2] : "master"
print (\
pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \
pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \
pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \
) "\t" pkg
}
}
' | read -l url pkg branch
if test ! -d "$fisher_config/$pkg"
fish -c "
echo fetching $url >&2
command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg)
if test ! -z \"$branch\"
command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null
or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2
else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null
command rm -Rf $fisher_cache/$pkg
command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg
command rm -Rf $fisher_config/$pkg
command cp -Rf {$fisher_cache,$fisher_config}/$pkg
else if test -d \"$fisher_cache/$pkg\"
echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..
else
command rm -Rf $fisher_config/$pkg
echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2
end
" >/dev/null &
set pkg_jobs $pkg_jobs (_fisher_jobs --last)
set next_pkgs $next_pkgs "$fisher_config/$pkg"
end
end
if set -q pkg_jobs[1]
while for job in $pkg_jobs
contains -- $job (_fisher_jobs); and break
end
end
for pkg in $next_pkgs
if test -d "$pkg"
set out_pkgs $out_pkgs $pkg
_fisher_add $pkg
end
end
end
set -l local_prefix $fisher_config/local/$USER
if test ! -d "$local_prefix"
command mkdir -p $local_prefix
end
for pkg in $local_pkgs
set -l target $local_prefix/(command basename $pkg)
if test ! -L "$target"
command ln -sf $pkg $target
set out_pkgs $out_pkgs $pkg
_fisher_add $pkg --link
end
end
if set -q out_pkgs[1]
_fisher_fetch (
for pkg in $out_pkgs
if test -s "$pkg/fishfile"
_fisher_fmt <$pkg/fishfile | _fisher_parse -R
end
end)
printf "%s\n" $out_pkgs | _fisher_fmt
end
end
function _fisher_add -a pkg opts
for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish
set -l target (command basename $src)
switch $src
case $pkg/conf.d\*
set target $fisher_path/conf.d/$target
case $pkg/completions\*
set target $fisher_path/completions/$target
case $pkg/{functions,}\*
switch $target
case uninstall.fish
continue
case {init,key_bindings}.fish
set target $fisher_path/conf.d/(command basename $pkg)\_$target
case \*
set target $fisher_path/functions/$target
end
end
echo "linking $target" | command sed "s|$HOME|~|" >&2
if set -q opts[1]
command ln -sf $src $target
else
command cp -f $src $target
end
switch $target
case \*.fish
source $target >/dev/null 2>/dev/null
end
end
end
function _fisher_rm -a pkg
for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish
set -l target (command basename $src)
set -l filename (command basename $target .fish)
switch $src
case $pkg/conf.d\*
test "$filename.fish" = "$target"; and emit "$filename"_uninstall
set target conf.d/$target
case $pkg/completions\*
test "$filename.fish" = "$target"; and complete -ec $filename
set target completions/$target
case $pkg/{,functions}\*
test "$filename.fish" = "$target"; and functions -e $filename
switch $target
case uninstall.fish
source $src
continue
case {init,key_bindings}.fish
set target conf.d/(command basename $pkg)\_$target
case \*
set target functions/$target
end
end
command rm -f $fisher_path/$target
end
if not functions -q fish_prompt
source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish"
end
end
function _fisher_jobs
jobs $argv | command awk '/^[0-9]+\t/ { print $1 }'
end
function _fisher_now -a elapsed
switch (command uname)
case Darwin \*BSD
command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
case \*
math (command date "+%s%3N") - "0$elapsed"
end
end

View File

@ -0,0 +1,4 @@
function goland
open -a Goland .
end

View File

@ -0,0 +1,4 @@
function machine-env
eval (docker-machine env $argv)
end

View File

@ -0,0 +1,4 @@
function v
vim (fzf)
end

View File

@ -0,0 +1,4 @@
function vs
vi (ag -l $argv)
end

46
.gitconfig Normal file
View File

@ -0,0 +1,46 @@
[alias]
co = checkout
br = branch
cm = commit
st = status
rb = rebase
push--fwl = push --force-with-lease
llog = log --date=local
flog = log --pretty=fuller --decorate
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --all --date-order
blog = log origin/master... --left-right
ds = diff --staged
fixup = commit --fixup
squash = commit --squash
unstage = reset HEAD
rum = rebase master@{u}
[core]
editor = vim
[color]
ui = auto
branch = auto
interactive = auto
status = auto
[push]
default = simple
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = "red bold"
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[merge]
tool = kdiff3

75
.gitmodules vendored Normal file
View File

@ -0,0 +1,75 @@
[submodule ".vim/bundle/Zenburn"]
path = .vim/bundle/Zenburn
url = https://github.com/jnurmine/Zenburn.git
[submodule ".vim/bundle/ack.vim"]
path = .vim/bundle/ack.vim
url = https://github.com/mileszs/ack.vim.git
[submodule ".vim/bundle/ale"]
path = .vim/bundle/ale
url = https://github.com/w0rp/ale.git
[submodule ".vim/bundle/dart-vim-plugin"]
path = .vim/bundle/dart-vim-plugin
url = https://github.com/dart-lang/dart-vim-plugin.git
[submodule ".vim/bundle/dracula"]
path = .vim/bundle/dracula
url = https://github.com/dracula/vim.git
[submodule ".vim/bundle/gruvbox"]
path = .vim/bundle/gruvbox
url = https://github.com/morhetz/gruvbox.git
[submodule ".vim/bundle/lightline.vim"]
path = .vim/bundle/lightline.vim
url = https://github.com/itchyny/lightline.vim.git
[submodule ".vim/bundle/nerdtree"]
path = .vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree.git
[submodule ".vim/bundle/nord-vim"]
path = .vim/bundle/nord-vim
url = git://github.com/arcticicestudio/nord-vim.git
[submodule ".vim/bundle/tmuxline.vim"]
path = .vim/bundle/tmuxline.vim
url = https://github.com/edkolev/tmuxline.vim.git
[submodule ".vim/bundle/typescript-vim"]
path = .vim/bundle/typescript-vim
url = https://github.com/leafgarland/typescript-vim.git
[submodule ".vim/bundle/vim-colors-pencil"]
path = .vim/bundle/vim-colors-pencil
url = https://github.com/reedes/vim-colors-pencil.git
[submodule ".vim/bundle/vim-elixir"]
path = .vim/bundle/vim-elixir
url = https://github.com/elixir-editors/vim-elixir.git
[submodule ".vim/bundle/vim-endwise"]
path = .vim/bundle/vim-endwise
url = git://github.com/tpope/vim-endwise.git
[submodule ".vim/bundle/vim-fish"]
path = .vim/bundle/vim-fish
url = https://github.com/dag/vim-fish.git
[submodule ".vim/bundle/vim-gitgutter"]
path = .vim/bundle/vim-gitgutter
url = https://github.com/airblade/vim-gitgutter
[submodule ".vim/bundle/vim-go"]
path = .vim/bundle/vim-go
url = https://github.com/fatih/vim-go
[submodule ".vim/bundle/vim-graphql"]
path = .vim/bundle/vim-graphql
url = https://github.com/jparise/vim-graphql.git
[submodule ".vim/bundle/vim-javascript"]
path = .vim/bundle/vim-javascript
url = https://github.com/pangloss/vim-javascript
[submodule ".vim/bundle/vim-material-theme"]
path = .vim/bundle/vim-material-theme
url = https://github.com/jdkanani/vim-material-theme.git
[submodule ".vim/bundle/vim-one"]
path = .vim/bundle/vim-one
url = https://github.com/rakr/vim-one.git
[submodule ".vim/bundle/vim-pencil"]
path = .vim/bundle/vim-pencil
url = https://github.com/reedes/vim-pencil.git
[submodule ".vim/bundle/vim-ruby"]
path = .vim/bundle/vim-ruby
url = git://github.com/vim-ruby/vim-ruby.git
[submodule ".vim/bundle/vim-surround"]
path = .vim/bundle/vim-surround
url = https://github.com/tpope/vim-surround
[submodule ".vim/bundle/vim-toml"]
path = .vim/bundle/vim-toml
url = https://github.com/cespare/vim-toml.git

5
.tmux-line.conf Normal file
View File

@ -0,0 +1,5 @@
# This tmux statusbar config was created by tmuxline.vim
# on Sun, 04 Aug 2019
set -g status-style fg=colour246,bg=colour237
set -g window-status-current-style fg=colour223,bg=colour239

18
.tmux.conf Normal file
View File

@ -0,0 +1,18 @@
set -g default-terminal "xterm-256color"
setw -g mouse on
setw -g mode-keys vi
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
bind | split-window -h
bind _ split-window -v
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
source-file ".tmux-line.conf"

289
.vim/autoload/pathogen.vim Executable file
View File

@ -0,0 +1,289 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.4
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below.
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). Curly braces are expanded with pathogen#expand():
" "bundle/{}" finds all subdirectories inside "bundle" inside all directories
" in the runtime path.
function! pathogen#infect(...) abort
for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]'
call pathogen#surround(path)
elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
elseif path =~# '[{}*]'
call pathogen#interpose(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#interpose(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
if pathogen#is_disabled($MYVIMRC)
return 'finish'
endif
return ''
endfunction
" Split a path into a list.
function! pathogen#split(path) abort
if type(a:path) == type([]) | return a:path | endif
if empty(a:path) | return [] | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction
" Convert a list to a path.
function! pathogen#join(...) abort
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort
return call('pathogen#join',[1] + a:000)
endfunction
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() abort
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_blacklist or the
" comma delimited environment variable $VIMBLACKLIST.
function! pathogen#is_disabled(path) abort
if a:path =~# '\~$'
return 1
endif
let sep = pathogen#slash()
let blacklist =
\ get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', [])) +
\ pathogen#split($VIMBLACKLIST)
if !empty(blacklist)
call map(blacklist, 'substitute(v:val, "[\\/]$", "", "")')
endif
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction
" Prepend the given directory to the runtime path and append its corresponding
" after directory. Curly braces are expanded with pathogen#expand().
function! pathogen#surround(path) abort
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
let path = fnamemodify(a:path, ':s?[\\/]\=$??')
let before = filter(pathogen#expand(path), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#expand(path, sep.'after')), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp, 'index(before + after, v:val) == -1')
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction
" For each directory in the runtime path, add a second entry with the given
" argument appended. Curly braces are expanded with pathogen#expand().
function! pathogen#interpose(name) abort
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += reverse(filter(pathogen#expand(dir[0:-6].name, sep.'after'), '!pathogen#is_disabled(v:val[0:-7])')) + [dir]
else
let list += [dir] + filter(pathogen#expand(dir.sep.name), '!pathogen#is_disabled(v:val)')
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = {}
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort
for command in a:000
execute command
endfor
return ''
endfunction
" Section: Unofficial
function! pathogen#is_absolute(path) abort
return a:path =~# (has('win32') ? '^\%([\\/]\|\w:\)[\\/]\|^[~$]' : '^[/~$]')
endfunction
" Given a string, returns all possible permutations of comma delimited braced
" alternatives of that string. pathogen#expand('/{a,b}/{c,d}') yields
" ['/a/c', '/a/d', '/b/c', '/b/d']. Empty braces are treated as a wildcard
" and globbed. Actual globs are preserved.
function! pathogen#expand(pattern, ...) abort
let after = a:0 ? a:1 : ''
if a:pattern =~# '{[^{}]\+}'
let [pre, pat, post] = split(substitute(a:pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1)
let found = map(split(pat, ',', 1), 'pre.v:val.post')
let results = []
for pattern in found
call extend(results, pathogen#expand(pattern))
endfor
elseif a:pattern =~# '{}'
let pat = matchstr(a:pattern, '^.*{}[^*]*\%($\|[\\/]\)')
let post = a:pattern[strlen(pat) : -1]
let results = map(split(glob(substitute(pat, '{}', '*', 'g')), "\n"), 'v:val.post')
else
let results = [a:pattern]
endif
let vf = pathogen#slash() . 'vimfiles'
call map(results, 'v:val =~# "\\*" ? v:val.after : isdirectory(v:val.vf.after) ? v:val.vf.after : isdirectory(v:val.after) ? v:val.after : ""')
return filter(results, '!empty(v:val)')
endfunction
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction
function! pathogen#separator() abort
return pathogen#slash()
endfunction
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction
" Remove duplicates from a list.
function! pathogen#uniq(list) abort
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction
" Section: Deprecated
function! s:warn(msg) abort
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) abort
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#slash() . '{}')
endfunction
function! pathogen#incubate(...) abort
let name = a:0 ? a:1 : 'bundle/{}'
call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
return pathogen#interpose(name)
endfunction
" Deprecated alias for pathogen#interpose().
function! pathogen#runtime_append_all_bundles(...) abort
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
endif
return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
endfunction
" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=':

1
.vim/bundle/Zenburn Submodule

@ -0,0 +1 @@
Subproject commit 2cacfcb222d9db34a8d1a13bb8bb814f039b98cd

1
.vim/bundle/ack.vim Submodule

@ -0,0 +1 @@
Subproject commit 36e40f9ec91bdbf6f1adf408522a73a6925c3042

1
.vim/bundle/ale Submodule

@ -0,0 +1 @@
Subproject commit 28c93ab1854ef41a46855401cc4addbaf7dfb9d4

@ -0,0 +1 @@
Subproject commit 8ffc3e208c282f19afa237d343fa1533146bd2b4

1
.vim/bundle/dracula Submodule

@ -0,0 +1 @@
Subproject commit 86712dc2de083e91a78bddddbb7fe7defe818c79

1
.vim/bundle/gruvbox Submodule

@ -0,0 +1 @@
Subproject commit cb4e7a5643f7d2dd40e694bcbd28c4b89b185e86

@ -0,0 +1 @@
Subproject commit 1f3da6f1bb78bfe0e6113d0812828329f3874b3e

1
.vim/bundle/nerdtree Submodule

@ -0,0 +1 @@
Subproject commit 184fbb6ffea6dc69726b229a08153c9d08522386

1
.vim/bundle/nord-vim Submodule

@ -0,0 +1 @@
Subproject commit 9f7ce848723f69e33792e5606091bbfd5739d253

@ -0,0 +1 @@
Subproject commit 6386ac13a2f6360cf3cf34f22772a82e7e45843e

@ -0,0 +1 @@
Subproject commit 5a319ea5504e18215d155576c78d1b7fb8e22c8f

@ -0,0 +1 @@
Subproject commit a28a0b1e778ae394c495ed34efb89d44a05f11f1

@ -0,0 +1 @@
Subproject commit 46a68476fc7b4f454c829d83d21997b82ac66f76

@ -0,0 +1 @@
Subproject commit f67d022169bd04d3c000f47b1c03bfcbc4209470

1
.vim/bundle/vim-fish Submodule

@ -0,0 +1 @@
Subproject commit 50b95cbbcd09c046121367d49039710e9dc9c15f

@ -0,0 +1 @@
Subproject commit 609b2170bf68531a722217e38088d0fb11f8ec12

1
.vim/bundle/vim-go Submodule

@ -0,0 +1 @@
Subproject commit 007b69c27b63fbcbe2e0766073b09281274b0231

@ -0,0 +1 @@
Subproject commit 61e342c4facd5cbc645104262e866882ea1cf5c3

@ -0,0 +1 @@
Subproject commit 7cc6baebaf0065fd8c31cc9216c87bfa543eb71a

@ -0,0 +1 @@
Subproject commit 33bd4bf9220dd6ecb63fea12f739aaf4773e4131

1
.vim/bundle/vim-one Submodule

@ -0,0 +1 @@
Subproject commit 6695e135415c53a8fbe96672e382200aa1ffb4b4

@ -0,0 +1 @@
Subproject commit 2dcd974b7255e4af83cf79a208f04a3489065e22

1
.vim/bundle/vim-ruby Submodule

@ -0,0 +1 @@
Subproject commit 1aa8f0cd0411c093d81f4139d151f93808e53966

@ -0,0 +1 @@
Subproject commit fab8621670f71637e9960003af28365129b1dfd0

1
.vim/bundle/vim-toml Submodule

@ -0,0 +1 @@
Subproject commit 2295e612d936671048035dbc447f5400cbee60de

84
.vimrc Normal file
View File

@ -0,0 +1,84 @@
if &shell =~# 'fish$'
set shell=sh
endif
syntax enable
filetype plugin on
execute pathogen#infect()
set t_Co=256
set colorcolumn=100
set autoindent
set showcmd
set cursorline
set wildmenu
set showmatch
set lazyredraw
set incsearch
set hlsearch
set laststatus=2
set mouse=a
set nowrap
set number
set expandtab
set runtimepath+=/usr/local/opt/fzf
set textwidth=100
set noshowmode
set background=dark
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
let mapleader = 'j'
inoremap <leader>j <Esc>
let mapleader = ','
nnoremap <leader>n :NERDTree<cr>
nnoremap <leader>w <C-w>
nnoremap <C-p> :FZF<cr>
let g:gruvbox_italic=1
colorscheme gruvbox
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\}
let g:ale_linters = {
\ 'css': ['csslint'],
\ 'go': ['golint', 'go vet', 'gopls'],
\ 'typescript': ['tslint', 'tsserver', 'typecheck'],
\ 'make': ['checkmake'],
\ 'proto': ['protoc-gen-lint'],
\ 'dockerfile': ['hadolint'],
\ 'dart': ['language_server', 'dartanalyzer'],
\ 'fish': ['fish'],
\ 'vim': ['vint'],
\ 'elixir': ['credo', 'elixir-ls'],
\}
let g:ale_fixers = {
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
\ 'graphql': ['prettier'],
\ 'javascript': ['prettier'],
\ 'typescript': ['prettier'],
\ 'css': ['prettier'],
\ 'yaml': ['prettier'],
\ 'json': ['prettier'],
\ 'dart': ['dartfmt'],
\ 'html': ['prettier'],
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
\ 'elixir': ['mix_format'],
\}
let g:ale_fix_on_save = 1
let g:ale_linters_explicit = 1
let g:ale_completion_enabled = 1
let g:ale_completion_delay = 500