* [PATCH] Better UNC path support in chere
@ 2016-07-17 2:13 AIDA Shinra
0 siblings, 0 replies; only message in thread
From: AIDA Shinra @ 2016-07-17 2:13 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 418 bytes --]
I modified "chere" for following improvements:
* UNC path support in "chere -1" mode
* Partial tcsh support in "chere -1" mode
* Simplified quoting
* Support for Windows log-on name composed of only digits
And also a feature request:
* Could anyone add an option to move "Cygwin Prompt Here"
command into a shift-click menu? The following patch
contains a hard-coded (not switchable) one.
Regards,
shinra
[-- Attachment #2: chere-quoting.diff --]
[-- Type: application/octet-stream, Size: 1907 bytes --]
--- /usr/bin/chere 2014-02-21 08:00:09.000000000 +0900
+++ chere 2016-07-17 10:55:31.839227500 +0900
@@ -202,7 +202,7 @@
{
# Check windows version and cygwin install directory
VER=`uname -s`
- ID_USER=`id -nu`
+ ID_USER=`id -u`
RUN_EXE=""
ASH_EXE=`cygpath -w /bin/sh`
BASH_EXE=`cygpath -w /bin/bash`
@@ -477,7 +477,7 @@
CPH_DESC="Command Prompt Here (cygwin)";;
passwd )
# Experimental
- SHELL_EXE="/bin/sh"
+ SHELL_EXE="/bin/bash"
# Quoting nightmare. Step through it all
# c:\cygwin\bin\sh -c "scmd=`getent passwd \`id -un\` | sed -n \"s?.*:\\\(.*\\\)?\\\1?gp\"`; $scmd -l -c \"cd \\\"c:/program files\\\"; exec $scmd\""
# works from the command line
@@ -488,8 +488,9 @@
# When evaluated into a variable, need another level of quoting:
# "c:\cygwin\bin\sh -c \\\"scmd=\\\`getent passwd \\\\\\\`id -un\\\\\\\` | sed -n \\\\\\\"s?.*:\\\\\\\\\\\\(.*\\\\\\\\\\\\)?\\\\\\\\\\\\1?gp\\\\\\\"\\\`; \\\$scmd -l -c \\\\\\\"cd \\\\\\\\\\\\\\\"%L\\\\\\\\\\\\\\\"; exec \\\$scmd\\\\\\\"\\\""
# Ouch. If you think it can be quoted better, let me know.
- SHELL_CMD="-c \\\"scmd=\\\`getent passwd \\\\\\\`id -un\\\\\\\` | sed -n \\\\\\\"s?.*:\\\\\\\\\\\\(.*\\\\\\\\\\\\)?\\\\\\\\\\\\1?gp\\\\\\\"\\\`; \\\$scmd -l -c \\\\\\\"cd \\\\\\\\\\\\\\\"%L\\\\\\\\\\\\\\\"; exec \\\$scmd\\\\\\\"\\\""
- ACCEL="Shell Prompt &Here"
+ SHELL_CMD='-c \"scmd=\`/bin/getent passwd \\\`/bin/id -u\\\` | /bin/sed -n '\''s?.*:\\\(.*\\\)?\\\1?gp'\''\`; case \$scmd in *csh*) ;; *) dmy=-\$scmd;; esac; exec -l \$scmd -c '\''cd \\\"\$1\\\"; exec \$2'\'' \$dmy \\\"\$0\\\" \$scmd\" \"%L\"'
+
+ ACCEL="&Cygwin Prompt Here"
CPH_DESC="Cygwin Prompt Here"
# Extra check before installing passwd
@@ -760,6 +761,7 @@
$REGTOOL -s set $1/ \"$3\"
$REGTOOL add $1/command
$REGTOOL -e set $1/command/ \"$4\"
+ # $REGTOOL -s set $1/Extended \"\"
else
echo $0 Warning: Not overriding existing entry
echo
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-17 2:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-17 2:13 [PATCH] Better UNC path support in chere AIDA Shinra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).