diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc_src/index.hdr.in | 2 | ||||
-rw-r--r-- | osx/config.h | 2 | ||||
-rw-r--r-- | po/en.po | 2 | ||||
-rw-r--r-- | share/completions/docker.fish | 92 | ||||
-rw-r--r-- | share/completions/mount.fish | 22 | ||||
-rw-r--r-- | share/functions/__fish_config_interactive.fish | 1 | ||||
-rw-r--r-- | src/exec.cpp | 6 |
8 files changed, 26 insertions, 103 deletions
diff --git a/configure.ac b/configure.ac index 7f9b2fe7..5570b6f0 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ m4_syscmd([build_tools/git_version_gen.sh 2>/dev/null]) AC_PREREQ([2.60]) AC_INIT(fish, m4_esyscmd([cut -f 3 -d ' ' FISH-BUILD-VERSION-FILE | tr -d '\n']), - fish-users@lists.sf.net) + fish-users@lists.sourceforge.net) conf_arg=$@ diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 0f6f1f79..e20c8cf0 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -1166,7 +1166,7 @@ If you install fish in your home directory, fish will not work correctly for any If you have a question not answered by this documentation, there are several avenues for help: --# The official mailing list at <a href='https://lists.sf.net/lists/listinfo/fish-users'>fish-users@lists.sf.net</a> +-# The official mailing list at <a href='https://lists.sourceforge.net/lists/listinfo/fish-users'>fish-users@lists.sourceforge.net</a> -# The Internet Relay Chat channel, \#fish on `irc.oftc.net` diff --git a/osx/config.h b/osx/config.h index 7747dbf5..450a10cd 100644 --- a/osx/config.h +++ b/osx/config.h @@ -213,7 +213,7 @@ #define NOMACROS 1 /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "fish-users@lists.sf.net" +#define PACKAGE_BUGREPORT "fish-users@lists.sourceforge.net" /* Define to the full name of this package. */ #define PACKAGE_NAME "fish" @@ -10,7 +10,7 @@ msgstr "" "POT-Creation-Date: 2015-04-13 22:15+0800\n" "PO-Revision-Date: 2014-11-15 09:00+0800\n" "Last-Translator: David Adam <zanchey@ucc.gu.uwa.edu.au>\n" -"Language-Team: English <fish-users@lists.sf.net>\n" +"Language-Team: English <fish-users@lists.sourceforge.net>\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/share/completions/docker.fish b/share/completions/docker.fish deleted file mode 100644 index 589e79c4..00000000 --- a/share/completions/docker.fish +++ /dev/null @@ -1,92 +0,0 @@ -# -# Completions for the docker command -# - -# -# Functions -# - -function __fish_docker_using_command - set cmd (commandline -opc) - if [ (count $cmd) -gt 1 ] - if [ $argv[1] = $cmd[2] ] - return 0 - end - end - return 1 -end - -function __fish_docker_all_containers --description "Show all containers" - command docker ps -q -a -end - - -function __fish_docker_start_containers --description "Show the running containers" - command docker ps -q -end - -function __fish_docker_stop_containers --description "Show the exited containers" - command docker ps -a | grep "Exit" | awk '{ print $1 }' -end - -# All docker commands -complete -c docker -n '__fish_use_subcommand' -xa attach --description "Attach to a running container" -complete -c docker -n '__fish_use_subcommand' -xa build --description "Build a container from a Dockerfile" -complete -c docker -n '__fish_use_subcommand' -xa commit --description "Create a new image from a container's changes" -complete -c docker -n '__fish_use_subcommand' -xa cp --description "Copy files/folders from the containers filesystem to the host path" -complete -c docker -n '__fish_use_subcommand' -xa diff --description "Inspect changes on a container's filesystem" -complete -c docker -n '__fish_use_subcommand' -xa events --description "Get real time events from the server" -complete -c docker -n '__fish_use_subcommand' -xa export --description "Stream the contents of a container as a tar archive" -complete -c docker -n '__fish_use_subcommand' -xa history --description "Show the history of an image" -complete -c docker -n '__fish_use_subcommand' -xa images --description "List images" -complete -c docker -n '__fish_use_subcommand' -xa import --description "Create a new filesystem image from the contents of a tarball" -complete -c docker -n '__fish_use_subcommand' -xa info --description "Display system-wide information" -complete -c docker -n '__fish_use_subcommand' -xa insert --description "Insert a file in an image" -complete -c docker -n '__fish_use_subcommand' -xa inspect --description "Return low-level information on a container" -complete -c docker -n '__fish_use_subcommand' -xa kill --description "Kill a running container" -complete -c docker -n '__fish_use_subcommand' -xa load --description "Load an image from a tar archive" -complete -c docker -n '__fish_use_subcommand' -xa login --description "Register or Login to the docker registry server" -complete -c docker -n '__fish_use_subcommand' -xa logs --description "Fetch the logs of a container" -complete -c docker -n '__fish_use_subcommand' -xa port --description "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT" -complete -c docker -n '__fish_use_subcommand' -xa ps --description "List containers" -complete -c docker -n '__fish_use_subcommand' -xa pull --description "Pull an image or a repository from the docker registry server" -complete -c docker -n '__fish_use_subcommand' -xa push --description "Push an image or a repository to the docker registry server" -complete -c docker -n '__fish_use_subcommand' -xa restart --description "Restart a running container" -complete -c docker -n '__fish_use_subcommand' -xa rm --description "Remove one or more containers" -complete -c docker -n '__fish_use_subcommand' -xa rmi --description "Remove one or more images" -complete -c docker -n '__fish_use_subcommand' -xa run --description "Run a command in a new container" -complete -c docker -n '__fish_use_subcommand' -xa save --description "Save an image to a tar archive" -complete -c docker -n '__fish_use_subcommand' -xa search --description "Search for an image in the docker index" -complete -c docker -n '__fish_use_subcommand' -xa start --description "Start a stopped container" -complete -c docker -n '__fish_use_subcommand' -xa stop --description "Stop a running container" -complete -c docker -n '__fish_use_subcommand' -xa tag --description "Tag an image into a repository" -complete -c docker -n '__fish_use_subcommand' -xa top --description "Lookup the running processes of a container" -complete -c docker -n '__fish_use_subcommand' -xa version --description "Show the docker version information" -complete -c docker -n '__fish_use_subcommand' -xa wait --description "Block until a container stops, then print its exit code" - -# -# docker ps -# -complete -c docker -f -n '__fish_docker_using_command ps' -a '(__fish_docker_all_containers)' --description "Docker container" -complete -c docker -s a -l all --description "Show all containers. Only running containers are shown by default." -complete -c docker -s q -l quiet==false --description "Only display numeric IDs" -complete -c docker -s s -l size=false --description "Display sizes" -complete -c docker -s n --description "Show n last created containers, include non-running ones. [-1]" -complete -c docker -l before-id="" --description "Show only container created before Id, include non-running ones." -complete -c docker -l no-trunc=false --description "Show all containers. Only running containers are shown by default." -complete -c docker -l since-id="" --description "Show only containers created since Id, include non-running ones." - -# -# docker start -# -complete -c docker -f -n '__fish_docker_using_command start' -a '(__fish_docker_stop_containers)' --description "Stopped container" - -# -# docker stop -# -complete -c docker -f -n '__fish_docker_using_command stop' -a '(__fish_docker_start_containers)' --description "Container running" - -# -# docker restart -# -complete -c docker -f -n '__fish_docker_using_command restart' -a '(__fish_docker_all_containers)' --description "Docker container" diff --git a/share/completions/mount.fish b/share/completions/mount.fish index fca4b791..cb945f8d 100644 --- a/share/completions/mount.fish +++ b/share/completions/mount.fish @@ -1,10 +1,20 @@ - - -# A list of all known filesystem types, used by various completions, -# including mount and df - # Completions for mount -complete -x -c mount -a '(cat /etc/fstab|sed -e "s/^\([^ \t]*\)[ \t]*\([^ \t]*\).*/\1\n\2/"| __fish_sgrep "^/")' --description 'Mount point' +function __fish_complete_blockdevice + set -l cmd (commandline -ct) + [ "" = "$cmd" ]; and return + for f in $cmd* + [ -b $f ]; and printf "%s\t%s\n" $f "Block device" + [ -d $f ]; and printf "%s\n" $f/ + end +end + +complete -x -c mount -a '(__fish_complete_blockdevice)' +# In case `mount UUID=` and similar also works +complete -x -c mount -a "(test -r /etc/fstab; and string replace -r '#.*' '' < /etc/fstab | string match -r '.+' | string replace -r ' ([^\s]*) .*' '\tMount point \$1')" +complete -x -c mount -a "(test -r /etc/fstab; and string replace -r '#.*' '' < /etc/fstab | string match -r '.+' | string replace -r '(^[^\s]*) ([^\s]*) .*' '\$2\tDevice \$1')" +# In case it doesn't +# complete -x -c mount -a "(test -r /etc/fstab; and string match -r '^/.*' < /etc/fstab | string replace -r ' ([^\s]*) .*' '\tMount point \$1')" +# complete -x -c mount -a "(test -r /etc/fstab; and string match -r '^/.*' < /etc/fstab | string replace -r '(^/[^\s]*) ([^\s]*) .*' '\$2\tDevice \$1')" complete -c mount -s V --description 'Display version and exit' complete -c mount -s h --description 'Display help and exit' complete -c mount -s v --description 'Verbose mode' diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 23c60195..c3864a8f 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -194,6 +194,7 @@ function __fish_config_interactive -d "Initializations that should be performed status --is-command-substitution; and return printf '\033]7;file://%s%s\a' (hostname) (pwd | __fish_urlencode) end + __update_vte_cwd # Run once because we might have already inherited a PWD from an old tab end # Remove the startup command_not_found handler since we're done with it diff --git a/src/exec.cpp b/src/exec.cpp index bd9f9fb5..fa58c310 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -45,6 +45,7 @@ #include "parse_util.h" #include "io.h" #include "parse_tree.h" +#include "reader.h" /** file descriptor redirection error message @@ -253,7 +254,8 @@ static void safe_launch_process(process_t *p, const char *actual_cmd, const char } /** - This function is similar to launch_process, except it is not called after a fork (i.e. it only calls exec) and therefore it can allocate memory. + This function is similar to launch_process, except it is not called after a + fork (i.e. it only calls exec) and therefore it can allocate memory. */ static void launch_process_nofork(process_t *p) { @@ -266,6 +268,8 @@ static void launch_process_nofork(process_t *p) const char *const *envv = env_export_arr(false); char *actual_cmd = wcs2str(p->actual_cmd.c_str()); + /* Ensure the terminal modes are what they were before we changed them. */ + restore_term_mode(); /* Bounce to launch_process. This never returns. */ safe_launch_process(p, actual_cmd, argv_array.get(), envv); } |